Skip to content

Commit

Permalink
rubycas#42: HTTPSeeOther is the only valid response that should be re…
Browse files Browse the repository at this point in the history
…turned from the server on successful login
  • Loading branch information
Brad Seefeld committed Aug 23, 2012
1 parent 23fd4db commit 1308deb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/casclient/responses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 1308deb

Please sign in to comment.