in reply to LWP Redirection Problem

It seems to me that what I really want is a "redirect", but you can't redirect a POST request (or can you?)

According to the spec it's possible, but in practice I've found the opposite to be true (see the caveat in the aforementioned link); meaning you're out of luck unless the external CGI can be coaxed into accepting GET requests.

Some alternatives to consider, though...

  1. The browser shows the URL of my progrma rather than the external CGI program.

Skip a Perl intermediary altogether, and use JavaScript to do your param munging with an onClick/onSubmit.

  1. The relative URLs within the displayed content are all broken as the browser is interpreting them as relative to my program.

Have your script include a <base href="http://url.to/the/external/CGI" /> in it's output so that relative URLs are correctly interpreted by thr browser.

    --k.


Replies are listed 'Best First'.
Re: Re: LWP Redirection Problem
by davorg (Chancellor) on Sep 02, 2002 at 11:06 UTC
    Some alternatives to consider, though...
    1. The browser shows the URL of my progrma rather than the external CGI program.
    Skip a Perl intermediary altogether, and use JavaScript to do your param munging with an onClick/onSubmit.

    Sorry. not really an option. Many people (very sensibly) diable JavaScript.

    2. The relative URLs within the displayed content are all broken as the browser is interpreting them as relative to my program.
    Have your script include a <base href="http://url.to/the/external/CGI" /> in it's output so that relative URLs are correctly interpreted by thr browser.

    As I understand it, a "Content-Base:" header will work just as well and will be easier to add. I'm looking at that option now.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg