Modify

Opened 11 years ago

Closed 11 years ago

#411 closed defect (fixed)

Content-Type test fails to match headers with additional information

Reported by: careo@… 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)

content-type-sniffing.patch (545 bytes) - added by careo 11 years ago.
content-type_detect.patch (533 bytes) - added by mpalmer@… 11 years ago.
Better fix for the problem
content-type_detect.2.patch (670 bytes) - added by mpalmer@… 11 years ago.
Better fix for the problem (proper patch)

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by careo

Attachment: content-type-sniffing.patch added

comment:1 Changed 11 years ago by careo

The patch attached previously, while a fix for the content-type sniffing, will break the web view because req.get_header('Content-Type') will return None.

comment:2 Changed 11 years ago by careo

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 11 years ago by mpalmer@…

Attachment: content-type_detect.patch added

Better fix for the problem

Changed 11 years ago by mpalmer@…

Attachment: content-type_detect.2.patch added

Better fix for the problem (proper patch)

comment:3 Changed 11 years ago by mpalmer@…

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.

comment:4 Changed 11 years ago by Alec Thomas

Resolution: fixed
Status: newclosed

(In [1070]) Fixes #550, #483, #530 and #411 (hopefully).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.