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

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: */*

GET /accounts/ClientLogin?Email=<email>;Passwd=<passwd>;source=Google-cURL-Example;service=reader HTTP/1.1
Accept: */*
User-Agent: curl/7.19.6 (i386-apple-darwin10.0.0)
Host: localhost:8889

The first works, the second gives me a BadAuthentication error. That's http-client pretending to be curl. My call looks like the following:

(call-with-input-request
  (make-request method: 'GET
                uri: (uri-reference "http://localhost:8889/accounts/ClientLogin?Email=<email>&Passwd=<passwd>&source=Google-cURL-Example&service=reader")
                headers: (headers `((accept . (*/*)))))
  #f
  port->string)


The request is to localhost:8889 for the netcat/stunnel proxy. Any ideas why this might fail?

Cheers,
Colin


2009/11/1 Colin Fleming <address@hidden>
I assume so - it doesn't explicitly say so in the doc, but the previous version did and this version requires openssl. I'm assuming it must be something that's changed in the way the request is constructed - the user agent, maybe?

Cheers,
Colin

2009/11/1 John Cowan <address@hidden>

Colin Fleming scripsit:

> #;4> (call-with-input-request "
> https://www.google.com/accounts/ClientLogin?Email=<email>&Passwd=<password>&source=GooglecURL-Example&service=reader"

That's an https: URL.  Does http-client support those?

--
Híggledy-pìggledy / XML programmers            John Cowan
Try to escape those / I-eighteen-N woes;        http://www.ccil.org/~cowan
Incontrovertibly / What we need more of is      address@hidden
Unicode weenies and / François Yergeaus.



reply via email to

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