Re: Daemon won't process request until next
by jsprat (Curate) on Jul 16, 2003 at 20:44 UTC
|
You may want to try LWP::Debug with each of the servers to see what's different (if anything) between the connections.BTW, which version(s) of perl, LWP, and HTTP::Daemon (+ any other modules) are you using? Are they the same versions on the new server as the old server? If you replace one at a time, how does it affect the problem? HTH...
| [reply] |
Re: Daemon won't process request until next
by sgifford (Prior) on Jul 16, 2003 at 20:23 UTC
|
I would debug this either with the Perl debugger, by inserting a lot of print statements and seeing where the daemon is getting stuck, or else with strace.
I know that's rather obvious and perhaps unhelpful, but without any details whatsoever the only other option is wild guessing...
| [reply] [d/l] |
|
|
Nothing wrong with stating the obvious. I tried the print route. I compared the output of the manually typed telnet request and the lynx/lwp requests and they all have the same exact byte per byte, input and output.
Basically get_request() is not seeing the last line of the request until another request comes in.I think it's an IO::Handle thing. The machine with the problem was just for testing. I've run it on other machines since without problems so probably some deep crusty socket problem. Maybe a bad header or something. Either way I just gave up as the test machine is about to get it's OS replaced.
-Lee
"To be civilized is to deny one's nature."
| [reply] |
Re: Daemon won't process request until next
by Thelonius (Priest) on Jul 16, 2003 at 19:50 UTC
|
Well autoflushing is on by default. It seems like there might be a bug in get_request. I'm fairly confounded here.
Flushing is not enough. You must close your handles. Your response is not over until the socket is closed. That's how HTTP works.
| [reply] |
|
|
...assuming you're not using keep-alive.
| [reply] |
|
|
I am aware of this. Indeed the socket is getting closed. It seems to be a bug in HTTP::Daemon or one of the socket libraries as I have now tried it on 3 other machines without problems. Only this one machine. F**king hate problems like this, sigh.
Thanks,
-Lee
"To be civilized is to deny one's nature."
| [reply] |
|
|
Do your versions of perl or HTTP::Daemon differ on this box?
-Waswas
| [reply] |
|
|
Re: Daemon won't process request until next
by Aristotle (Chancellor) on Jul 16, 2003 at 18:27 UTC
|
| [reply] |
|
|
Well autoflushing is on by default. It seems like there might be a bug in get_request. I'm fairly confounded here.
-Lee
"To be civilized is to deny one's nature."
| [reply] |