특정 캘린더에서 이벤트를 가져 오기 위해 API를 요청할 때 간혹 302 리디렉션이 발생합니다. 이상한 일은 가끔씩 만 발생하는 경우가 종종 있습니다.Google 캘린더 API 응답 : moved moved temporarily
in : http://code.google.com/p/googlecl/issues/detail?id=167 분명히 http 및 https와 관련이 있습니다.
이 범위에서는 oauth를 사용하고 있습니다. 'scope'=> 'https://www.google.com/calendar/feeds/'와 내가 테스트하고있는 웹 사이트는 http이고 https api url을 사용하고 있습니다. http://code.google.com/apis/calendar/data/2.0/reference.html
내가받는 응답 :
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. )
내가는 HTTP 소켓 CakePHP는 2.0을 사용하고 있습니다. 또한 첫 번째 요청에서 header.location 및 쿠키를 사용하여 새 요청을 시도했지만 Google에서 인증 실패 오류가 발생했습니다. – Melvin