cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Handling transparent proxy e.g. NetCache (HTTP VIA)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 19 Aug 2003 10:49:48 +0200 (CEST)

On Tue, 19 Aug 2003, ruffnex wrote:

> I am accessing streaming audio on: http://64.236.34.141:80/stream/1019
>
> With libcurl 7.10.3, my HTTP header parsing routine returns:
>
> HTTP/1.1 200 OK
> Date: Thu, 14 Aug 2003 16:10:55 GMT
> Connection: close
> Via: 1.0 shkcah02 (NetCache NetApp/5.1R2D16)
>
> With the command line version of 7.10.3, I get the following:
>
> ICY 200 OK
> icy-genre: Modern Jazz
> icy-url: http://www.di.fm

How can they differ like this? Doesn't the server return the same set of
headers on the different requests?

> With libcurl, what should I be doing to ensure I handle HTTP Via headers
> correctly?

How do you want libcurl to treat the Via header? libcurl has no particular
knowledge of that header and does nothing extra with it.

> I need to parse the HTTP headers which are normally returned (in the command
> line output). Currently, the Netcache transparent proxy is causing me to
> lose this data when I use libcurl.

curl the tool is using libcurl for getting the stuff so you can do the exact
same request with libcurl as with curl.

> I have tried adding a "Pragma: No-Cache" header, and switching on libcurl's
> FollowLocation, but the results are still the same.

I can't say I understand your problem.

Use 'curl -v' to see curl's full request, then send exactly that one using
libcurl and you should be getting the exact same response.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-19