Re: middleware, sort of (same question, different posting software)

From: Tigerhillside (Tigerhillsideremove_at_removenetscape.net)
Date: 01/24/04


Date: Fri, 23 Jan 2004 23:45:04 GMT

In comp.lang.perl, Tigerhillside
<Tigerhillsideremove@removenetscape.net>, I read and responded

>I forgot I had a "real" newsreader available. So here is the
>question you will see "soon" when google decides to post my other
>question.
>
>
>I have a server side script that takes a user's input in a form,
>packages it, and sends it on to an external server. The external
>server will then send back the response via http to my server
>script. But not the same script. And there is the rub, I don't
>know how the second script can get to my user.
>
>Let me diagram this for clarity.
>
>The logic is this:
>
>Client -> me -> XS (external server) -> me -> client
>
>Simple enough.
>
>But as I see it, programmatically it goes like this:
>
>browser -> me script1 -> XS
>
>XS -> script2 -> browser
>
>I can't open a pipe to the external server, I only have http
>access. So I can't get the response back in the same script
>AFAICT. My script1 and script2 know enough to know it is the same
>transaction, but script2 can't find the browser/script1
>conversation.
>
>I suppose I could have script1 wait around until script2 writes a
>token of some sort saying it got the results. That seems like a
>hack, but if that is how it is done I can do that. Wait something
>like 30 seconds, checking every second for the token. Is that how
>it is done or is there a better way? Something like a named pipe
>or something that script2 can get its hands on?
>
>I know this is not, strictly speaking, a perl language question,
>but it is on topic.
>
>
>Thanks very much in advance.
>

Ok, I won't say I'm an idiot. After all, there are few bette ways
to solve a problem on your own than to ask someone for help. My
problem was that I misunderstood some documentation. (So much for
RTFM as a silver bullet.) There are two ways to do what I needed
from the external server. I could send my user to their web page,
in which case the response came back to one of my server pages.
Or I could just send the information, in which case I get a
response. But I thought that the only way I got my response was
via the other web page. Since I can get the response from the
calling script I can just use the LWP module and everything will
be fine. Thanks for being there anyway.



Relevant Pages

  • Re: CGI: want no response from server
    ... > page (the script does some background task on the server). ... But in brief the answer is Status: 204 No response ... All CGI scripts must return some kind of appropriate ...
    (comp.lang.perl.misc)
  • Net::FTP, GET transfers only a part of a file
    ... I'm having a mysterious problem with my script. ... Net::FTP to transfer files from a remote server and only a ... waiting for response which never arrives. ... response and the server waits that the client would read ...
    (comp.lang.perl.modules)
  • Re: How to set Timeout with URL Moniker?
    ... unless the script takes more than about 60 seconds to return any HTTP ... as a response. ... HTTP connection, and thus never receives the "ok" from the server. ...
    (microsoft.public.vc.language)
  • RE: Window.open javascript
    ... creation of this script occur on some event handler whose event is only ... server and send this script on a response ...
    (microsoft.public.dotnet.languages.csharp)
  • middleware, sort of (same question, different posting software)
    ... I have a server side script that takes a user's input in a form, ... I can't open a pipe to the external server, ... Something like a named pipe ...
    (comp.lang.perl)