curl-and-php
RE: question: ssl through proxies
Date: Tue, 5 Sep 2006 19:47:31 +0200 (CEST)
On Tue, 5 Sep 2006, Gaetano Giunta wrote:
> if there is a better way in curl-php to have curl feed the http headers to
> my app, it would be a welcome enhancement...
You can setup a header callback.
> Well, duh. I had read both RFC 1945 and 2616 up to now, and nowhere found
> mentioned this particular "behaviour", e.g. getting an HTTP/1.0 200 response
> header followed by two CRLF followed by the real HTTP/1.0 response.
>
> Since the only spec I could find for this particular case is the one
> "luotonen 01" you also mention on http://curl.haxx.se/rfc/, where this
> particular 'Reason-Phrase' is mentioned and I have precious few https
> tunnelling proxies to test against, I just tought I might ask to the
> powers-that-be (of http ;)
CONNECT is also described in RFC2817.
> Afaict looking for a particular reason-phrase is dead wrong, but then how am
> I supposed to know I should expect two seaparate sets of HTTP 200 status
> lines? Maybe I would be better off only/always doing this check when using
> proxy AND https?
CONNECT is a request, a request gets response-headers back. CONNECT is in
libcurl's case always followed by a request to the server that it has
"tunneled" through to. That request too gets response-headers back.
So, if you do a CONNECT expect headers back as a response to that. If you do
another reqest, expect headers back from that. If you do a POST or PUT with
Expect: 100-continue, expect possibly two sets of headers back.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2006-09-05