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

I have this pre-existing script that redirects to another CGI script. I was hoping to tack on one additional parameter in the redirection but my attempt at doing so is failing. The redirection occurs fine without the additional parameter so it looks like it's hitting a size limitation. I've never had the need to redirect in "GET" fashion before so I was wondering what way I can redirect with more content as if I were using a form with the POST method. print $q->header(-location => $forwardScript);

Replies are listed 'Best First'.
Re: Redirect without adding to URL
by 1nickt (Canon) on Nov 30, 2017 at 15:32 UTC

    Hi rpike,

    • What does "failing" mean?
    • What does the log contain?
    • Have you tried to test your theory about size limitation?
    • What does the CGI documentation say about limitations on the redirect URL?
    • How do you "tack on" the extra parameter (show the code)?
    • What is the resulting URL?
    • What happens when you request that URL directly with a client?

    Those are some examples of information that would be useful for anyone trying to assist you.


    The way forward always starts with a minimal test.
Re: Redirect without adding to URL ( POST redirect )
by beech (Parson) on Dec 01, 2017 at 01:17 UTC

    Hi ,

    Are these two scripts on the same webserver?

    A "post redirect" is a http thing that exists (: http 307 :) but you can't add to the http body/postdata, you can only change the url/location header