[mapserver-dev] Corrupt MapServer Zip outputs

Seth G sethg at geographika.co.uk
Sun Nov 21 06:40:05 PST 2021


Thanks Jérome. and Even. Sorry I should have checked for the headers in that zip first.
I'll attempt the bisecting now!

--
web:http://geographika.co.uk
twitter: @geographika

On Sun, Nov 21, 2021, at 1:12 PM, Even Rouault wrote:
> Seth,
>
> The .zip extension of this test file is a bit misleading, as the HTTP 
> headers are not stripped (testing HTTP headers is something good to test 
> in some tests). I've issued 
> https://github.com/MapServer/MapServer/pull/6440 to rename the expected 
> file though to avoid the confusion
>
> You can obtain a valid .zip file without headers with
>
> ../../build/mapserv -conf ../etc/mapserv.conf -nh 
> QUERY_STRING="map=wfs_ogr.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=road&featureid=road.1521&OUTPUTFORMAT=SHAPEZIP" 
>  > out.zip
>
> Even
>
> Le 21/11/2021 à 12:32, Seth G a écrit :
>> Hi all,
>>
>> Following on from the post at https://lists.osgeo.org/pipermail/mapserver-users/2021-November/082429.html I've been trying to find where the cause of the corrupt zips may be.
>>
>> There is a msautotest to create zip files and check against the expected output, however the expected output also seems to be an invalid zip file - I tried on both Windows and Linux.
>>
>> Even stranger this is both in the main branch (simply download the file with the following URL to test), and also going back in the history to 2016.
>>
>> https://github.com/MapServer/MapServer/blob/main/msautotest/wxs/expected/wfsogr10_shapezip.zip
>>
>> I had a working process using shapezips in a 7.6 release of MapServer so its hard to understand what could have changed, MapServer, GDAL, or zip formats themselves?
>> I'll attempt a Git bisect but if the issue is outside MapServer it won't find an issue.
>>
>> If anyone is able to open the zip file successfully please let me know (tried with Ark and unzip on Linux and Windows inbuilt unzip and 7-zip on Windows). Error seems to be "87 extra bytes at beginning or within zip file".
>>
>> Seth
>>
>> --
>> web:http://geographika.co.uk
>> twitter: @geographika
>> _______________________________________________
>> MapServer-dev mailing list
>> MapServer-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
> -- 
> http://www.spatialys.com
> My software is free, but my time generally not.


More information about the MapServer-dev mailing list