HTTP::Request problem with reading long uri

N

Newbie

Code:

my $ua = LWP::UserAgent->new;

my $request = HTTP::Request->new(GET => $QueryString);
Here $QueryString is of the form:
http://<machine on network>/<somestring>/jsp_page.jsp?personauri=<something>&chaturi=<some
other thing>&welcomenote=Hi
There!>

$response = $ua->request($request);
Here the request method of UserAgent is called -->
(Needless to say the functions request and simple_request are defined
in UserAgent.pm in perl package, and are standard )
sub request
{
my($self, $request, $arg, $size, $previous) = @_;

LWP::Debug::trace('()');

my $response = $self->simple_request($request, $arg, $size);
....
}

Now when simple_request is called,
sub simple_request
{
my($self, $request, $arg, $size) = @_;
local($SIG{__DIE__}); # protect agains user defined die handlers
my($method, $url) = ($request->method, $request->uri);
....
}

Here, $method is getting the value 'GET', but $url is getting <undef>.
The $request object is properly built. Though 'content' has nothing,
but method has 'GET' and uri also has its valuewhen in function
request, but somehow, it is not assigned to $url on the LHS.

If it has something to do with the length of the uri, then even just
http://<machine on network>/<somestring>/jsp_page.jsp as $QueryString
is not working.
Any clues what could be the reason for $url not getting the value in
simple_request function?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top