Development

#4920 (xml requests are not automatically detected from Accept header)

You must first sign up to be able to contribute.

Ticket #4920 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

xml requests are not automatically detected from Accept header

Reported by: joes Assigned to: fabien
Priority: major Milestone: 1.2.0 RC1
Component: view Version: 1.2.0 BETA2
Keywords: sfWebRequest Cc:
Qualification: Unreviewed

Description

Tested using curl as described here by setting accept header:

The following do not work either:

  • $ curl -H "Accept: text/xml"
  • $ curl -H "Accept: application/x-xml,text/xml"

The above does not work. The following variations, however, do work:

  • $ curl -H "Accept: application/x-xml" http://...
  • $ curl -H "Accept: text/xml,application/xml,application/x-xml" http://...
  • $ curl -H "Accept: text/xml,application/x-xml" http://...
  • $ curl -H "Accept: application/xml,application/x-xml" http://...

It seems that xml-requests are detected automatically only if application/x-xml is the last value in the Accept header's list.

I suspect the problem is on row 687 in sfWebRequest

Change History

11/12/08 19:55:44 changed by joes

  • priority changed from minor to major.

11/17/08 00:41:56 changed by fabien

  • milestone changed from 1.2.0 to 1.2.0 RC1.

11/17/08 20:41:26 changed by fabien

As the Accept header is poorly implemented by browsers and crawlers, I have decided to revert the auto-configuration of the request format based on the Accept header. You must now embed explicitly the sf_format somewhere in your URLs.

11/17/08 20:41:55 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [13074]) [1.2] reverted request format auto-configuration based on the Accept header (closes #4920)

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.