Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the HTTP-Tiny CPAN distribution.

Report information
The Basics
Id: 79156
Status: resolved
Priority: 0/
Queue: HTTP-Tiny

People
Owner: Nobody in particular
Requestors: mario.ivancic [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Preserving case in HTTP headers
Date: Thu, 23 Aug 2012 08:16:58 +0200
To: bug-HTTP-Tiny [...] rt.cpan.org
From: Mario Ivancic <mario.ivancic [...] gmail.com>
Hello, I'm using HTTP-Tiny-0.022 and ActiveState Perl 5.8.7 on Windows XP. I have web app that I need to talk to using HTTP POST method. The app use some custom HTTP headers that are not case insensitive so it's crucial to preserve case of headers, at least non-standard ones. Quick hack is to change definition of list HeaderCase from 'my %HeaderCase = (..)' to 'our %HeaderCase = (..)' and then add more headers to it like this: $HTTP::Tiny::Handle:: HeaderCase{'some-header'} = 'SoMe-HeadeR'; -- Best regards, Mario.
Subject: Re: [rt.cpan.org #79156] Preserving case in HTTP headers
Date: Thu, 23 Aug 2012 12:16:12 -0400
To: bug-HTTP-Tiny [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Thu, Aug 23, 2012 at 2:17 AM, Mario Ivancic via RT < bug-HTTP-Tiny@rt.cpan.org> wrote: Show quoted text
> I'm using HTTP-Tiny-0.022 and ActiveState Perl 5.8.7 on Windows XP. > I have web app that I need to talk to using HTTP POST method. The app use > some custom HTTP headers that are not case insensitive so it's crucial to > preserve case of headers, at least non-standard ones. > Quick hack is to change definition of list HeaderCase from 'my %HeaderCase > = (..)' to 'our %HeaderCase = (..)' and then add more headers to it like > this: > > $HTTP::Tiny::Handle:: > HeaderCase{'some-header'} = 'SoMe-HeadeR'; >
I'm sorry to hear that you're having trouble. However, it looks like the web app you're connecting to is not actually HTTP 1.1 compliant. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 where field names are defined as case insensitive. HTTP::Tiny only does HTTP 1.1 -- if you need custom handling, then I recommend a different HTTP client. Regards, David