Skip to content

Commit

Permalink
Fix accented characters, patch from Ken Preudhomme. Thanks!
Browse files Browse the repository at this point in the history
  • Loading branch information
pwood committed Jun 19, 2009
1 parent e89a6f7 commit 8158a83
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/wowr.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ def refresh_login(long_life_cookie)


# All we need to do is goto the armory login page passing our long life cookie, we should get 302 instantly. # All we need to do is goto the armory login page passing our long life cookie, we should get 302 instantly.
stage1 = login_http(authentication_url, true, { @@persistant_cookie => long_life_cookie }) stage1 = login_http(authentication_url, true, { @@persistant_cookie => long_life_cookie })

# Let's see # Let's see
if (stage1.code == "200") if (stage1.code == "200")
# It's no good, our cookie doesn't work anymore. # It's no good, our cookie doesn't work anymore.
Expand Down Expand Up @@ -1082,7 +1082,7 @@ def http_request(url, options = {})


req["cookie"] += options[:cookie] if options[:cookie] req["cookie"] += options[:cookie] if options[:cookie]


uri = URI.parse(url) uri = URI.parse(URI.escape(url))


http = Net::HTTP.new(uri.host, uri.port) http = Net::HTTP.new(uri.host, uri.port)


Expand Down Expand Up @@ -1193,9 +1193,10 @@ def u(str) #:nodoc:
end end


def login_final_bounce(url) def login_final_bounce(url)
puts url
# Let's bounce to our page that will give us our short term cookie, URL has Kerbrose style ticket. # Let's bounce to our page that will give us our short term cookie, URL has Kerbrose style ticket.
finalstage = login_http(url) finalstage = login_http(url)

# Did we get a 200? # Did we get a 200?
if (finalstage.code == "200") if (finalstage.code == "200")
# Get the short term cookie at last # Get the short term cookie at last
Expand Down Expand Up @@ -1231,7 +1232,7 @@ def login_http(url, ssl = false, cookie = nil, data = nil, post = false)
end end


req.set_form_data(data, '&') if data req.set_form_data(data, '&') if data

http.start do http.start do
res = http.request(req) res = http.request(req)


Expand Down

0 comments on commit 8158a83

Please sign in to comment.