Forum Moderators: coopster & phranque

Message Too Old, No Replies

414 Request-URI Too Large

         

blakmonk

8:41 pm on May 28, 2004 (gmt 0)

10+ Year Member



Hi guys,

I have a weird problem, I'm using HTTP::Request to
POST sone requests. But sometimes I get URI too large...

My $url string can go up to 8000 characters.

How can I fix that?

here is the sub i'm using.
sub PostRequest
{
my $url = @_[0];

use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;

my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new(POST => $url);
my $response = $ua->request($request);

return $response->content;
}

</BlakMonk>

volatilegx

11:26 pm on May 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make the URL shorter. I've read that theoretically, Apache can handle a URI that's up to 8k in size... but perhaps your server has a limit. You could experiment a bit to find the ceiling.

I'm just curious but why in heck would you need an 8,000 character URI?

blakmonk

11:49 am on May 30, 2004 (gmt 0)

10+ Year Member



hi,

well 8000 characters is not the smallest ... It's the nature of the application.

I just realized that even though I go :

my $request = HTTP::Request->new(POST => $url);

if My uri is [domain.com...] is still sent as a GET....

Let me change my question into :

How dow I change my Get request to a True post resquest?

BlakMonk

blakmonk

7:29 pm on May 31, 2004 (gmt 0)

10+ Year Member



Man I got this all wrong...

Lets close this topic, I'll open another one with the righ question