in reply to HTTP Post with more than 256 chars
Though for larger submits, use POST if the program accepts them so your GET doesn't get truncated.#!/usr/bin/perl use LWP::UserAgent; use HTTP::Request::Common; my @multi = (1..10); my $ua = new LWP::UserAgent; my $res = $ua->request(GET 'http://www.sn.no', action=>'submit', multi +vals=>[@vals]); if ($res->is_success) { }else{ }
Looking through the RFC I noticed this line.
The HTTP protocol does not place any a priori limit on the length of
a URI. Servers MUST be able to handle the URI of any resource they
serve, and SHOULD be able to handle URIs of unbounded length if they
provide GET-based forms that could generate such URIs. A server
SHOULD return 414 (Request-URI Too Long) status if a URI is longer
than the server can handle (see section 10.4.15).
Note: Servers should be cautious about depending on URI lengths
above 255 bytes, because some older client or proxy implementations
may not properly support these lengths.
This might be biting you even when you correct your code. But you just have to change GET to POST and as long as the server accepts that method, you should be fine.
|
|---|