You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Marc Speck <ma...@gmail.com> on 2008/08/25 11:35:50 UTC
Related to SLING-613: tunnel exceptions in HTTP status 200 responses
I've just read about SLING-613 and thought it's the right moment to raise
awareness about Flash/Flex limitations. Besides other limitations, Flash
cannot handle any HTTP status besides 200. A solution that has established
is to tunnel every response in status 200. For example, Alfresco Webscripts
handle this with a switch in the HTTP request header,
http://wiki.alfresco.com/wiki/Web_Scripts#Forcing_Success_Response_Status .
So it boils down to the question whether Flex/Flash support is an issue for
Sling?
Marc
Re: Related to SLING-613: tunnel exceptions in HTTP status 200 responses
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Mon, Aug 25, 2008 at 4:13 PM, Felix Meschberger <fm...@gmail.com> wrote:
> ...If requirements get too specific, I would suggest to introduce a request
> level filter, which implements this kind of functionality, it would be
> easier and better to handle anyway I think ...
+1, if the changes are specifically meant to work around Flash client
problems, a FlashPlayerRequestFilter sounds like the cleanest
solution.
-Bertrand
Re: Related to SLING-613: tunnel exceptions in HTTP status 200 responses
Posted by Marc Speck <ma...@gmail.com>.
Hi Felix
>
> We support a special header asking for 200-only responses. The
>>> SlingMaingServlet wraps the response such, that the setStatus code is
>>> ignored. In this case, the response would also be set non-cacheable and a
>>> log message (maybe even a request progress tracker entry) would be
>>> emitted
>>> about this fact.
>>>
>>>
>> You mean, the setStatus is ignored for the HTTP status but it is put into
>> the response body, right? Handling cache headers for the embedded Flash
>> Player is also quite delicate: You must set it to e.g. "Cache-Control:
>> no-store" and remove any Pragma headers. Many other configurations don't
>> work (yes, it's <put in your favorite word for these kind of
>> implementations>).
>>
>
> Hmm, we can of course inspect the HTTP version of the request and not send
> the Pragma header. Regarding the Cache-Control: I would think, we would just
> set about any no-* flag on that header. This should not bomb ...
If Pragma is set to any value, Flash can not receive data in IE over SSL. I
summed up the problem in a blog,
http://faindu.wordpress.com/2008/04/18/ie7-ssl-xml-flex-error-2032-stream-error/
>
>
> If requirements get too specific, I would suggest to introduce a request
> level filter, which implements this kind of functionality, it would be
> easier and better to handle anyway I think ...
>
> I'm not familiar enough with Sling to discuss the implementation but it
sounds like a typical filtering task to me. I'm not aware of any other
technology that only handles 200 responses, so it is anyway a Flash/IE
specific solution.
Marc
Re: Related to SLING-613: tunnel exceptions in HTTP status 200 responses
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Marc,
Marc Speck schrieb:
>>
>> Personally, I don't really think that a client side application running
>> havock on non-200 response is well behaving ... But given reality, we might
>> want to support such things.
>
>
> fully agree. Vote for http://bugs.adobe.com/jira/browse/FP-251 ...
ok
>> We support a special header asking for 200-only responses. The
>> SlingMaingServlet wraps the response such, that the setStatus code is
>> ignored. In this case, the response would also be set non-cacheable and a
>> log message (maybe even a request progress tracker entry) would be emitted
>> about this fact.
>>
>
> You mean, the setStatus is ignored for the HTTP status but it is put into
> the response body, right? Handling cache headers for the embedded Flash
> Player is also quite delicate: You must set it to e.g. "Cache-Control:
> no-store" and remove any Pragma headers. Many other configurations don't
> work (yes, it's <put in your favorite word for these kind of
> implementations>).
Hmm, we can of course inspect the HTTP version of the request and not
send the Pragma header. Regarding the Cache-Control: I would think, we
would just set about any no-* flag on that header. This should not bomb ...
If requirements get too specific, I would suggest to introduce a request
level filter, which implements this kind of functionality, it would be
easier and better to handle anyway I think ...
Regards
Felix
Re: Related to SLING-613: tunnel exceptions in HTTP status 200 responses
Posted by Marc Speck <ma...@gmail.com>.
>
>
> Personally, I don't really think that a client side application running
> havock on non-200 response is well behaving ... But given reality, we might
> want to support such things.
fully agree. Vote for http://bugs.adobe.com/jira/browse/FP-251 ...
>
> In addition, we will only be able to support this to a certain point, in
> particular we cannot prevent the servlet container from sending a non-200
> response.
That's better than nothing.
> So, what I can offer is the following:
>
> We support a special header asking for 200-only responses. The
> SlingMaingServlet wraps the response such, that the setStatus code is
> ignored. In this case, the response would also be set non-cacheable and a
> log message (maybe even a request progress tracker entry) would be emitted
> about this fact.
>
You mean, the setStatus is ignored for the HTTP status but it is put into
the response body, right? Handling cache headers for the embedded Flash
Player is also quite delicate: You must set it to e.g. "Cache-Control:
no-store" and remove any Pragma headers. Many other configurations don't
work (yes, it's <put in your favorite word for these kind of
implementations>).
Marc
Re: Related to SLING-613: tunnel exceptions in HTTP status 200 responses
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Marc Speck schrieb:
> I've just read about SLING-613 and thought it's the right moment to raise
> awareness about Flash/Flex limitations. Besides other limitations, Flash
> cannot handle any HTTP status besides 200. A solution that has established
> is to tunnel every response in status 200. For example, Alfresco Webscripts
> handle this with a switch in the HTTP request header,
> http://wiki.alfresco.com/wiki/Web_Scripts#Forcing_Success_Response_Status .
>
> So it boils down to the question whether Flex/Flash support is an issue for
> Sling?
I don't see a reason, why we should not support Flex/Flash.
Personally, I don't really think that a client side application running
havock on non-200 response is well behaving ... But given reality, we
might want to support such things.
In addition, we will only be able to support this to a certain point, in
particular we cannot prevent the servlet container from sending a
non-200 response.
So, what I can offer is the following:
We support a special header asking for 200-only responses. The
SlingMaingServlet wraps the response such, that the setStatus code is
ignored. In this case, the response would also be set non-cacheable and
a log message (maybe even a request progress tracker entry) would be
emitted about this fact.
What do others think on this ?
Regards
Felix
> Marc
>