Murcia has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, 
I have the following code in my cgi-script
@array is long! 1500 chars maybe
$cgi->a({-href=>"/cgi-bin/script.pl?id=@array"}, scalar @array);
this link works in Mozilla (1.3), but not in IE! Why?
What to do that it works in IE (6.02800)?
I think that it is too long for IE (get versa post, or?)

Thanks in advance
Murcia

Replies are listed 'Best First'.
Re: IE href cgi
by Abstraction (Friar) on Aug 06, 2003 at 17:20 UTC
    Check out this Microsoft Knowledge Base Article - 208427

    The important part:

    INFO: Maximum URL Length Is 2,083 Characters in Internet Explorer
Re: IE href cgi
by waswas-fng (Curate) on Aug 06, 2003 at 18:54 UTC
    To avoid max URL len issues on browsers try storing most of the session data locally on the server, and only have the sessionID and action type in the URL. Many different things can come into play with very long URLs, proxy servers, different browsers and firewalls all can act differently when exposed to them. Do a super search for "cgi session data" for more info.

    -Waswas
Re: IE href cgi
by fglock (Vicar) on Aug 06, 2003 at 18:01 UTC

    The array will interpolate with spaces, which may break your URL in some browsers. Try using '+' instead:

    ...?id=" . join( '+', @array )