RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1343582 - Support sending http 451 status code from RewriteRule
Summary: Support sending http 451 status code from RewriteRule
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: httpd
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Martin Frodl
URL:
Whiteboard:
Depends On:
Blocks: 1353269
TreeView+ depends on / blocked
 
Reported: 2016-06-07 13:52 UTC by Dasharath Masirkar
Modified: 2021-01-14 09:34 UTC (History)
3 users (show)

Fixed In Version: httpd-2.4.6-43.el7
Doc Type: Bug Fix
Doc Text:
The HTTP status code 451 "Unavailable For Legal Reasons" was not usable in the httpd configuration. As a consequence, modules such as mod_rewrite could not be configured to return a 451 error if required for legal purposes. The 451 status code has been added to the list of available error codes, and modules can now be configured to return a 451 error if required.
Clone Of:
: 1353269 (view as bug list)
Environment:
Last Closed: 2016-11-04 08:10:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache Bugzilla 58985 0 None None None 2016-06-07 14:08:18 UTC
Red Hat Product Errata RHEA-2016:2534 0 normal SHIPPED_LIVE httpd bug fix and enhancement update 2016-11-03 14:17:49 UTC

Description Dasharath Masirkar 2016-06-07 13:52:16 UTC
Description of problem:
The mod_rewrite (and possibly other modules) can't send a http 451 error code unless it is supported by the server, the current httpd version (httpd-2.4.6-40) in RHEL 7.2 doesn't support it. There is upstream bugzilla https://bz.apache.org/bugzilla/show_bug.cgi?id=58985 which has been resloved and patch is available which added this support.

Version-Release number of selected component (if applicable):
httpd-2.4.6-40

How reproducible:
Always.

Steps to Reproduce:
1. Add following configuration to "/etc/httpd/conf/httpd.conf".
RewriteEngine On
RewriteRule ^ - [R=451,L]
2.Now start the httpd service
# systemctl start httpd
3. Now check httpd status.
# systemctl -l status  httpd

Actual results:

The httpd fails to start with below error message.
[root@rhle7]# systemctl -l status  httpd
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
   Active: failed (Result: exit-code) since Tue 2016-06-07 18:50:12 IST; 9s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 26984 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 26982 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 26982 (code=exited, status=1/FAILURE)

Jun 07 18:50:12 localhost httpd[26982]: AH00526: Syntax error on line 355 of /etc/httpd/conf/httpd.conf:
Jun 07 18:50:12 localhost httpd[26982]: RewriteRule: invalid HTTP response code '451' for flag 'R'
Jun 07 18:50:12 localhost systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jun 07 18:50:12 localhost kill[26984]: kill: cannot find process ""
Jun 07 18:50:12 localhost systemd[1]: httpd.service: control process exited, code=exited status=1
Jun 07 18:50:12 localhost systemd[1]: Failed to start The Apache HTTP Server.
Jun 07 18:50:12 localhost systemd[1]: Unit httpd.service entered failed state.

Expected results:

The httpd should start and allow mod_rewrite to send a http 451 error code.

Additional info:
Refer https://bz.apache.org/bugzilla/show_bug.cgi?id=58985

Comment 10 errata-xmlrpc 2016-11-04 08:10:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2534.html


Note You need to log in before you can comment on or make changes to this bug.