Gisle Aas wrote:
>
> "bob tod" <[EMAIL PROTECTED]> writes:
>
> > I need to be able to push a header into the request object without LWP
> > converting the case of the key.
> >
> > eg. i do:
> >
> > $request->push_header("xxx-xxx-xxx","text");
> >
> > The actual headers recieved by the server are:
> >
> > "Xxx-Xxx-Xxx"->"text"
> >
> > Can this be over-ruled?????
>
> Actually, no.  The server is broken if this matters.  You did not try
> to explain why you need to do this.  If you still insist here are some
> options you might try:
>
>   - hack the HTTP::Headers module to do what you want
>   - use Net::HTTP directly

Hi Bob.

Perhaps a little better than hacking the module is to mess with the
package hash %standard_case in the calling code?

  $HTTP::Headers::standard_case{"xxx-xxx-xxx"} = "xxx-xxx-xxx";

would do the trick, where the hash key is the all-lower-case
version of the header. The idea makes me squirm though, and you'd
be breaking OO encapsulation rules. Just don't tell anybody that
I suggested it. As Gisle says, if the header name is case-sensitive
then your server is terminally ill.

Rob


Reply via email to