When I make an request to the api for getting events from a specific calender sometimes it get an 302 redirect. The weird things is that this only happens sometimes, often 1 out of 5.
in found this: http://code.google.com/p/googlecl/issues/detail?id=167 apparently it has something to do with http and https.
I'm using oauth with this scope; 'scope' => 'https://www.google.com/calendar/feeds/' and the website I'm testing on is http and I'm using https api url just like described here: http://code.google.com/apis/calendar/data/2.0/reference.html
This is the response I get:
HttpResponse Object ( [body] => Moved TemporarilyMoved Temporarily
The document has moved here. [headers] => Array ( [Expires] => Thu, 27 Oct 2011 10:10:02 GMT [Date] => Thu, 27 Oct 2011 10:10:02 GMT [Set-Cookie] => S=calendar=Vi6DcnO0BrcmQr-qJAQj7A;Expires=Fri, 26-Oct-2012 10:10:02 GMT;Secure [Location] => https://www.google.com/calendar/feeds/6okn9orqcq5kgd2ktssvq675k8%40group.calendar.google.com/private/full?alt=jsonc&oauth_consumer_key=paintballboerderij.nl&oauth_nonce=631ebbb152d8f07466fb3f529973b0ce&oauth_signature=VGIfdFlHFOob/TUAO1ArVeeRQ9U%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1319710200&oauth_token=1/EGOUox6t9u1yOZpRXG7FHFfGwP6bRLTZgUjs6dWSTVk&oauth_version=1.0&start-max=2011-11-19T23:59:59&start-min=2011-11-13T00:00:00&gsessionid=Vi6DcnO0BrcmQr-qJAQj7A [Content-Type] => text/html; charset=UTF-8 [Cache-Control] => private, max-age=0 [X-Content-Type-Options] => nosniff [X-Frame-Options] => SAMEORIGIN [X-XSS-Protection] => 1; mode=block [Server] => GSE [Connection] => close ) [cookies] => Array ( [S] => Array ( [value] => calendar=Vi6DcnO0BrcmQr-qJAQj7A [expires] => Fri, 26-Oct-2012 10:10:02 GMT [secure] => 1 ) ) [httpVersion] => HTTP/1.1 [code] => 302 [reasonPhrase] => Moved Temporarily [raw] => HTTP/1.1 302 Moved Temporarily Expires: Thu, 27 Oct 2011 10:10:02 GMT Date: Thu, 27 Oct 2011 10:10:02 GMT Set-Cookie: S=calendar=Vi6DcnO0BrcmQr-qJAQj7A;Expires=Fri, 26-Oct-2012 10:10:02 GMT;Secure Location: https://www.google.com/calendar/feeds/6okn9orqcq5kgd2ktssvq675k8%40group.calendar.google.com/private/full?alt=jsonc&oauth_consumer_key=p***&oauth_nonce=631ebbb152d8f07466fb3f529973b0ce&oauth_signature=VGIfdFlHFOob/TUAO1ArVeeRQ9U%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1319710200&oauth_token=1/EGOUox6t9u1yOZpRXG7FHFfGwP6bRLTZgUjs6dWSTVk&oauth_version=1.0&start-max=2011-11-19T23:59:59&start-min=2011-11-13T00:00:00&gsessionid=Vi6DcnO0BrcmQr-qJAQj7A Content-Type: text/html; charset=UTF-8 Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Connection: close Moved TemporarilyMoved Temporarily
The document has moved here. )