[Top][All Lists]

[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: Colin Fleming
Subject: Re: [Chicken-users] Problem with http-client in chicken 4.2.0
Date: Sun, 1 Nov 2009 15:26:57 +0100

Hi Peter,

Thanks for the suggestion - there doesn't seem to be any redirect involved, I just get a 403 back. I'm not near my project right now, but I just tried with curl and I get a 200 directly from that request with the information. It's very strange. I'll try tcpdump this evening.


2009/11/1 Peter Bex <address@hidden>
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:
> /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.

"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]