Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rubycas-client: follow redirections in requests to the CAS server

  • Loading branch information...
commit 64435e1a5492296fd6e3a31fcb13d7d1989bb634 1 parent 127a0a3
@nackd nackd authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/casclient/client.rb
View
3  lib/casclient/client.rb
@@ -214,6 +214,9 @@ def request_cas_response(uri, type)
raw_res = https.start do |conn|
conn.get("#{uri.path}?#{uri.query}")
end
+ while Net::HTTPRedirection === raw_res
+ raw_res = Net::HTTP.get_response(URI.parse(raw_res['location']))
+ end
rescue Errno::ECONNREFUSED => e
log.error "CAS server did not respond! (#{e.inspect})"
raise "The CAS authentication server at #{uri} is not responding!"
Please sign in to comment.
Something went wrong with that request. Please try again.