[mapserver-users] Python MapScript via WSGI examples

Jeff McKenna jmckenna at gatewaygeomatics.com
Fri Jul 15 14:55:55 PDT 2016


On 2016-07-15 6:46 PM, Jeff McKenna wrote:
> Hi Tom,
>
> I believe I have your test working here, on Windows with mod_wsgi,
> Python 3.5.1, and MapScript7.  Googling your error I believe your header
> problem occurs just for Python2 responses (maybe both Julien and I are
> using Python3 ?)  What happens if you try to force the content-type to
> utf8 ?  Change line#40 to:
>
>   start_response('200 OK', [('Content-type', 'text/html; charset=utf-8')])
>
> Just a guess as I have Python3.  A try anyway...
>

Or maybe the output should be bytes, as:

   start_response('200 OK', [('Content-type', 'application/octet-stream; 
charset=utf-8')])

I'd need a Python2 to test though.....hard without.

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/







More information about the MapServer-users mailing list