The limit is at least 4096 characters. After that it depends on the server and proxies in between. Try this instead. You don't need multi-part unless you are uploading files, etc
#!/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{ }
Though for larger submits, use POST if the program accepts them so your GET doesn't get truncated.

-Lee

"To be civilized is to deny one's nature."
update: sevensven is correct. I should have said "usually at least" instead of "at least 4096".
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.

In reply to Re: HTTP Post with more than 256 chars by shotgunefx
in thread HTTP Post with more than 256 chars by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.