hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-httpclient Wiki] Update of "GuidedTourOfHttpCore" by RolandWeber
Date Sat, 22 Dec 2007 15:39:37 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-httpclient Wiki" for change

The following page has been changed by RolandWeber:

The comment on the change is:
updated for changes in message representation (HttpVersion vs. ProtocolVersion)

  So here we have a set of interfaces for the building blocks of an HTTP message.
  There's the {{{RequestLine}}} for a request and the
- {{{StatusLine}}} for a response, both containing an {{{HttpVersion}}}.
+ {{{StatusLine}}} for a response, both containing a {{{ProtocolVersion}}}.
- The latter is so simple that we made it a class instead of an interface.
+ The latter is so elementary that we made it a class instead of an interface,
+ and of course we have the {{{HttpVersion}}} derived from it.
  Then we have a {{{Header}}} with name and value, where the value
  can have multiple {{{HeaderElement}}}s. And finally there is the
  message body, the {{{HttpEntity}}}.
+  '''Q:'''
+  {{{HttpVersion}}} derived from {{{ProtocolVersion}}}?
+  Wouldn't the protocol always be HTTP in HttpCore?
+  [[BR]]
+  '''A:'''
+  Not quite. There is at least one other protocol,
+  the Session Initiation Protocol SIP,
+  which has a message format identical to that of HTTP.
+  Only the protocol name and version differs.
+  Since it's so similar, we tried to keep the door open.
+  [[BR]]
+  '''Q:''' That makes sense.
- Out of these building blocks, we collect messages.
+ So, out of these building blocks, we collect messages.
  Every {{{HttpMessage}}} has headers, which can be added or deleted at will.
  {{{HttpRequest}}} adds the request line,
  {{{HttpEntityEnclosingRequest}}} an entity.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message