When no redirect parameter is supplied to login, returns a 200 not a 307

This commit is contained in:
Logan Allen 2019-03-25 16:52:11 -07:00 committed by Isaac Visintainer
parent be9ef09211
commit 4fdac81f4d

View File

@ -854,16 +854,22 @@
%- crip
"urbauth={<session>}; Path=/; Max-Age=86400"
::
=/ new-location=@t
?~ redirect=(get-header:http 'redirect' u.parsed)
'/'
u.redirect
?~ redirect=(get-header:http 'redirect' u.parsed)
%- handle-response
:* %start
:- status-code=200
^= headers
:~ ['set-cookie' cookie-line]
==
data=~
complete=%.y
==
::
%- handle-response
:* %start
:- status-code=307
^= headers
:~ ['location' new-location]
:~ ['location' u.redirect]
['set-cookie' cookie-line]
==
data=~