How to diable Keep-Alive?
Hi, i want to avoid, that POST-Requests reuse connections from the pool. I'm using the MultiThreadedHttpConnectionManager because i use one HttpClient-Object from different Threads. By avoiding that POST-Request use already open HTTP-connections, i want to avoid problems with stale connections since i use InputStreams for POST-requests. Is this possibility? As far as i understood Ortwin in de.comp.lang.java, stale connections and POST-Requests and InputStreams lead to problems since a InputStream cannot be rewound. How does HttpClient currently try to work around that? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Does HttpClient decompress compressed HTTP transfers?
Hi, If i send the right accept-encoding headers, the web-server may answer with a gzip or deflate compressed stream. Does HttpClient decompress it? If yes, how can i turn that off? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HttpMethodBase.releaseConnection() finished download
Hi, it seems that releaseConnection finishes the http-download until it is complete. I don't want that. I'm looking for a way to close the HttpConnection if the download wasn't completed yet. I'm aware that one cannot abort a Http-Transfer without closing the connection and therfor loosing it for keep-alive etc. There doens't seem to be a way of closing the HttpConnection by using the HttpMethodBase-Object. What should i try next? Thx Sven - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SSL-Connection to unstrusted host
Well, the subject says it all: I'd like to connect to a host with an untrusted SSL-certfictate. When trying to connect, i always get the following exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275) at org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1351) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124) at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:779) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.flushRequestOutputStream(MultiThreadedHttpConnectionManager.java:1145) at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2257) at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2629) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1085) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:674) ... Is there any option to turn the check off? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cookies, Chunked-Post Threads
Hi, i'm working on a so called ProxyServlet which uses the Information provided by the ServletContainer to deliver the Requests to another Web-Server. At present, i'm using the HttpMethod-Objects (GetMethod, PutMethod, ...) and HttpClient.execute() to deliver the Requests to the other Web-Server. I hope you can provide me with some sollutions to the following Problems: - I like to maintain one Cookie-Container for each Session (Session = Session-Object offered by the Servlet-Container) - I like my Servlet to be Thread-safe and be abled to deliver many (unlimited) requests at a time - I tried to avoid the Content-Length Header in POST requests by using Chunked Transfer-Encoding, but the Apache-Server i'm using for testing seems to deny chunked POST-requests. Well, how's cookie-management done in Commons-HttpClient? Does each HttpClient-Object maintain it's own Cookie-Container? HttpClient.execute() doesn't seem to be thread-safe. I like chunked Transfer-Encoding since is more like a stream and not like that huge block of data that's usually used (content-length header etc.) Are chunked POST-Requests not allowed? Well, i'm setting the content-length header right now if it is provided to the servlet. So that's a big proble, but i'm just curious. Thx Sven - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]