WMS ms_iostripstdoutbuffercontenttype() question

Jorge de Jesus jjesus at UALG.PT
Sat Apr 7 09:43:41 EDT 2007


Hi

This is probably a newbie question:

I am working with the WxS wrapper script found in the mapserver site and
the final part of the script is the HTTP header reply and dumping of the
image is:

$contenttype = ms_iostripstdoutbuffercontenttype();
header('Content-type: image/png');
ms_iogetStdoutBufferBytes();
ms_ioresethandlers();

since the header() already defines the content-type I was thinking that
the $contenttype was not necessary so I removed the $contenttype and got
an error message  which is not a string but an image.If I do
header('Content-type: $contenttype); everything also works fine.

Why is mandatory to have $contenttype =
ms_iostripstdoutbuffercontenttype(); ?!

Best

Jorge de Jesus



More information about the mapserver-users mailing list