http://www.perlmonks.org?node_id=838456


in reply to Get the order of HTTP request headers

I think you will need to parse the request yourself. HTTP::Headers actively (re)orders the headers on output, and I found overriding that to be nigh-impossible without cut'n'pasting lots of the relevant code out of HTTP::Headers.

From looking at the source, HTTP::Headers::Util might be suitable to implement your own header parsing.

  • Comment on Re: Get the order of HTTP request headers

Replies are listed 'Best First'.
Re^2: Get the order of HTTP request headers
by arc_of_descent (Hermit) on May 05, 2010 at 08:13 UTC

    The problem is not in HTTP::Headers as I see it. As soon as I pass the %ENV hash or even CGI->http to HTTP::Headers->new(), I lose the order of the headers.

    Thus I think I need to approach this problem by looking closer to the web server (Apache in this case) rather than rely on CGI.