Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 1423004

Summary: yum-rhn-plugin sending malformed request header
Product: Red Hat Enterprise Linux 5 Reporter: Grant Gainey <ggainey>
Component: yum-rhn-pluginAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: high    
Version: 5.11CC: adujicek, jneedle, satqe-list, tkasparek, tlestach, xdmoon
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1423003 Environment:
Last Closed: 2017-02-17 16:18:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1423003, 1423007    
Bug Blocks:    

Description Grant Gainey 2017-02-16 20:24:01 UTC
+++ This bug was initially created as a clone of Bug #1423003 +++

Description of problem:

The yum-rhn-plugin sends http-headers that are separated by only a newline, when the spec requires CRLF.

In the presence of an httpd which enforces the spec, this results in any attempt to update/install content returning

error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 400 Bad Request"

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

The bug was introduced in yum-rhn-plugin-0.8.4-1. The problem was harmless until uncovered by fixes for httpd that tightened whitespace processing.

How reproducible:

See https://bugzilla.redhat.com/show_bug.cgi?id=1422518 for gory details. The net is, 'yum update a system that is talking to a satellite-5 whose httpd is at 2.2.15-60 or higher'.

Actual results:

error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 400 Bad Request"

Expected results:

successful install/update of packages.

Additional info:

This BZ is for getting the client-side fix in place for RHEL5, BZ#1422518 is for getting a workaround in place on the Satellite5 backend.

--- Additional comment from Grant Gainey on 2017-02-16 15:18:50 EST ---

We need to fix this in active z-streams as well

Comment 1 Grant Gainey 2017-02-16 20:25:09 UTC
As for RHEL6, this needs to get into active zstreams as well

Comment 2 Grant Gainey 2017-02-16 20:37:43 UTC
Proposed solution:

https://github.com/spacewalkproject/spacewalk/pull/506

Comment 3 Ales Dujicek 2017-02-17 14:13:02 UTC
RHEL5 is not affected by this issue, yum-rhn-plugin does not include that part of code

# rpm -q yum-rhn-plugin
yum-rhn-plugin-0.5.4.1-7.el5

# grep curl /usr/lib/yum-plugins/rhnplugin.py || echo no-curl
no-curl

I registered RHEL 5 to Satellite 5.8 Beta and it succesfully downloaded repodata of spacewalk-tools (rhel-x86_64-server-5 was empty)

# yum repolist
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
repo id               repo name                                           status
rhel-x86_64-server-5  Red Hat Enterprise Linux (v. 5 for 64-bit x86_64)    0
spacewalk-tools       spacewalk-tools                                     24


Satellite package versions
# rpm -q httpd
httpd-2.2.15-60.el6.x86_64

Comment 4 Tomas Lestach 2017-02-17 16:18:19 UTC
Thank you, Ales!
Based on Comment 3 I'm closing this BZ NOTABUG.