Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
XML vs JSON response headers
  • I noticed that for REST requests, the response headers are slightly different. For a JSON response, FuelPHP will return a Content-Length header, while an XML response will not. Conversely, for an XML response, FuelPHP will return a Transfer-Encoding header (chunked), while a JSON response will not. Is this by convention?
  • HarroHarro
    Accepted Answer
    The framework does not set either of those headers. Anywhere. The Rest controller only sets a "Content-Type" header.
  • Check and see if you have apache mod_proxy.  When the content gets over a certain size a policy rule goes into effect the removes this property.  Makes sense that the xml will be larger than the json.  I am setting this explicitly now.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion