Forum

"X-" HTTP header issue

Rahul
22 August 2012, 10:56

Hi,
I send a http header "X-HDR" from my website to CGI. When i send this header using Firefox browser it goes successfully as "HTTP_X_HDR" to CGI but when i send it using IE8(version: 8.0.7601.17514) browser it doesn't go to CGI. I inspect packets using wireshark before sending it to WebServer, it shows that X-HDR is converted into x-hdr (i.e. in small letters) in case of mentioned IE8 version while remains same(i.e X-HDR) in case of Firefox. I use hiawatha WebServer-7.4. Is it possible that hiawath stops passing this http header to CGI because of small letters.
Hugo Leisink
23 August 2012, 12:17
Grr... I really hate Internet Explorer. Crappy shit browser. Anyway, if you change line 225 in envir.c from
if (strncmp(headerfields->data, "X-", 2) == 0) {

to
if (strncasecmp(headerfields->data, "X-", 2) == 0) {

your problem will be fixed. I changed this also in the coming 8.5 release.
Rahul
23 August 2012, 14:56
Thanks....my problem is fixed.
This topic has been closed.