[Mapserver-users] WMS using libCurl fails because of a wrong HTTP User Agent

Norbert Schauerte-Lueke nsl at regio-gis-planung.de
Thu Sep 25 04:46:26 EDT 2003


Hi Daniel,

thank you very much. It works!!!

 Norbert


On 24 Sep 2003 at 15:07, Daniel Morissette wrote:

> Norbert Schauerte-Lueke wrote:
> > 
> > still there is a problem with the UMN wms-client and a propritary WMS 
> > Server. The diagnostic of the problem show that the WMS Client will 
> > only send an image when the HTTP User Agent will be MSIE or 
> > Mozilla. libCurl sets an other HTTP User Agent (somethink like CURL 
> > Version ...). Is there a possibility to change this HTTP User Agent e.g. 
> > via an environment variable.
> > 
> > If anybody can give a hint, I will be very thankfull
> > 
> 
> I find it really odd that a WMS server would cehck the user agents 
> before responding to client requests, but anyway, there is apparently a 
> way to control the user agent value with Libcurl.  If you can build from 
> source, then you could add the following line to maphttp.c around line 
> 339, just after the line that sets CURLOPT_URL:
> 
>    curl_easy_setopt(http_handle, CURLOPT_USERAGENT, "whatever you want");
> 
> Daniel
> -- 
> ------------------------------------------------------------
>   Daniel Morissette               morissette at dmsolutions.ca
>   DM Solutions Group              http://www.dmsolutions.ca/
> ------------------------------------------------------------
> 


R E G I O  G I S  +  P L A N U N G   G m b H
____________________________________________
www.regio-gis-planung.de

Falkstraße 73-77,  47058 Duisburg
Tel. 0203 / 30511-360  
Fax: 0203 / 30511-364

Hainhölzer Strasse 5,  30159 Hannover
Tel. 0511 / 123577-0   
Fax: 0511 / 123577-11






More information about the mapserver-users mailing list