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.

Cheers,
Colin

2009/11/1 Peter Bex <[email protected]>

> 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
>
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to