On 01/06/2016 22:27, Steffen Heil (Mailinglisten) wrote:
> Hi
> 
> 
>> I believe that, while the HTTP specification supports what you want to do, 
>> neither servers nor clients support it. For example, you can
>> use "trailers" (headers end the end of the response) to tell the client what 
>> happened, but I suspect that no client will actually read
>> them or act on them.
> 
> I did not even know such things exist.
> A quick google check seems to indicate that you are right: No real client 
> supports them in a way usable for me.
> 
> 
>> You can always force a disconnect by simply closing the response stream. 
>> Usually, the client will either tell the user that the download
>> failed (connection closed before response - or chunk of response - 
>> completed), more likely just shows the user a blank page or saves
>> an incomplete file.
> 
> That's another story.
> I tried that. And the internet explorer as well as curl report an error, if 
> the download stops without the ending 0\r\n.
> 
> But I had to set "Connection: close" and "Transfer-Encoding: chunked" myself 
> and encode the chunk headers myself.
> If I leave these two headers out, tomcat managed the transfer-encoding (as I 
> set no Content-Length header) which I would prefer.
> However then I find no way to close the connection. If I call "close()" on 
> the OutputStream tomcat sends 0\r\n.
> Even if I throw an exception, tomcat "correctly" closes the stream.
> I did not find any way to close it without that.
> 
> Is there any way to do so?

Tomcat version?

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to