VOSpace WSDL

Dave Morris dave at ast.cam.ac.uk
Wed Jun 14 06:04:41 PDT 2006


Paul Harrison wrote:

> On 14.06.2006, at 13:35, Dave Morris wrote:
>
>> Based on our experience with VOStore and AstroGrid MySpace, we also  
>> need to distinguish between services that can accept chunked data  in 
>> a http-put call.
>> A standard http-put call sends the data size in the header, which  
>> means that the client has to buffer all of the content to calculate  
>> the size before it sends the data.
>> Sending data using http-put in chunked mode does not require the  
>> data size in the header field.
>> However, not all server implementations can accept chunked data  
>> (even though they claim to implement HTTP-1.1), so we need to be  
>> able to distinguish between services that can accept chunked data,  
>> which gives us three variants of http-put.
>
> all of these should be supported to qualify for being a http1.1  
> transport - to my way of thinking unless it supports everything it is  
> not compliant. A web browser talks "http" - it is a client  
> configuration that allows it to try for specialized features and the  
> the protocol itself has flags to say which version is being used.

The core Java HttpURLConnection in JDK 1.4.x does not support sending 
chunked data, which is what is causing some of the OutOfMemory errors in 
the AstroGrid MySpace clients.
The client tries to buffer all of the data to calculate the content-size 
header before it sends anything.

Support for chunked data was only added in JDK 1.5.
http://java.sun.com/j2se/1.5.0/docs/api/java/net/HttpURLConnection.html#setChunkedStreamingMode(int)
 
 From our experience with AstroGrid MySpace, a standard servlet running 
in Apache Tomcat on JDK-1.4.2 does not accept chunked data properly either.
This is why I need to distinguish between them.

The problems with HTTP-1.1 and chunked data in Java is only one example 
of this.
There may be others, which is why I'd rather we had a generic solution 
for specifying the details of the transfer protocol rather than a 
specific fix for this problem.

Dave



More information about the vospace mailing list