You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
What steps will reproduce the problem?
1. Create a test_config.yml: the username and password should be for a
*GOOGLE APPS* user, e.g., [email protected] (NOT [email protected])
2. ruby test/tc_gdata_client_calendar.rb
What is the expected output? PASS What do you see instead?
FAIL:
1) Failure:
test_get_all_calendars(TC_GData_Client_Calendar)
[test/tc_gdata_client_calendar.rb:29]:
Must not be a redirect.
<200> expected but was
<302>.
What version of the product are you using? On what operating system?
gdata-ruby-util: 1.1.1
Ruby 1.8.6 (fails on hoang's version for 1.9.1, too --
http://code.google.com/u/hoanga/)
OS/X 10.5
Please provide any additional information below.
I don't understand the redirect strategy in general. I could patch the
library to follow the redirect, but am not sure if this is the best strategy.
Original issue reported on code.google.com by [email protected] on 29 Apr 2010 at 2:34
The text was updated successfully, but these errors were encountered:
P.S. I think the reason this is broken is because
GData::Client::Calendar#make_request is obviously wrong.
It claims to want to do a redirect, but the new request is to the exact same
original
url.
def make_request(method, url, body = '', retries = 4)
response = super(method, url, body)
if response.status_code == 302 and retries > 0
@session_cookie = response.headers['set-cookie']
return self.make_request(method, url, body,
retries - 1)
else
return response
end
end
E.g., should be something like
@session_cookie = response.headers['set-cookie']
redirect_url = response.headers['location']
return self.make_request(method, redirect_url, body,
retries - 1)
Original issue reported on code.google.com by
[email protected]
on 29 Apr 2010 at 2:34The text was updated successfully, but these errors were encountered: