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 1466799 - mod_wsgi forces HEAD to GET
Summary: mod_wsgi forces HEAD to GET
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mod_wsgi
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Jan Houska
Ioanna Gkioka
URL:
Whiteboard:
Depends On:
Blocks: 1610453 1615238 1623666
TreeView+ depends on / blocked
 
Reported: 2017-06-30 13:32 UTC by Attila Fazekas
Modified: 2021-12-10 15:07 UTC (History)
13 users (show)

Fixed In Version: mod_wsgi-3.4-18.el7
Doc Type: Bug Fix
Doc Text:
Previously, the mod_wsgi adapter was mapping any HEAD request to a GET request. As a consequence, applications served different content for the HEAD and GET requests. This update adds the WSGIMapHEADToGET directive to fix the unexpected behavior of applications. Note that the directive can be set to "Auto" (default), "On" to always map a HEAD to GET request even if no output filters are detected, or "Off" to always preserve the original request method type. As a result, users can set WSGIMapHEADToGET accordingly, and the described problem no longer occurs.
Clone Of:
: 1623666 (view as bug list)
Environment:
Last Closed: 2018-10-30 11:19:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3210 0 None None None 2018-10-30 11:19:38 UTC

Description Attila Fazekas 2017-06-30 13:32:39 UTC
Description of problem:
I have an application which per the API documentation serves different content
depending on is it HTTP HEAD or GET method.

mod_wsgi fakes the HEAD requests to GET in order to enforce cache consistent behavior of the responses (my responses are not cache-able anyway).

Regardless to how questionable the different responses on the HEAD/GET mod_wsgi must not hide the real request method by default, at least it should give an option for not hiding it.

Version-Release number of selected component (if applicable):
mod_wsgi-3.4-12.el7_0.x86_64

How reproducible:
always

Steps to Reproduce:
1. Install latest opensatck keystone behind mod_wsgi
2. run tempest identity tests


Actual results:
3. api compatibility test fails, unexpected status code.



Additional info:
Bumping to mod_wsgi >=4.3.0 works in my case, without a config change,
but this version also introduces the 'WSGIMapHEADToGET Off' option, in case the automatic behavior wouldn't be correct.

(4.5.15 also works)


Can you rebase mod_wsgi on mod_wsgi >=4.3.0 ?

Comment 3 Joe Orton 2017-07-14 07:17:27 UTC
We are shipping current versions of mod_wsgi in RHSCL, can you use that if you need it?

python27-mod_wsgi-4.5.13-1.el7.x86_64
rh-python34-mod_wsgi-4.4.3-2.el7.x86_64
rh-python35-mod_wsgi-4.4.21-1.el7.x86_64
rh-python36-mod_wsgi-4.5.13-1.el7.x86_64

Comment 5 Mike Burns 2017-07-18 12:43:08 UTC
The issue we're seeing is in OpenStack and we don't rely on RHSCL currently and would like to avoid it if we can.  We could maybe use it for testing, but we can't force customers to enable a new repository in the middle of a release.

Comment 7 Attila Fazekas 2017-08-18 15:28:23 UTC
mburns already provided the answer.

Comment 31 errata-xmlrpc 2018-10-30 11:19:02 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://access.redhat.com/errata/RHBA-2018:3210


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