Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of HEAD enstead of GET return different headers #6826

Closed
pgneogeo opened this issue Feb 7, 2023 · 2 comments
Closed

Use of HEAD enstead of GET return different headers #6826

pgneogeo opened this issue Feb 7, 2023 · 2 comments

Comments

@pgneogeo
Copy link

pgneogeo commented Feb 7, 2023

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

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

@sdlime
Copy link
Member

sdlime commented Feb 7, 2023

MapServer doesn't explicitly handle HEAD requests. In the tests I ran locally, it's the web server responding with a 200, so basically that the CGI script/handler is there. I'm not sure there's anything we can do.

@sdlime
Copy link
Member

sdlime commented Aug 21, 2023

With no further comments I'm gonna close this - can always reopen if necessary.

@sdlime sdlime closed this as completed Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants