Ok I set getTunnelService.setUserAgentTunnel(true) in the constructor of
my Application-subclass but no change, still defaults to xml... :-(
Do I have to edit the agent/accept.properties?
My Firefox2 user-agent reads:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.14)
Gecko/20080404 Firefox/2.0.0.14
best regards
Ralf
Stephan Koops schrieb:
Hi Ralf,
Thierry implemented a feature for this. Take a look at the
TunnelService.userAgentTunnel. You find the config file to replace the
accept header in org/restlet/service/accept.properties and the config
file for check the name of the browser in
org/restlet/data/agent.properties.
As first try to call TunnelService.setUserAgentTunnel(true) and look, if
it works.
best regards
Stephan
Ralf Bommersbach schrieb:
Hello list,
while I absolutely love Firefox, there's one thing that's disturbing
me for a while now (well since I started developing in a RESTful way)
: The standard behavior of Firefox 2 is to prefer an
XML-Representation over an HTML-Representation. You can easily see
that in the Accept-header of the HTTP-Request:
<snippet>
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
</snippet>
this means if I have a resource that has an human-readable
HTML-Representation and also an XML-Representation (e.g. for
machine-based parsing of the resource) - that if the url has no
extension that explicitly specifies the mime-type (like .atom, or
.htm) - the user gets the xml-Representation of the Resource. This is
often confusing for the user and clearly not very helpful: The
default choice for a Web-Browser (all other things being equal) should
IMHO be Hypermedia.
This Behavior of Firefox 2 is also incosistent with all other Browser
out there (at least as far as I know), which adds to the confusion...
so,my question is: does anyone know of a (preferrably non-hacky) way
to set HTML as the default first choice across _all_ browser (like, if
no extension is given, always assume html...) ?
P.S. By the way, In Firefox 3, HTML seems to be the default