HTTPS Posts seem to be lacking the content (libwww-perl)

HTTPS Posts seem to be lacking the content (libwww-perl)

am 03.01.2006 19:56:40 von James Steele

I was recently attempting to use a script to automate doing some tasks,
over a HTTPS connection (which used session cookie authentication).
However I couldn't see the content (i.e. my username and password) get
posted in the request for logging in.

I had a bit of a dig around the code and it looks like in
LWP/Protocol/http.pm looked like it needed the content passing to the
format_request function from Net/HTTP/Modules.pm (as the @h header array
should be even if it only contains headers names+values, if it is odd it
makes sense that the final element is the "content").
So from my limited understanding of perl, the following line should be
added (in http.pm) as such

}
+ push @h, $$content_ref;

my $req_buf = $socket->format_request($method, $fullpath, @h);


However this is on version 1.68, and having a look at the head of the
CVS tree (1.70 I believe) it appears that in come cases the content is
now concatenated (under certain conditions) to the request later on.
Although this would seem to contradict the API provided in Modules.pm.

Anyway, I thought I would just point it out what I found (just in case),
and if I'm barking up the wrong tree someone will hopefully show me the
error of my ways :)

Cheers,
James