[ISAPI DLL] Partial receives are not handled correctly
Nils Durner <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
the attached patch fixes transmission problems in Caraveo's ISAPI DLL
for Microsoft Internet Information Server.
The current code does not handle partial receives (recv() may read less
than expected) which leads to incorrect interpretation of received data
(the beginning of the second data block received is treated as FCGI
header information, e.g. request type or size).
In our case, a few hundred bytes of data were received by the browser
with some random garbage and the following message appended:
---
HTTP/1.1 503 Server too busy
Server: Microsoft-IIS/5.0
Date: Mon, 17 Oct 2005 12:01:16 GMT
Connection: close
Content-Type: text/html
Server Error, unable to connect to fastcgi server.
---
We have had this problem with IIS 5 and Windows 2000 only. Everything
works fine with IIS 6 and Windows 2003.
Apply the patch like this (bash syntax):
---
# Unzip
unzip fastcgi-0.6.src.zip
# Apply patch
patch -p 0 < fastcgi.diff
# Substitute Unix-style line breaks
awk "{print \$0 \"\r\";}" < isapi_fcgi/isapi_fcgi.dsp > \
isapi_fcgi/isapi_fcgi.dsp.new
mv isapi_fcgi/isapi_fcgi.dsp.new isapi_fcgi/isapi_fcgi.dsp
awk "{print \$0 \"\r\";}" < isapi_fcgi/isapi_fcgi.dsw > \
isapi_fcgi/isapi_fcgi.dsw.new
mv isapi_fcgi/isapi_fcgi.dsw.new isapi_fcgi/isapi_fcgi.dsw
---
You can get bash, patch and awk for Windows from www.mingw.org.
Please CC me answers as I am not subscribed to the list.
--
Best regards,
Nils Durner
Software Development
Projekt Computersysteme GmbH
Erchenstraße 12
D-89522 Heidenheim
Germany
Telefon: 0 73 21-98 84-0
Telefax: 0 73 21-98 84-98
E-Mail: [email protected] <mailto:[email protected]>
Internet: www.persis.de <http://www.persis.de>
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
fastcgi.zip
(application/octet-stream, 2 KB) - not displayed