Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: LWP Redirection Problem

by Kanji (Parson)
on Sep 02, 2002 at 10:52 UTC ( [id://194562]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://194562]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-28 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found