Hi Andy,
Sorry for the late response. I was busy moving to a new house. :)
First off, you have done a fantastic job! I'd like to know if there was any
difficulty in implementing HTTP on top of Netty so that I can make the Netty API more
user-friendly. :)
Now, some subtle points:
1) IIUC, HTTP allows multiple headers with the same key. It seems like the current
HttpMessage interface assumes there's only one value per key. Therefore, the headers
should be represented as Set<String, List> instead of Map<String, String>.
This issue will lead to various changes in the header accessor methods of the HttpMessage
interface.
2) HTTP allows multiple parameters with the same key. Therefore, the parameters should be
represented as Set<String, List> instead of Map<String, String>. (Same with
the issue 1)
3) I'm not sure if a multi-line header is decoded correctly:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
4) Reason (error message) is missing in HttpResponse. HttpResponseStatusCode already has
the pre-defined reason phrases, but it should be customizable on a per-response basis.
(Perhaps we could simply make the HttpResponseStatusCode constructor public?)
5) What about renaming HttpProtocol to HttpVersion? P of HTTP already stands for
'protocol'. Also, HttpRequest.get/setProtocol() needs to be renamed to
get/setVersion() or get/setProtocolVersion().
6) java.net.URI already has a query property. I think we don't need the parameter
accessor methods in the HttpRequest interface. We could provide a helper class like
UriBuilder later.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186673#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...