deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: Server returns JSON, not HTML
Date Thu, 13 Jan 2011 18:42:57 GMT
On Thu, 2011-01-13 at 09:48 -0500, Eric Woods wrote:
> I'm running Firefox on both the Windows and the Mac machines.  Michal is right, forcing
HTML via ?format=html in the URL does the trick.  It would be odd if two instances of Firefox
formed the request differently.  It could be related to Firefox tooling I have installed on
the mac.
> 
> I don't have access to the Windows machine atm, but Firebug on the Mac indicates the
following Accept header is used (with or without ?format=html appended to the URL):
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,application/json
> 
> Since text/html is always given priority in the request header, it looks like the server
takes extra steps to handle the URL parameter correctly.  Thanks for your help.

The problem is with your accept header: it says that you'd like
text/html, application/xhtml+xml, and application/json the best - which
one of these is the server's choice [1].

My FF (3.6.13) uses the same Accept header, but without the
application/json.

David

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html if you want to
    get into the gory details



Mime
View raw message