Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

domm (4030)

  (email not shown publicly)

Just in case you like to know, I'm currently full-time father of 2 kids, half-time Perl hacker, sort-of DJ, bicyclist, no longer dreadlocked and 33 years old

I'm also head of [], maintainer of the CPANTS [] project, member of the TPF Grants Commitee [] and the YAPC Europe Foundation [].

I've got stuff on CPAN [], held various talks [] and organised YAPC::Europe 2007 in Vienna [].

Journal of domm (4030)

Thursday April 06, 2006
03:35 AM

LWP and HTTP/1.1

[ #29239 ]

So, to conform to some anal webservice I had to issue a HTTP-request with 'HTTP/1.1' in the 'headers' (actually in the first line posted to the server, like 'POST /foo/bar HTTP/1.1').

First I wondered that HTTP::Request isn't issuing it by default (or at least 'HTTP/1.0'). But the requests only started with 'POST /foo/bar'. After some futile paging through LWP docs, I greped the source code, and after some fiddling discovered the protocol method in HTTP::Message.

Now, HTTP::Request ISA HTTP::Message, and states so in the docs: "HTTP::Request is a subclass of HTTP::Message and therefore inherits its methods.". I still missed this point, which caused a 30-minutes detour. And I can only blame me, Grr

But now I know, and for future (google) reference:

my $req=HTTP::Request->new(...);

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.