Bonjour Thierry !
I've got the snapshot, deployed it, and still got problems. Let me explain:
I get the HTML representation now, however there's a small catch. The
HTML page contains AJAX code that makes some requests in the
background to build parts of the page. One of such requests states
Accept: application/json (that is, it expects JSON back), which is
being *ignored* when the page is loaded with IE, thus breaking the
page and the application (the page does show, but with errors). With
this behaviour it's like if *all* requests coming from IE are
'converted' to the Accept header specified in accept.properties, even
those with Accept headers different from the ugly */* IE{7,8,6?}
default one.
So, I was thinking that maybe adding acceptOld: */* back to the msie
agent rules will fix this behaviour for AJAX clients that don't send a
UA string, and so use the browser's. That way, when a 'good' Accept
header (like Accept: application/json, Accept: application/zip,
Accept: whatever_good_mime_type_specified_except_the_*/*_one) is
present it is not ignored like it's being ignored now (Restlet
snapshot from yesterday)
Eagerly waiting for your answer... (bah, for the above recommended fix ;-))
BTW, I cannot remember how to do to build my own restlet, can you
please refresh my mind with pointers to the pertinent docs? Thanks.
Again, my pleasure to contribute to the already excellent Restlet framework.
On Wed, Feb 10, 2010 at 4:40 AM, Thierry Boileau
<[email protected]> wrote:
> Bonjour Fabian,
>
> the fix is available in the current snapshot (see the changes.log):
> http://www.restlet.org/downloads/
>
> Best regards,
> Thierry Boileau
>
> Bonjour Thierry !
>
> Ah... so the problem was somewhere else :-)
>
> My pleasure to contribute to the already excellent Restlet.
>
> Any hints on when will this fix be available? or should I try (my
> socio won't like it at all...) to deploy snapshot Restlet jars?
>
> On Tue, Feb 9, 2010 at 6:24 AM, Thierry Boileau
> <[email protected]> wrote:
>
>
> Hello Fabian,
>
> thanks for your report that helps to fix a regression.
> The value of the "accept-old" parameter is not required but due to the
> regression it was.
>
> Best regards,
> Thierry Boileau
>
>
> Hello there,
>
> Restlet 2.0M7 included a TunnelService fix for UA 'relaxed' check
> (case insensitive matching), however this doesn't seem to have fixed
> much. Whenever IE states Accept: */* (which is the default in at least
> IE7 and IE8) I'm still getting the last-defined annotated
> representation back, instead of the HTML representation like all other
> tested browsers get.
>
> Maybe this
>
> #Internet explorer
>
> agentName: msie
>
> acceptNew: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>
> is not enough, and the logic really needs:
>
> #Internet explorer
> agentName: msie
> acceptOld: */*
> acceptNew: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
>
> instead?
>
> Is there any way to add the above, more explicit, rule programatically
> to the TunnelService?
>
> A possible workaround is for me to move all @Get("html") code to
> appear last in the source, thus making HTML the preferred
> representation for when Accept: */* is specified, fixing IE in the
> process, but: 1) tying myself to M7's
> select-la...@get-as-default-when-*/*-is-specified; and 2) workaround
> instead of bugfix, so it may not work anymore later...
>
> Thanks in advance for your help.
>
>
>
>
>
--
Fabián Mandelbaum
IS Engineer
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2446422