Hi Oleg,
As promised I have taken time and reviewed the http-core code. Here are
my thoughts.
_________________________________________
HttpClientConnection/HttpServerConnection
Currently the two interfaces look quite different: while the client
interface offers fine grained methods to send headers and body
separately, the server interface does not provide similar functionality.
This should be harmonized.
The client interface competes in functionality with the
HttpRequestExcecutor.
I conclude the following:
The sendRequest method should be removed from the HttpClientConnection.
Sending a whole request is the job of the executor which already handles
entity enclosing requests. It should also take care of requests without
an entity.
Add a sendRequestLine method instead. sendRequestHeader should then
accept a HttpRequest instead of a HttpEntityEnclosingRequest.
Likewise the sendResponse method in HttpServerConnection should be
broken apart into sendResponseHeaders and sendResponseBody, so an
executor has more control over the details. Currently the default
implementation does not use an executor.
__________
HttpEntity
getContentType and getContentEncoding should not return Headers but
rather Strings.
_____________________________
Request/Response interceptors
The order of multiple interceptors may be important (I am thinking of
transparent compression or encryption, or would you rather implement
that in the entity generator?). But currently they are stored in a
(unordered) hash set in AbstractHttpProcessor.
______________________
DefaultEntityGenerator
It's a simple implementation but I find it too monolithic. An
interceptor pattern (message interceptor) similar to the
request/response interceptors may give us more flexibility here.
Happy new year
Odi
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]