mapcache icon indicating copy to clipboard operation
mapcache copied to clipboard

CGI response is being truncated in IIS

Open szekerest opened this issue 11 years ago • 3 comments

When configuring mapcache CGI in IIS I'm getting truncated results for the demo requests. Actually the in the CGI response output stream (stdout) every \n is replaced with \r\n so the content-length specified by mapcache is not sufficient.

This issue can be fixed this way: _setmode( _fileno( stdout ), _O_BINARY );

Probably that should be set for the MSVC builds only.

szekerest avatar Aug 10 '14 19:08 szekerest

+1 for a MSVC-only workaround

tbonfort avatar Aug 11 '14 07:08 tbonfort

Perhaps have a look at or reuse int msIO_needBinaryStdout() in MapServer's mapio.c

dmorissette avatar Aug 11 '14 13:08 dmorissette

Thanks for the hint, it looks like we use this condition in mapserver

#if defined(_WIN32) && !defined(USE_FASTCGI) ..

szekerest avatar Aug 11 '14 19:08 szekerest