WMS client does not set user-agent
According to:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, section 14.43 User-Agent
the user-agent *should* be set.
Hi list,
the WMS client code of Mapserver does not set the User-Agent in the http
headers, and we have encountered some Apache webservers which throw an
internal server error when there is no User-Agent set. We have successfully
patched our maphttp.c with the change below and this seems to work. Would it
be a good idea to apply this patch (or a similar patch) in Mapserver's
source code?
/* set URL, note that curl keeps only a ref to our string buffer */
curl_easy_setopt(http_handle, CURLOPT_URL, pasReqInfo[i].pszGetUrl
);
// patch
char szBuf[100];
struct curl_slist *headers=NULL;
snprintf(szBuf, 100, "User-Agent: curl");
headers = curl_slist_append(headers, szBuf);
curl_easy_setopt(http_handle, CURLOPT_HTTPHEADER, headers);
// end patch
Best regards,
Bart
Change History
(4)
Cc: |
mapserver-bugs@… added
|
Owner: |
changed from mapserverbugs to dmorissette
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|