[Modcplusplus-user] time out during post requests
Brought to you by:
gr84b8,
johnksterling
From: Nathan S. <na...@al...> - 2002-04-15 16:06:07
|
Greetings all, I had emailed John about this earlier, but am posting here to recap what I've figured out thus far. Whenever a HTTP POST request is made to a cpp module, apache immediatly returns whatever output the module provides but then inexplicably (so far) doesn't close the connection, leading to an around 10 second timeout before apache (or browser, unsure which) gives up on waiting, and closes the tcp connection. This only seems to occur with browsers that attempt a keep alive connection during posts. Both Mozilla and IE versions > 4 do this, however Netscape 4.x does not. Here's a sniffed request that works: POST /cpp-handler HTTP/1.1 User-Agent: curl/7.9.2 (i686-pc-linux-gnu) libcurl 7.9.2 (OpenSSL 0.9.6b) Host: nas.office.allmed.net Pragma: no-cache Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Content-Length: 17 Content-Type: application/x-www-form-urlencoded test1=sa&test2=32 And one that does not: POST /cpp-handler HTTP/1.1 Host: nas.office.allmed.net Accept: */* Accept-Language: en Pragma: no-cache Connection: Keep-Alive Referer: http://nas.office.allmed.net/test.html User-Agent: Mozilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC) UA-OS: MacOS UA-CPU: PPC Content-type: application/x-www-form-urlencoded Extension: Security/Remote-Passphrase Content-length: 17 test1=sa&test2=32 As you can see, the content-length and content is the same for both requests, they are both HTTP/1.1, however the failing request has the Connection: Keep-Alive header. From what I've been able to figure out by crude ap_log statements in the mod_cpp source, the request does get through mod_cpp just fine, and control passes back to apache before the time-out occures. gdb is useless with the multithreaded nature of apache2, and segfaults before even getting it running. The problem to me seems to lie in mod_cpp, as normal cgi's work fine. Therefore perhaps there is something that mod_cpp should perform for post requests that it's not? I've confirmed that turning off keep alives off in httpd.conf, makes the problem go away. Does anyone else see this behaviour or is it only myself? Nathan |