chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Problem with http-client in chicken 4.2.0


From: Peter Bex
Subject: Re: [Chicken-users] Problem with http-client in chicken 4.2.0
Date: Sun, 1 Nov 2009 14:14:54 +0100
User-agent: Mutt/1.4.2.3i

On Sun, Nov 01, 2009 at 12:53:06PM +0100, Colin Fleming wrote:
> Using netcat and stunnel to see what's going on, it's very strange, I can
> make the exact same request with http-client and curl, curl works but
> http-client returns a 403:
> 
> GET
> /accounts/ClientLogin?Email=<email>&Passwd=<passwd>&source=Google-cURL-Example&service=reader
> HTTP/1.1
> User-Agent: curl/7.19.6 (i386-apple-darwin10.0.0) libcurl/7.19.6
> OpenSSL/0.9.8k zlib/1.2.3
> Host: localhost:8889
> Accept: */*
> 
> The first works, the second gives me a BadAuthentication error. That's
> http-client pretending to be curl. My call looks like the following:
> 
> The request is to localhost:8889 for the netcat/stunnel proxy. Any ideas why
> this might fail?

Possibly your request to google results in a 302 or 301 redirect with a
cookie header, which causes a second request to be sent.  I've
recently discovered that a *lot* of popular internet software doesn't
treat cookie names in a case-insensitive fashion (which it should,
according to the relevant RFCs), and intarweb does case normalization
on cookies, causing trouble with some software.

So maybe the original request is okay, but the other one is causing the
problems because the cookie isn't sent with exactly the same name.
I don't know the google API, so I'm just guessing here.  Try tcpdump to
check out the entire HTTP conversation.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth




reply via email to

[Prev in Thread] Current Thread [Next in Thread]