You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Matt Orlofsky <mo...@rlwinc.com> on 2002/04/03 00:22:57 UTC
Request-URI Too Large
I'm attempting to use LWP::UserAgent and via a post, HTTP::Request->new(POST
=> $url);, send a very large URI. This URI request exceeds the
LimitRequestLine of 8190 bytes. Which I understand to be the max the Apache
server will allow. I don't believe this limit can be increased and I think
the only way to decrees it is to recompile. If there is a way to increase
this limit, that would be great. Otherwise, I was wondering if perhaps the
URI gets sent to a buffer somewhere in the Apache::ASP? And if maybe there
is a way to empty that buffer before it gets full and returns the 414 error?
Thanks in advance.
Matt
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
RE: Request-URI Too Large
Posted by Stephen Bardsley <sb...@rlwinc.com>.
Matt:
Try this...
Client code
=============================
#!/usr/bin/perl -w
use LWP;
use strict;
my $request = HTTP::Request->new(POST => 'http://24.58.176.170/demo/test-post.asp');
$request->content_type( 'application/x-www-form-urlencoded' );
$request->content( 'name=' . 'junk ' x 4096 );
my $ua = LWP::UserAgent->new;
my $response = $ua->request( $request );
if ( $response->is_success )
{
print $response->content."\n\n";
}
else
{
print $response->error_as_HTML."\n\n";
}
Apache::ASP code
==============================
<% my $data = $Request->Form()->{name} %>
The data is: <%=$data%>
The size is: <%=length($data)%>
Enjoy!
Steve
_____________________
Stephen Bardsley
RLW Inc.
Malta, NY
> -----Original Message-----
> From: Joshua Chamas [mailto:joshua@chamas.com]
> Sent: Tuesday, April 02, 2002 5:25 PM
> To: Matt Orlofsky
> Cc: asp@perl.apache.org
> Subject: Re: Request-URI Too Large
>
>
> Matt Orlofsky wrote:
> >
> > I'm attempting to use LWP::UserAgent and via a post, HTTP::Request->new(POST
> > => $url);, send a very large URI. This URI request exceeds the
> > LimitRequestLine of 8190 bytes. Which I understand to be the max the Apache
> > server will allow. I don't believe this limit can be increased and I think
> > the only way to decrees it is to recompile. If there is a way to increase
> > this limit, that would be great. Otherwise, I was wondering if perhaps the
> > URI gets sent to a buffer somewhere in the Apache::ASP? And if maybe there
> > is a way to empty that buffer before it gets full and returns the 414 error?
> > Thanks in advance.
> >
>
> This error occurs in apache before Apache::ASP gets to see the request.
> You should consider sending the GET parameter $Request->QueryString
> as POST data to be seen instead in $Request->Form. There are fewer
> practical limits on the amount of POST data you can send.
>
> --Josh
> _________________________________________________________________
> Joshua Chamas Chamas Enterprises Inc.
> NodeWorks Founder Huntington Beach, CA USA
> http://www.nodeworks.com 1-714-625-4051
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
> For additional commands, e-mail: asp-help@perl.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: Request-URI Too Large
Posted by Joshua Chamas <jo...@chamas.com>.
Matt Orlofsky wrote:
>
> I'm attempting to use LWP::UserAgent and via a post, HTTP::Request->new(POST
> => $url);, send a very large URI. This URI request exceeds the
> LimitRequestLine of 8190 bytes. Which I understand to be the max the Apache
> server will allow. I don't believe this limit can be increased and I think
> the only way to decrees it is to recompile. If there is a way to increase
> this limit, that would be great. Otherwise, I was wondering if perhaps the
> URI gets sent to a buffer somewhere in the Apache::ASP? And if maybe there
> is a way to empty that buffer before it gets full and returns the 414 error?
> Thanks in advance.
>
This error occurs in apache before Apache::ASP gets to see the request.
You should consider sending the GET parameter $Request->QueryString
as POST data to be seen instead in $Request->Form. There are fewer
practical limits on the amount of POST data you can send.
--Josh
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks Founder Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051
---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org