hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Weber" <ROLWE...@de.ibm.com>
Subject Re: Cookies, Chunked-Post & Threads
Date Wed, 12 Nov 2003 06:55:58 GMT
Hello Sven,

1. Cookie Container:
Let every session use it's own HttpState object. That's where
HTTP Client stores it's cookies. The only problem is that it's
not serializable, so it won't work with persistent sessions.

2. Thread Safety:
HTTP Client is thread safe as long as you use a thread safe
connection manager.

3. Unlimited Requests:
Adjust the parameters of the MultiThreadedConnectionManager
to change the maximum number of simultaneous requests. Your
servlet container most likely has some load limitation policy, so
you don't have to allow much more connections than there are
threads to execute servlets.

(no clue about content length in POST requests)


Sven Köhler <skoehler@upb.de>
12.11.2003 01:55
Please respond to "Commons HttpClient Project"
        To:     Commons HttpClient Project 
        Subject:        Cookies, Chunked-Post & Threads


i'm working on a so called ProxyServlet which uses the Information 
provided by the ServletContainer to deliver the Requests to another 
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.


To unsubscribe, e-mail: 
For additional commands, e-mail: 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message