Hello there,
I have written a small mashup that requests Google Contacts Data.
This mashup has been working for approx 6 weeks. I haven't tested it
for a while, but I tried yesterday and it intermittently no longer
works - the request for the Contacts Data returns 200 OK but with a
Content length of 0.
During the time since it was working, I have upgraded to Firefox
2.0.0.15 and Google have made some updates to the API (e.g. released
js client library I believe). I'm not sure if any of these are a
factor.
The failure is intermittent - sometimes I get data returned, and some
times I don't. It seems to work more often on IE, and fail more often
on Firefox. But I have seen it working and failing on both. I am
making a synchronous AJAX GET request for the data.
I am pretty sure that my code is OK, the TCP trace of a failure and
success is below - has anyone else had the same problem or know what
it could be??
Thanks
Sunny
FAILURE TRACE
=============
GET /m8/feeds/contacts/default/full?alt=json HTTP/1.1
user-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:
1.8.1.15) Gecko/20080623 Firefox/
2.0.0.15
accept: text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
accept-language: en-gb,en;q=0.5
accept-encoding: gzip,deflate
accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
connection: keep-alive
content-type: application/x-www-form-urlencoded
authorization: AuthSub token="<my_auth_token_here_is_ok>""
referer: http://<my_server>/session/line/contacts.html
If-Modified-Since: Tue, 08 Jul 2008 08:54:44 GMT
Cache-Control: max-age=0
content-length: 0
Pragma: no-cache
Host:
www.google.com
HTTP/1.1 200 OK
Content-Type: text/plain
Cache-Control: max-age=0, must-revalidate, private
GData-Version: 1.0
Last-Modified: Tue, 08 Jul 2008 08:57:42 GMT
Date: Tue, 08 Jul 2008 08:57:42 GMT
Content-Length: 0
Server: GFE/1.3
AND AN EXAMPLE OF THE SAME CODE WORKING
=======================================
GET /m8/feeds/contacts/default/full?alt=json HTTP/1.1
accept: */*
accept-language: en-gb
referer: http://<my_server>/session/line/contacts.html
authorization: AuthSub token="<token_ok_again>"
content-type: application/x-www-form-urlencoded
UA-CPU: x86
accept-encoding: gzip, deflate
user-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR
3.0.04506.648)
connection: Keep-Alive
content-length: 0
Cache-Control: no-cache
Pragma: no-cache
Host:
www.google.com
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=0, must-revalidate, private
GData-Version: 1.0
Last-Modified: Tue, 08 Jul 2008 09:15:46 GMT
Content-Encoding: gzip
Transfer-Encoding: chunked
Date: Tue, 08 Jul 2008 09:15:46 GMT
Server: GFE/1.3
a
..........
475
.Y.n.6...CI.[,..d.zin(Z.)..}.6.....6.)...A...P./M......<$.
2.9..s8.o...t!..8.%...b,.Bd........M.R'.ufU)4>......N...w..<FH...Yat../
k....8_-.Cw,+........m......rqv"..c.Z..9T\...Y.m..<....+..Y....,..
{..e...K..at..a.....7c......Ei#.........-.>..$..aB.
$..Q0....12...I..u.......B...KW[wh.
{......)."47..h`f0a...n.w...k..NB[.e!.[.
J..%......J...*.Q.`.O..A.t.4.n..........!g=...~.x.*.l..........,...4e.
9.j...b[p...
u.ZA.PN^...H....?.............F....V..1.T-...`..u.
[......m...(.....].Q..{\(p]r+..7.....N.x....Al?..f..z/.0P.sP.<[..
6.z...h....`....l...O.....$..4.ak4P. zG..99.9...t[...=H...si.J!E.g.}..
(....0......cv...G:...Q..:.O&.+......m....
(#....P...nO>K.;.oq.....D@3IS..;..9GxK.(^3...Vx....Q
`Q...V....h.).
..'...5...B......]T7..."=.....)=j...!el.........Ww9..\.
..~..Ju...nW..........o.._.....l...=.I..Mu..sz..k%.
6...?...E.ai..F.Aq<x&.b..(.S.gh@
$.i.Fn..;k@....V.Wr.i.......A.a.i:..:..C...sOk:....nz....e.Ft.
0.....
xg.vn[w,g..F...u....T.....A...)7l...
$f.. ..v.^(....f...#qr(......C..g..~....wcFwVz.<}+".vPd.k.,...`..
0..cO{.}...r........C....5_.K)..?."..Y.6.<Z..oy..
9W.x.....R......N.J....=.%.......".?\.o.,..4..5."|..Y..GP..._.!
(.c...W......~C..z...
0