Bug 58984 - mod_rewrite documentation for R flag should include note about supported status codes
Summary: mod_rewrite documentation for R flag should include note about supported stat...
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 2.5-HEAD
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: HTTP Server Documentation List
Keywords: PatchAvailable
Depends on:
Reported: 2016-02-09 17:00 UTC by Yehuda Katz
Modified: 2022-01-25 16:36 UTC (History)
1 user (show)

trunk patch (493 bytes, patch)
2016-02-09 17:00 UTC, Yehuda Katz
Details | Diff
2.4 patch (505 bytes, patch)
2016-02-09 17:01 UTC, Yehuda Katz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yehuda Katz 2016-02-09 17:00:46 UTC
Created attachment 33536 [details]
trunk patch

The R flag only supports sending headers that are otherwise listed in the module as supported, but the documentation implies that any header can be sent. This leads to 500 errors (when the RewriteRule is in htaccess) or compile errors (when the RewriteRule is in config).

The attached patches (trunk and 2.4) add a note about supported codes only.

It might be nice to put the list of codes somewhere in the documentation (currently in include/httpd.h), but I don't know if there is an automatic way to do this.
Comment 1 Yehuda Katz 2016-02-09 17:01:02 UTC
Created attachment 33537 [details]
2.4 patch
Comment 2 Rich Bowen 2022-01-24 16:40:43 UTC
Waking up an ancient, but still unaddressed, bug.

It's unclear to me what "newly created status codes" means in this patch. Is this in reference to status codes that are not in the HTTP standard, but which are used by certain browsers and servers? If so, possibly we could make the point that httpd only supports HTTP status codes that are actually in the standard, and using others will result in the 500 error?
Comment 3 Yehuda Katz 2022-01-24 17:28:38 UTC
This was specifically in response to the creation of 451. I eventually submitted a patch to add support for the 451 status code, but if any other new codes are added to the standards but not implemented in HTTPD, this will come up again.
Comment 4 Roy T. Fielding 2022-01-25 16:36:34 UTC
We might want to wait until RFC9110 is published (possibly this week) to update all of the links to HTTP standards.