hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [HttpComponents][HttpCore] EntityGenerator and EntityWriter interfaces revisited
Date Mon, 13 Mar 2006 23:07:43 GMT
On Mon, 2006-03-13 at 14:40 +0100, Roland Weber wrote:
> Hi Oleg,
> 
> > One of the complaints about HttpCore API we have been unable to resolve
> > so far is an asymmetry between the process of entity serialization
> > (represented by the EntityWriter interface) and that of entity
> > de-serialization (represented by the EntityGenerator interface) was .
> 
> Did I complain loudly? I thought that was just in my mind :-)

You did mention that as an API deficiency at some point of time while we
were discussing the possibility of moving the transfer encoding handling
code from the HTTP connection classes to the HTTP request / response
interceptors.

> Seriously, I had also spend some brief thoughts about that point,
> but I don't remember reading anything about it on the mailing list.
> I guess you have gathered feedback elsewhere.
> 
> > (1) Rename EntityWriter to HttpEntitySerializer and EntityGenerator to
> > HttpEntityDeserializer (I am open to different (better) names). 
> 
> Fine by me. No better names jump into my mind.
> 
> > (2) The HttpEntitySerializer will be required to set (override if
> > needed) the 'Transfer-Encoding' and 'Content-Length' headers to ensure
> > the integrity of the underlying HTTP connection
> 
> The Transfer-Encoding header is the responsibility of the transport
> layer, I have no problem with having it set by the serializer. For the
> Content-Length header, I would prefer to see an exception thrown if an
> inappropriate header has been set explicitly. For both, actually.
> 

Agreed. 

I'll start hacking on it tomorrow

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message