ircd:Ⓜ️:fed: Improve conditions to bail before redirect.
This commit is contained in:
parent
006aa4f0e6
commit
82bc4be5e1
|
@ -1683,10 +1683,18 @@ try
|
|||
break;
|
||||
}
|
||||
|
||||
// Indirection code, but no location response header
|
||||
if(!location)
|
||||
return origin;
|
||||
|
||||
// Redirection; carry over the new target by copying it because it's
|
||||
// in the buffer which we'll be overwriting for the new request.
|
||||
carry = unique_mutable_buffer{location};
|
||||
uri = string_view{carry};
|
||||
|
||||
// Indirection code, bad location header.
|
||||
if(!uri.path || !uri.remote)
|
||||
return origin;
|
||||
}
|
||||
|
||||
const json::string &m_server
|
||||
|
|
Loading…
Reference in New Issue