Bug 1279871 - XML-RPC calls return HTTP 400 on latest Rawhide
XML-RPC calls return HTTP 400 on latest Rawhide
Product: Beaker
Classification: Community
Component: lab controller (Show other bugs)
Unspecified Unspecified
high Severity high (vote)
: 21.2
: ---
Assigned To: Dan Callaghan
: NeedsTestCase, Patch
Depends On:
  Show dependency treegraph
Reported: 2015-11-10 07:42 EST by Alexander Todorov
Modified: 2015-11-22 22:54 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-22 22:54:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexander Todorov 2015-11-10 07:42:06 EST
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 00:54:15 EST
It seems like this was a change made in Twisted 15.3.0 as part of porting the XMLRPC support to Python 3.


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 01:09:20 EST
Comment 8 matt jia 2015-11-22 22:54:09 EST
Beaker 21.2 has been released.

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