<!DOCTYPE html><html><head><title></title><style type="text/css">#qt p.qt-MsoNormal,#qt div.qt-MsoNormal{margin-top:0in;margin-right:0in;margin-bottom:0in;margin-left:0in;font-size:11pt;font-family:"Calibri", sans-serif;}
#qt h2{margin-right:0in;margin-left:0in;font-size:18pt;font-family:"Calibri", sans-serif;font-weight:bold;}
#qt a:link{color:blue;text-decoration-line:underline;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;}
#qt code{font-family:"Courier New";}
#qt pre{margin-top:0in;margin-right:0in;margin-bottom:0in;margin-left:0in;font-size:10pt;font-family:"Courier New";}

p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Steve,<br></div><div><br></div><div>There doesn't seem any benefit in trying to support this. The response type and content length is generated dynamically by MapServer processing the request, so any monittoring may as well use the GET requests. <br></div><div>The only alternative I can think of is to process the full request and then strip out the request body as a last step in mapserv. <br></div><div><br></div><div>Seth<br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div>On Thu, Feb 9, 2023, at 11:36 PM, Lime, Steve D (MNIT) via MapServer-dev wrote:<br></div><blockquote type="cite" id="qt" style="overflow-wrap:break-word;"><div class="qt-WordSection1"><p class="qt-MsoNormal">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.<br></p><p class="qt-MsoNormal"> <br></p><p class="qt-MsoNormal">--Steve<br></p><p class="qt-MsoNormal"> <br></p><div><div style="border-right-color:currentcolor;border-right-style:none;border-right-width:medium;border-bottom-color:currentcolor;border-bottom-style:none;border-bottom-width:medium;border-left-color:currentcolor;border-left-style:none;border-left-width:medium;border-image-outset:0;border-image-repeat:stretch;border-image-slice:100%;border-image-source:none;border-image-width:1;border-top-color:rgb(225, 225, 225);border-top-style:solid;border-top-width:1pt;padding-top:3pt;padding-right:0in;padding-bottom:0in;padding-left:0in;"><p class="qt-MsoNormal"></p><div><b>From:</b> pgneogeo <notifications@github.com> <br></div><div> <b>Sent:</b> Tuesday, February 7, 2023 7:57 AM<br></div><div> <b>To:</b> MapServer/MapServer <MapServer@noreply.github.com><br></div><div> <b>Cc:</b> Subscribed <subscribed@noreply.github.com><br></div><div> <b>Subject:</b> [MapServer/MapServer] Use of HEAD enstead of GET return different headers (Issue #6826)<br></div><p></p></div></div><p class="qt-MsoNormal"> <br></p><table class="qt-MsoNormalTable" style="width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="left"><tbody><tr><td style="background-color:rgb(255, 200, 69);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;padding-top:5.25pt;padding-right:1.5pt;padding-bottom:5.25pt;padding-left:1.5pt;"><br></td><td style="width:100%;background-color:rgb(255, 243, 221);background-position-x:0%;background-position-y:0%;background-repeat:repeat;background-attachment:scroll;background-image:none;background-size:auto;background-origin:padding-box;background-clip:border-box;padding-top:5.25pt;padding-right:3.75pt;padding-bottom:5.25pt;padding-left:11.25pt;" width="100%"><div><div><p class="qt-MsoNormal" style=""><b><span style="color:rgb(0, 56, 101);">This message may be from an external email source.</span></b><span style="color:rgb(0, 56, 101);"></span><br></p></div><div><p class="qt-MsoNormal" style=""><span style="color:rgb(0, 56, 101);"><span class="size" style="font-size:9pt;">Do not select links or open attachments unless verified. Report all suspicious emails to Minnesota IT Services Security Operations Center.</span></span><br></p></div></div></td></tr></tbody></table><p class="qt-MsoNormal"> <br></p><div class="qt-MsoNormal" style="text-align:center;" align="center"><hr width="100%" size="2" align="center"><br></div><div><h2>Expected behavior and actual behavior.<br></h2><p>Using GET and HEAD as HTTP commands should return the same headers.<br></p><h2>Steps to reproduce the problem.<br></h2><p>Mapserver is behind apache, with the only interesting configuration is :<br></p><pre><code>   RewriteEngine on</code><br></pre><pre><code>    RewriteRule ^/maps/([^/]*)$ /wxs/mapserv?map=/maps/$1.map [PT,QSA]</code><br></pre><p>The version installed is 7.6.2<br></p><p>When I call my server with curl, for example with this call, I receive a png, with the according header <code><span class="size" style="font-size:10pt;">Content-Type: image/png</span></code><br></p><p><code><span class="size" style="font-size:10pt;">curl <a href="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</a></span></code><br></p><p>When I call the exact same url with <code><span class="size" style="font-size:10pt;">curl -I</span></code> to receive only the headers (for monitoring purpose), the headers are different, especially the Content-Type : <code><span class="size" style="font-size:10pt;">Content-Type: text/html</span></code><br></p><p>The difference is that curl use the command HEAD instead of GET, but the headers should be equivalent.<br></p><h2>Operating system<br></h2><p>Debian bullseye 64 bit<br></p><h2>MapServer version and installation method<br></h2><p>7.6.2 version, I am not sure of the way it was installed<br></p><p style="-moz-text-size-adjust:none;"><span style="color:rgb(102, 102, 102);"><span class="size" style="font-size:12pt;">—<br> Reply to this email directly, <a href="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"> view it on GitHub</a>, or <a href="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"> unsubscribe</a>.<br> You are receiving this because you are subscribed to this thread.</span></span><span style="color:rgb(102, 102, 102);"><span class="size" style="font-size:12pt;"><img style="width:0.0104in;height:0.0104in;" id="qt-_x0000_i1026" src="https://github.com/notifications/beacon/AAMGN67DKFJEKMGLFFWU77DWWJICRA5CNFSM6AAAAAAUT75DNKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHF3VZMBM.gif" width="1" height="1" border="0"></span></span><span style="color:rgb(102, 102, 102);"><span class="size" style="font-size:1pt;">Message
 ID: <<a href="mailto:MapServer/MapServer/issues/6826@github.com">MapServer/MapServer/issues/6826@github.com</a>></span></span><span style="color:rgb(102, 102, 102);"><span class="size" style="font-size:12pt;"></span></span></p></div></div><div>_______________________________________________<br></div><div>MapServer-dev mailing list<br></div><div><a href="mailto:MapServer-dev@lists.osgeo.org">MapServer-dev@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br></div><div><br></div></blockquote><div><br></div></body></html>