-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new API function cgi_redirect_status() and deprecate old one
Sending a HTTP Location header only makes sense with certain HTTP status responses [1]. For letting a CGI return a certain status code, you have to send the pseudo header 'Status:' with the right code, the webserver will remove that and send the corresponding HTTP status instead. See RFC 3875 section 6.3.3 [2] for details. The new API function allows to send a 'redirect' header 'Location:' together with an arbitrary status code. The old API function is marked deprecated, because it makes no sense sending 'Location' without 'Status' or the standard response code 200. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location [2] https://tools.ietf.org/html/rfc3875#section-6.3.3 Signed-off-by: Alexander Dahl <[email protected]>
- Loading branch information
Showing
2 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters