For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > January 2006 > HTTPS Posts seem to be lacking the content (libwww-perl)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

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

2006-01-10, 4:00 am

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
<snip>
}
+ push @h, $$content_ref;

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

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com