Modify ↓
Opened 18 years ago
Closed 18 years ago
#411 closed defect (fixed)
Content-Type test fails to match headers with additional information
Reported by: | Owned by: | Alec Thomas | |
---|---|---|---|
Priority: | normal | Component: | XmlRpcPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
For example, Ruby's xmlrpc lib helpfully sets the content-type to "text/xml; charset=utf-8".
Attachments (3)
Change History (7)
Changed 18 years ago by
Attachment: | content-type-sniffing.patch added |
---|
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
The dirty little hack I applied to make it work with ruby (not even worth making a patch) is to change the line in question to if req.get_header('Content-Type') != 'text/xml' or req.get_header('Content-Type') != 'text/xml; charset=utf-8:'
Changed 18 years ago by
Attachment: | content-type_detect.2.patch added |
---|
Better fix for the problem (proper patch)
comment:3 Changed 18 years ago by
A fix that, so far as I can tell, works for both the HTML side and the XML-RPC side. This fix is quite critical for me, as without my Ruby client code Just Doesn't Work.
Note: See
TracTickets for help on using
tickets.
The patch attached previously, while a fix for the content-type sniffing, will break the web view because
req.get_header('Content-Type')
will returnNone
.