[MapServer-dev] FW: [MapServer/MapServer] Use of HEAD enstead of GET return different headers (Issue #6826)

Lime, Steve D (MNIT) steve.lime at state.mn.us
Thu Feb 9 14:36:29 PST 2023


Just wanted to see if there were any other perspectives. MapServer itself doesn't accept HEAD requests, nor does it seem possible. It's Apache is returning the 200 on an HEAD request saying that the document (i.e. the cgi script) exists. My inclination is to close the ticket as invalid.

--Steve

From: pgneogeo <notifications at github.com>
Sent: Tuesday, February 7, 2023 7:57 AM
To: MapServer/MapServer <MapServer at noreply.github.com>
Cc: Subscribed <subscribed at noreply.github.com>
Subject: [MapServer/MapServer] Use of HEAD enstead of GET return different headers (Issue #6826)

This message may be from an external email source.
Do not select links or open attachments unless verified. Report all suspicious emails to Minnesota IT Services Security Operations Center.

________________________________
Expected behavior and actual behavior.

Using GET and HEAD as HTTP commands should return the same headers.

Steps to reproduce the problem.

Mapserver is behind apache, with the only interesting configuration is :

   RewriteEngine on

    RewriteRule ^/maps/([^/]*)$ /wxs/mapserv?map=/maps/$1.map [PT,QSA]

The version installed is 7.6.2

When I call my server with curl, for example with this call, I receive a png, with the according header Content-Type: image/png

curl https://[MYDOMAIN]/maps/osm-default\?VERSION\=1.1.1\&REQUEST\=GetMap\&LAYERS\=default\&WIDTH\=256\&HEIGHT\=256\&FORMAT\=image/png\&SRS\=EPSG:3857\&BBOX\=670199.864,6227477.568,675091.833,6232369.538<https://[MYDOMAIN]/maps/osm-default/?VERSION\=1.1.1\&REQUEST\=GetMap\&LAYERS\=default\&WIDTH\=256\&HEIGHT\=256\&FORMAT\=image/png\&SRS\=EPSG:3857\&BBOX\=670199.864,6227477.568,675091.833,6232369.538>

When I call the exact same url with curl -I to receive only the headers (for monitoring purpose), the headers are different, especially the Content-Type : Content-Type: text/html

The difference is that curl use the command HEAD instead of GET, but the headers should be equivalent.

Operating system

Debian bullseye 64 bit

MapServer version and installation method

7.6.2 version, I am not sure of the way it was installed

-
Reply to this email directly, view it on GitHub<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMapServer%2FMapServer%2Fissues%2F6826&data=05%7C01%7Csteve.lime%40state.mn.us%7C6f25f6c40e5942d2212608db09132d7f%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638113750203456390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=AUF8QZNnegDk52iGhP6W8yLnobqqURR3Z2ie2QgGHAA%3D&reserved=0>, or unsubscribe<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAMGN63FTCSPJGSPGXEDK6DWWJICRANCNFSM6AAAAAAUT75DNI&data=05%7C01%7Csteve.lime%40state.mn.us%7C6f25f6c40e5942d2212608db09132d7f%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638113750203456390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QefxcSCmmEHDP28SJkgkEgCenvH3kKPNA97%2BOEjoPVQ%3D&reserved=0>.
You are receiving this because you are subscribed to this thread.Message ID: <MapServer/MapServer/issues/6826 at github.com<mailto:MapServer/MapServer/issues/6826 at github.com>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20230209/398788b5/attachment.htm>


More information about the MapServer-dev mailing list