kylejginavan / youtube_it

An object-oriented Ruby wrapper for the YouTube GData API
http://groups.google.com/group/ruby-youtube-library
595 stars 223 forks source link

problem with create_session_token #99

Closed sergey-koumirov closed 12 years ago

sergey-koumirov commented 12 years ago

There is some problems with create_session_token and session_token_info functions

in view:

< a href="https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fsome.site.com%3A3000%2Ff%2F39%2Fd%2Fg%2F5&amp;scope=http%3A%2F%2Fgdata.youtube.com&amp;secure=0&amp;session=1">Login to Youtube</a>

click -> grant access to application

in controller:

client = ::YouTubeIt::AuthSubClient.new(:token => params[:token])
client.create_session_token

in logs:

opening connection to www.google.com...
opened
<- "GET https:///accounts/AuthSubSessionToken HTTP/1.1\r\nContent-Type: application/x-www-form-urlencoded\r\nAuthorization: AuthSub token=1/GoyWxrcnDlixBRB-5QC8WTz9XUjwWv-9VWO8dQapP1M\r\nAccept: */*\r\nUser-Agent: Ruby\r\nHost: www.google.com\r\n\r\n"
-> "HTTP/1.1 400 Bad Request\r\n"
-> "Content-Type: text/html; charset=UTF-8\r\n"
-> "Content-Length: 145\r\n"
-> "Date: Mon, 04 Jun 2012 14:01:32 GMT\r\n"
-> "Expires: Mon, 04 Jun 2012 14:01:32 GMT\r\n"
-> "Cache-Control: private, max-age=0\r\n"
-> "X-Content-Type-Options: nosniff\r\n"
-> "X-XSS-Protection: 1; mode=block\r\n"
-> "Server: GSE\r\n"
-> "\r\n"
reading 145 bytes...
-> "<HTML>\n<HEAD>\n<TITLE>Bad Request</TITLE>\n</HEAD>\n<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\">\n<H1>Bad Request</H1>\n<H2>Error 400</H2>\n</BODY>\n</HTML>\n"
read 145 bytes
chebyte commented 12 years ago

oka it was fixed thanks for the report!, you can use the git source or wait to the gem, we going to rebuild it soon, after that some changes more

thanks!