On Fri, Apr 24, 2009 at 2:33 PM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On Fri, Apr 24, 2009 at 12:28 PM, Ben Simon <<a href="mailto:benjisimon@gmail.com">benjisimon@gmail.com</a>> wrote:<br>
> 1) Any suggestions for pinpointing an issue where the response is just a<br>
> blank page (with not HTML) returned?<br>
<br>
</div></div>That can happen when you don't return a valid response object in some<br>
contexts, also if you were to return an infinite (because of cycles)<br>
one, or if you went into an infinite loop.</blockquote><div><br>Thanks, good to know.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> 2) What's the best way to change the connection timeout? <br><div class="im"><br>
<br>
</div>serve/servlet doesn't support a connection timeout like running from<br>
the commandline does, but you can give a different manager argument to<br>
keep continuations longer. If you want to get a longer timeout on the<br>
connections, you'd have to construct a dispatcher like the one in<br>
web-server/web-config-unit, possibly using the helpers that<br>
serve/servlet uses.</blockquote><div><br>Using the source code for web-server/servlet-env.ss as inspiration, I've come up with:<br><br>;; ----------------------------<br>(require web-server/servlet-dispatch <br>
(prefix-in timeout: web-server/dispatchers/dispatch-timeout)<br> (prefix-in seq: web-server/dispatchers/dispatch-sequencer))<br><br>(serve/launch/wait <br> (lambda (sema)<br> (seq:make (timeout:make 6000)<br>
(dispatch/servlet foo-servlet #:regexp #rx"")))<br> #:port 8002)<br>;; ----------------------------<br><br>and now I don't get blank screens anymore.<br><br>I'm impressed at how easy it was to make my own dispatcher. Cool stuff.<br>
<br>Thanks Jay!<br><br>-Ben<br><br><br></div></div>-- <br>Have an idea for software? I can make it happen - <a href="http://www.ideas2executables.com">http://www.ideas2executables.com</a><br>My Blog: <a href="http://benjisimon.blogspot.com">http://benjisimon.blogspot.com</a><br>