BUG: WinCE Web Server Adds Extra CRLF to HTTP Headers Using HSE_REQ_SEND_RESPONSE_HEADER (290392)
The information in this article applies to:
- Microsoft Windows CE Operating System, Versions 3.0
This article was previously published under Q290392 SYMPTOMS
When an Internet Server API (ISAPI) extension adds custom HTTP headers to a response through the ServerSupportFunction(HSE_REQ_SEND_RESPONSE_HEADER,.) callback, the data that the ISAPI sends is garbled by the client. This may be manifested in HTML not being rendering correctly or images not displaying. This is likely to occur on ISAPI extensions that are ported from Internet Information Server (IIS).
CAUSE
The problem is caused by a difference between how IIS and the Windows CE Web Server handle ServerSupportFunction with option HSE_REQ_SEND_RESPONSE_HEADER when extra headers are being used (passed in the fifth function parameter lpdwDataType). On IIS, it is the ISAPI's responsibility to append a double CRLF to the end of the string to signify the end of the HTTP headers. The Windows CE Web Server appends a CRLF automatically when extra headers are used, regardless of what the ISAPI extension passed in.
A double CRLF signifies the end of the HTTP headers and the beginning of the HTTP body. If an ISAPI extension uses the IIS convention of adding two CRLFs to the end of the header string, then the browser treats the first two bytes after the CRLFs (the single CRLF that the Web Server added) as the first bytes of the HTTP body, causing the error.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 12/27/2003 |
---|
Keywords: | kbbug KB290392 |
---|
|