Bug 1279871

Summary: XML-RPC calls return HTTP 400 on latest Rawhide
Product: [Retired] Beaker Reporter: Alexander Todorov <atodorov>
Component: lab controllerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 21CC: dcallagh, dowang, jburke, jstancek, mjia, rjoost
Target Milestone: 21.2Keywords: NeedsTestCase, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-23 03:54:09 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:

Description Alexander Todorov 2015-11-10 12:42:06 UTC
Description of problem:


На 10.11.2015 в 01:11, Dan Callaghan написа:
> Nice work debugging, as always, Jan. :-)
>
> Excerpts from Jan Stancek's message of 2015-11-09 10:30 -05:00:
>> POST / HTTP/1.0
>> User-Agent: Twisted/XMLRPClib
>> Host: 2620:52:0:1040:5054:ff:fe38:5099
>> Content-type: text/xml; charset=utf-8
>
> [...]
>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
>> <title>400 Bad Request</title>
>> <h1>Bad Request</h1>
>> XML-RPC requests must be text/xml
>
> I'm going to guess that recent Twisted has started adding the charset
> parameter to Content-Type, and we have some defective MIME type parsing
> on the LC side which is failing to handle the presence of parameters.



This is effectively blocking test jobs on Rawhide.

Comment 1 Dan Callaghan 2015-11-13 05:54:15 UTC
It seems like this was a change made in Twisted 15.3.0 as part of porting the XMLRPC support to Python 3.

https://twistedmatrix.com/trac/ticket/7795#comment:35

Although there is no particularly good reason for the change, considering that XML has its own mechanism for declaring the character encoding *and* it's assumed to be UTF-8 by default.

Fedora 23 is shipping Twisted 15.1.0 for now, whereas rawhide recently went to 15.4.0.

Since the charset= param is hardcoded in Twisted there is no easy way we can patch this beah, even as a workaround. So the only workaround for now would be to install python-twisted < 15.3.0.

Comment 2 Dan Callaghan 2015-11-13 06:09:20 UTC
http://gerrit.beaker-project.org/4492

Comment 8 matt jia 2015-11-23 03:54:09 UTC
Beaker 21.2 has been released.