Hi Fabian,
could you tell us what is the user-agent header sent by IE8?
Best regards,
Thierry Boileau
> Hello there,
>
> I've enabled the TunnelService (Restlet 2.0M5, still didn't switch to
> M6) like this:
>
> public MyApp() {
> super();
> getTunnelService().setUserAgentTunnel(true);
> }
>
> in the constructor of MyApp which extends Application, and IE (tested
> with IE7, don't know about the others, but I'm sure it will be the
> same), is still getting different representations (XML, JSON, ZIP,
> instead of HTML) than the rest of the browsers. What's missing?
>
> Thanks in advance.
>
> On Thu, Dec 3, 2009 at 1:13 PM, Thierry Boileau
> <[email protected]> wrote:
>
>> Hello all,
>>
>> you can turn on the tunneling based on the user agents:
>> application#getTunnelService().setUserAgentTunnel(true);
>>
>> you can find more details here:
>> http://www.restlet.org/documentation/snapshot/jse/api/org/restlet/service/TunnelService.html
>>
>> Best regards,
>> Thierry Boileau
>>
>>
>>> Hi,
>>>
>>> I think this problem is somewhere resolved in Restlet, but I don't know
>>> where in the code, and how to activate it. Take a look to the
>>> Application properties.
>>>
>>> best regards
>>> Â Â Stephan
>>>
>>>
>>>> As a workaround you could add browser sniffing code targetting IE on
>>>> your Restlet/Resource class(es), and if IE is detected provide it with
>>>> the HTML representation. It may prove to be lots of work, but this is
>>>> not really Restlet's fault, but IE's (why a web browser would accept
>>>> anything other than the usual expected web media types, and even more
>>>> accept ANYTHING as the sole representation of a web resource, is
>>>> really out of my understanding).
>>>>
>>>> Hope this helps.
>>>>
>>>> On Wed, Dec 2, 2009 at 5:52 PM, Erick Fleming <[email protected]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>> Has any found this problem. Â Firefox and Chrome get directed to the HTML
>>>>> output, but IE 8 is being routed to the JSON call.
>>>>>
>>>>> class SampleResource extends ServerResource {
>>>>>
>>>>> Â Â @Get("html")
>>>>> Â Â def asHtml() = {
>>>>> Â Â Â Â new StringRepresentation(<h1>Hello World</h1>.toString,
>>>>> MediaType.TEXT_HTML)
>>>>> Â Â }
>>>>>
>>>>> Â Â @Get("json")
>>>>> Â Â def asJson() = {
>>>>> Â Â Â Â new StringRepresentation("""{"message":"hello world"}""",
>>>>> MediaType.APPLICATION_JSON)
>>>>> Â Â }
>>>>> }
>>>>>
>>>>> object RestlyServer {
>>>>>
>>>>> Â Â def main(args:Array[String]) {
>>>>>
>>>>> Â Â Â Â val component = new Component
>>>>>
>>>>> Â Â Â Â component.getServers.add(Protocol.HTTP, 8080)
>>>>> Â Â Â Â //component.getDefaultHost.attach(new blog.BlogApplication)
>>>>> Â Â Â Â
>>>>> component.getDefaultHost.attachDefault(classOf[SampleResource])
>>>>>
>>>>> Â Â Â Â component.start
>>>>> Â Â }
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>> ------------------------------------------------------
>>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426603
>>>
>>>
>>>
>> ------------------------------------------------------
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426745
>>
>>
>
>
>
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427033