This is simply a bug. This happens when a newline is accidentially sent to 
early. The web server treats this as the end of headers, merges the lines 
received so far with any  additional header lines required and sends them out 
to the client. Everything apart the first empty line will be presented as 
content.
Similiar things happened to me when I requested a GetFeature with a HTML 
template and received an error while using EXCEPTIONS=INIMAGE. MapServer had 
already sent the content-type header with value text/html but the error handler 
still respected the exceptions parameter and thought itself responsible to send 
the content-type header. The result was a html page starting with 
"Content-type: imag/png; mode=24bit" and a lot of junk - the exception as PNG 
image - funny.
The best thing you can do is reproduce the error with a minimal map file, may 
be with an inline feature and create a ticket if there no one yet.
 

> -----Ursprüngliche Nachricht-----
> Von: [email protected] 
> [mailto:[email protected]] Im Auftrag 
> von Keith Moss
> Gesendet: Mittwoch, 2. November 2011 07:51
> An: [email protected]
> Betreff: [mapserver-users] Corrupted zipped shapefiles from WFS
> 
> Hi list,
> 
> We're having a bit of an issue with the zipped shapefiles 
> we're getting back
> from WFS GetFeature requests. Winzip claims that they're all 
> corrupted* but,
> oddly, 7zip can open and extract the perfectly valid shapefile without
> issue. We tried to unzip the file with PHP's inbuilt 
> ZIPArchive class, but
> that also had issues - it could read the files in there but 
> would extract
> 0KB length files.
> 
> Other output formats - CSV, GML, etc - work without issue. 
> We've reproduced
> the issue on two separate Windows-based servers (2008 & 2003).
> 
> We've noticed in the corrupted zip files that the file starts with:
> "Content-Disposition: attachment; filename=result.zip
> Content-Type: application/zip" (when we open it in Notepad). 
> We've tried
> removing this, but it didn't help.
> 
> Can anyone on the list, or one of the developers, shed any 
> light on the
> situation?
> 
> I've attached a simple test case with an example shapefile, 
> would someone be
> able to try it on their setup for us please?
> 
> We're using PHP MapScript with MapServer 6.0.1 (MS4W 3.0.3) / 
> PHP 5.3.6.
> 
> * The WinZip error: "error [<path>.zip]: start of central 
> directory not
> found; Zip file corrupt."
> 
> http://osgeo-org.1803224.n2.nabble.com/file/n6954263/shapezip.zip
> shapezip.zip 
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/Corrupted-zipped-shapef
> iles-from-WFS-tp6954263p6954263.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to