Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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.

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2018-08-20 22:36 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (196 votes). Check out past polls.