Modify

Opened 8 years ago

Closed 8 years ago

#411 closed defect (fixed)

Content-Type test fails to match headers with additional information

Reported by: careo@… Owned by: athomas
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 8 years ago.
content-type_detect.patch (533 bytes) - added by mpalmer@… 8 years ago.
Better fix for the problem
content-type_detect.2.patch (670 bytes) - added by mpalmer@… 8 years ago.
Better fix for the problem (proper patch)

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by careo

comment:1 Changed 8 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 8 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 8 years ago by mpalmer@…

Better fix for the problem

Changed 8 years ago by mpalmer@…

Better fix for the problem (proper patch)

comment:3 Changed 8 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 8 years ago by athomas

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from athomas. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.