Permalink
Browse files

#42: HTTPSeeOther is the only valid response that should be returned…

… from the server on successful login
  • Loading branch information...
Brad Seefeld
Brad Seefeld committed Aug 23, 2012
1 parent 23fd4db commit 1308deba94c2531e0a3e8d9e4b58ed380601e316
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/casclient/responses.rb
@@ -191,7 +191,7 @@ def parse_http_response(http_response)
@ticket = $~[1]
end
- if not ((http_response.kind_of?(Net::HTTPSuccess) || http_response.kind_of?(Net::HTTPFound)) && @ticket.present?)
+ unless http_response.kind_of?(Net::HTTPSeeOther) && @ticket.present?
@failure = true
# Try to extract the error message -- this only works with RubyCAS-Server.
# For other servers we just return the entire response body (i.e. the whole error page).

0 comments on commit 1308deb

Please sign in to comment.