[mapserver-dev] Content-Type versus Content-type

bartvde at osgis.nl bartvde at osgis.nl
Fri Jan 15 08:50:50 EST 2010


Hi Jan,

thanks for the info, so it is case-insensitive, I did not know. I jumped
to a conclusion here incorrectly, since it indeed has nothing to do with
the case-sensitivity of Content-type.

However, my problem is that Content-type ends up in the body, as you can
see with the verbose curl output, and I have no idea what causes this.
Does anyone have a clue why it ends up in the body of the message, and
therefore kills the validity of the XML?

[bart at hades mapserver-5.2.0-gdal256]$ curl
"http://145.50.148.45:8081/cgi-bin/mapserv-1501?map=/data/OGC_UMN_services/dtb_rws.map&LAYERS=AAA805&FORMAT=image%2Fpng&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A28992&BBOX=80410.227496%2C433911.299646%2C84251.633167%2C435237.721003&X=462&Y=108&INFO_FORMAT=text/xml&QUERY_LAYERS=AAA805&FEATURE_COUNT=1&WIDTH=1031&HEIGHT=356"
--verbose
* About to connect() to 145.50.148.45:8081
* Connected to rws-svl023i.rws.nwr.local (145.50.148.45) port 8081
> GET
/cgi-bin/mapserv-1501?map=/data/OGC_UMN_services/dtb_rws.map&LAYERS=AAA805&FORMAT=image%2Fpng&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A28992&BBOX=80410.227496%2C433911.299646%2C84251.633167%2C435237.721003&X=462&Y=108&INFO_FORMAT=text/xml&QUERY_LAYERS=AAA805&FEATURE_COUNT=1&WIDTH=1031&HEIGHT=356
HTTP/1.1
User-Agent: curl/7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6
OpenSSL/0.9.7a ipv6 zlib/1.1.4
Host: 145.50.148.45:8081
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

< HTTP/1.1 200 OK
< Date: Fri, 15 Jan 2010 13:48:46 GMT
< Server: Apache
< Transfer-Encoding: chunked
< Content-Type: text/xml
Content-type: application/vnd.ogc.se_xml

<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM
"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1">
<ServiceException>
msReturnPage(): Unable to access file. blank.html
</ServiceException>
</ServiceExceptionReport>
* Connection #0 left intact
* Closing connection #0

Best regards,
Bart

> Hi Bart,
>
> The HTTP specification (http://tools.ietf.org/html/rfc2616) says:
>
>
>
>       4.2 Message Headers
>
>     HTTP header fields, which include general-header (section 4.5
> <http://tools.ietf.org/html/rfc2616#section-4.5>),
>     request-header (section 5.3
> <http://tools.ietf.org/html/rfc2616#section-5.3>), response-header
> (section 6.2  <http://tools.ietf.org/html/rfc2616#section-6.2>), and
>     entity-header (section 7.1
> <http://tools.ietf.org/html/rfc2616#section-7.1>) fields, follow the
> same generic format as
>     that given inSection 3.1 of RFC 822
> <http://tools.ietf.org/html/rfc822#section-3.1>  [9
> <http://tools.ietf.org/html/rfc2616#ref-9>]. Each header field
> consists
>     of a name followed by a colon (":") and the field value. Field names
>     are case-insensitive.
>
> What's your problem whith a lower case "t"? Content-type is an
> entity-header, so applications should accept both T and t .
>
> Jan
>
>
> On 15-1-2010 14:04, bartvde at osgis.nl wrote:
>> Hi list,
>>
>> I am having issue with Mapserver outputting Content-type in the body
>> instead of in the headers. I found that this is because Mapserver
>> outputs
>> Content-type instead of Content-Type in a lot of cases. Should this not
>> be
>> fixed in the source? Am I the only one running into this, and if so, how
>> come?
>>
>> For instance:
>>
>> [bart at hades mapserver-5.2.0]$ curl
>> "http://145.50.148.45:8081/cgi-bin/mapserv?map=/data/OGC_UMN_services/dtb_rws.map&LAYERS=AAA805&FORMAT=image%2Fpng&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A28992&BBOX=80410.227496%2C433911.299646%2C84251.633167%2C435237.721003&X=462&Y=108&INFO_FORMAT=text/xml&QUERY_LAYERS=AAA805&FEATURE_COUNT=1&WIDTH=1031&HEIGHT=356"
>> --verbose
>> * About to connect() to 145.50.148.45:8081
>> * Connected to rws-svl023i.rws.nwr.local (145.50.148.45) port 8081
>>
>>> GET
>>>
>> /cgi-bin/mapserv?map=/data/OGC_UMN_services/dtb_rws.map&LAYERS=AAA805&FORMAT=image%2Fpng&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_xml&SRS=EPSG%3A28992&BBOX=80410.227496%2C433911.299646%2C84251.633167%2C435237.721003&X=462&Y=108&INFO_FORMAT=text/xml&QUERY_LAYERS=AAA805&FEATURE_COUNT=1&WIDTH=1031&HEIGHT=356
>> HTTP/1.1
>> User-Agent: curl/7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6
>> OpenSSL/0.9.7a ipv6 zlib/1.1.4
>> Host: 145.50.148.45:8081
>> Pragma: no-cache
>> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
>>
>> <  HTTP/1.1 200 OK
>> <  Date: Fri, 15 Jan 2010 12:46:24 GMT
>> <  Server: Apache
>> <  Transfer-Encoding: chunked
>> <  Content-Type: text/xml
>> Content-type: application/vnd.ogc.se_xml
>>
>> <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
>> <!DOCTYPE ServiceExceptionReport SYSTEM
>> "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
>> <ServiceExceptionReport version="1.1.1">
>> <ServiceException>
>> msReturnPage(): Unable to access file. blank.html
>> </ServiceException>
>> </ServiceExceptionReport>
>> * Connection #0 left intact
>> * Closing connection #0
>>
>> TIA.
>>
>> Best regards,
>> Bart
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
>




More information about the mapserver-dev mailing list