curl-library
Re: Stripped keep-alive header
Date: Wed, 11 Jan 2006 17:19:31 +0900
Also, I failed to mention that in verbose mode, curl displays the
headers correctly.
However as below, ethereal says the contrary.
On 1/11/06, Allen Chan <innovation101_at_gmail.com> wrote:
> Hi all,
>
> I have a problem and a question:
>
> (1)
>
> When using libcurl, I noticed that my Proxy-Connection: Keep-Alive header gets
> stripped and instead turned into ----------------: ---------- (exact
> number of dash noted)
>
> I tracked this through ethereal. It's not the proxy because I've watched other
> programs go through it without getting stripped of the same header.
>
> I'm using the libcurl 7.15.1, built with OpenSSL, zlib, and kerberos on Windows
> using Visual C++ 6.0 sp6.
>
> I used it like this:
>
> struct curl_slist *headerlist=NULL;
> headerlist = curl_slist_append(headerlist, "Content-Length: 0");
> headerlist = curl_slist_append(headerlist, "Proxy-Connection: Keep-Alive");
> headerlist = curl_slist_append(headerlist, "Pragma: no-cache");
>
> I need the keep-alive header to get a persistent connection through HTTP 1.0
> for video/audio conferencing.
>
> And no, the connection does not get kept alive without the header.
> (Possibly by the proxy, I know, but then IE gets through) I've tried
> mimicking the IE requests by following ethereal, and by far this is
> the only perceptible difference.
>
>
> (2)
>
> Is there a way to just HTTP CONNECT to a server?
>
> Short of modifying libcurl, what I did was tunnel through the proxy with either
> NTLM or Kerberos auth (I get the connects here, and I need the auth).
> Then CURLOPT_CUSTOMREQUEST to change the GET by the CURLOPT_URL
> request into non-parsable (by the proxy) data.
>
> Here's the exact sequence:
>
> SND. CONNECT xxx.xxx.xxx.xxx:443 HTTP/1.0 NTLM_SSP_NEGOTIATE
> RCV. HTTP/1.1 Proxy Authentication Required (proxy server)
> SND. CONNECT xxx.xxx.xxx.xxx:443 HTTP/1.0 NTLM_SSP_AUTH, User xxx
> RCV. HTTP/1.0 Connection established (web server)
> SND. Continuation or Non-Http traffic (this one is the GET request
> turned to garbage)
>
> The above sequence is okay for my needs. I was just wondering if there
> was an easier way.
>
> Am I making it hard for myself?
>
> I would be extremely grateful for any help, Thanks!
>
> Btw, i noticed that the download page still doesn't have the latest
> libcurl binaries of 7.15.1 on Windows XP / MSVC. I could provide mine.
> If you want zlib, ssl, and kerberos too that is.
>
Received on 2006-01-11