Skip to content

Commit 1308deb

Browse files
author
Brad Seefeld
committed
rubycas#42: HTTPSeeOther is the only valid response that should be returned from the server on successful login
1 parent 23fd4db commit 1308deb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/casclient/responses.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def parse_http_response(http_response)
191191
@ticket = $~[1]
192192
end
193193

194-
if not ((http_response.kind_of?(Net::HTTPSuccess) || http_response.kind_of?(Net::HTTPFound)) && @ticket.present?)
194+
unless http_response.kind_of?(Net::HTTPSeeOther) && @ticket.present?
195195
@failure = true
196196
# Try to extract the error message -- this only works with RubyCAS-Server.
197197
# For other servers we just return the entire response body (i.e. the whole error page).

0 commit comments

Comments
 (0)