Hi all,
I receive a NullPointerException when I'm doing this:
HttpPost method = new HttpPost(someUri);
ContentType ct = ContentType.create(text/xml);
StringEntity entity = new StringEntity(someString, ct);
method.setEntity(entity);
The javadoc says that parameter charset is optional for
Hi all,
when trying to consume deflate content coded responses I get
java.util.zip.ZipException: invalid stored block lengths exception.
server mock looks like:
header is byte array
Deflater def = new Deflater(Deflater.BEST_COMPRESSION);
def.setInput(content);
def.finish();
contentLength =
My fault. After adding the necessary CRLF it works.
String sHeader = HTTP/1.1 200 OK\r\n
+ Server: Apache\r\n
+ Content-Type: text/html\r\n
+ Content-Encoding: gzip\r\n;
But when I receive the response I have only
No - doesn't work (just forgot to mention it in my post).
I did it after my last header field Content-Length:.
Kind regards,
Michael
-Ursprüngliche Nachricht-
Von: Sam Crawford [mailto:samcrawf...@gmail.com]
Gesendet: Dienstag, 24. April 2012 11:20
An: HttpClient User Discussion
Hi all,
I just want to test the handling of compressed responses. I have some java code
which can do the compression of content and which listens to http get requests.
But I actually have no idea how to send the response respectively which
streams/writers to use and how to combine the message