Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl Monk, Perl Meditation
 
PerlMonks  

Re: cannot do a POST with proxy

by snoopy (Deacon)
on Sep 14, 2009 at 01:29 UTC ( #795046=note: print w/ replies, xml ) Need Help??


in reply to cannot do a POST with proxy

Rather than "working well", this code happens to work when there is no buffering or true bidirectional communication between the client and the server at any stage. This is breaking down when you try a POST.

You'll need to restructure your two while loops in your fetch method, to ensure you only read from the client or server when they are ready to write. perlipc shows an example, using select(), however, IO::Select should work here.


Comment on Re: cannot do a POST with proxy
Select or Download Code
Re^2: cannot do a POST with proxy
by majinbis (Initiate) on Sep 17, 2009 at 06:03 UTC
    Hi. Thanks for your response. I tried implementing IO::Select but it still did the same thing (unless I implemented it the wrong way). Tried a few tweaks and it worked on the latest IE but I'm still having the same problems with FF/Chrome and older versions of IE. it seems to be doing the following: 1. When I do a POST, it send the request with the right headers as per RFC1945 (i'm only implementing HTTP/1.0) gets the headers but stops at the blank line before the body so I think what happens is that the remote host is still waiting for the body

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2014-04-21 00:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (489 votes), past polls