hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: Invalid stream header
Date Thu, 29 Jun 2006 16:50:56 GMT
Hello sANTo,

your getting an exception on the server side from an
ObjectInputStream layered on top of a ByteArrayInputStream.
However I look at it, this has nothing to do with HttpClient
and is off-topic for this mailing list. Maybe your Hashtable
holds objects of a class that is unknown on the server side?

You are badly abusing the HTTP protocol by sending data in a
header instead of an entity (message body). If you have to
send data, in particular binary data, then use a POST or PUT
method. You can send binary data without string-encoding it.
The string en- and decoding is another potential source of
your problem. Have you debug-printed and compared the string
and the byte array on client and server side?


Using an entity, you can stream the data directly through an
ObjectOutputStream instead of wasting memory for temporary
byte arrays and strings. That's not much of a difference for
the data sizes you mentioned in your mail, but I don't know
how big your tables will become.


hope that helps,

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

View raw message