Repository: incubator-juneau Updated Branches: refs/heads/master 0d913b38f -> 19c566dd2
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Expires.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Expires.java b/juneau-core/src/main/java/org/apache/juneau/http/Expires.java index 80e26bd..cce726d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Expires.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Expires.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Expires</l> HTTP response header. + * * <p> * Gives the date/time after which the response is considered stale (in "HTTP-date" format as defined by RFC 7231). * @@ -23,38 +24,48 @@ package org.apache.juneau.http; * </p> * * <h6 class='topic'>RFC2616 Specification</h6> + * * The Expires entity-header field gives the date/time after which the response is considered stale. * A stale cache entry may not normally be returned by a cache (either a proxy cache or a user agent cache) unless it is * first validated with the origin server * (or with an intermediate cache that has a fresh copy of the entity). * See section 13.2 for further discussion of the expiration model. + * * <p> * The presence of an Expires field does not imply that the original resource will change or cease to exist at, before, * or after that time. + * * <p> * The format is an absolute date and time as defined by HTTP-date in section 3.3.1; it MUST be in RFC 1123 date format: + * * <p class='bcode'> * Expires = "Expires" ":" HTTP-date * </p> + * * <p> * An example of its use is... * <p class='bcode'> * Expires: Thu, 01 Dec 1994 16:00:00 GMT * </p> + * * <p> * Note: if a response includes a Cache-Control field with the max-age directive (see section 14.9.3), that directive * overrides the Expires field. + * * <p> * HTTP/1.1 clients and caches MUST treat other invalid date formats, especially including the value "0", as in the past * (i.e., "already expired"). + * * <p> * To mark a response as "already expired," an origin server sends an Expires date that is equal to the Date header * value. * (See the rules for expiration calculations in section 13.2.4.) + * * <p> * To mark a response as "never expires," an origin server sends an Expires date approximately one year from the time * the response is sent. * HTTP/1.1 servers SHOULD NOT send Expires dates more than one year in the future. + * * <p> * The presence of an Expires header field with a date value of some time in the future on a response that otherwise * would by default be non-cacheable indicates that the response is cacheable, unless indicated otherwise by a http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/From.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/From.java b/juneau-core/src/main/java/org/apache/juneau/http/From.java index 14d5609..7a3706f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/From.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/From.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>From</l> HTTP request header. + * * <p> * The email address of the user making the request. * @@ -27,14 +28,17 @@ package org.apache.juneau.http; * The From request-header field, if given, SHOULD contain an Internet e-mail address for the human user who controls * the requesting user agent. * The address SHOULD be machine-usable, as defined by "mailbox" in RFC 822 [9] as updated by RFC 1123 [8]: + * * <p class='bcode'> * From = "From" ":" mailbox * </p> + * * <p> * An example is: * <p class='bcode'> * From: [email protected] * </p> + * * <p> * This header field MAY be used for logging purposes and as a means for identifying the source of invalid or unwanted * requests. @@ -43,9 +47,11 @@ package org.apache.juneau.http; * responsibility for the method performed. * In particular, robot agents SHOULD include this header so that the person responsible for running the robot can be * contacted if problems occur on the receiving end. + * * <p> * The Internet e-mail address in this field MAY be separate from the Internet host which issued the request. * For example, when a request is passed through a proxy the original issuer's address SHOULD be used. + * * <p> * The client SHOULD NOT send the From header field without the user's approval, as it might conflict with the user's * privacy interests or their site's security policy. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderDate.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderDate.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderDate.java index a1b7b92..1a1ad66 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderDate.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderDate.java @@ -16,6 +16,7 @@ import org.apache.juneau.internal.*; /** * Category of headers that consist of a single HTTP-date. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidator.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidator.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidator.java index d0faf41..d1b1cc4 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidator.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidator.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Category of headers that consist of a single entity validator value. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidatorArray.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidatorArray.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidatorArray.java index 4ba2259..b8675c1 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidatorArray.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderEntityValidatorArray.java @@ -16,6 +16,7 @@ import org.apache.juneau.internal.*; /** * Category of headers that consist of a comma-delimited list of entity validator values. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderEnum.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderEnum.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderEnum.java index 230aa61..56a202f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderEnum.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderEnum.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Category of headers that consist of a single enum value. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> @@ -65,6 +66,7 @@ public class HeaderEnum<E extends Enum<E>> { /** * Returns this header as a simple string value. + * * <p> * Functionally equivalent to calling {@link #toString()}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderInteger.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderInteger.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderInteger.java index 4a628f3..2e58b32 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderInteger.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderInteger.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Category of headers that consist of a single integer value. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> @@ -53,6 +54,7 @@ public class HeaderInteger { /** * Returns this header as a simple string value. + * * <p> * Functionally equivalent to calling {@link #toString()}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderRangeArray.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderRangeArray.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderRangeArray.java index 6401574..8567ca4 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderRangeArray.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderRangeArray.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * Category of headers that consist of simple comma-delimited lists of strings with q-values. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> @@ -68,6 +69,7 @@ public class HeaderRangeArray { /** * Returns the list of the types ranges that make up this header. + * * <p> * The types ranges in the list are sorted by their q-value in descending order. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderString.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderString.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderString.java index 5195550..659300c 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderString.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderString.java @@ -16,6 +16,7 @@ import org.apache.juneau.internal.*; /** * Category of headers that consist of a single string value. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> @@ -66,6 +67,7 @@ public class HeaderString { /** * Returns this header as a simple string value. + * * <p> * Functionally equivalent to calling {@link #toString()}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderStringArray.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderStringArray.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderStringArray.java index 6ba933e..ca07d3c 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderStringArray.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderStringArray.java @@ -16,6 +16,7 @@ import org.apache.juneau.internal.*; /** * Category of headers that consist of a comma-delimited list of string values. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> @@ -46,6 +47,7 @@ public class HeaderStringArray { /** * Returns this header as a simple string value. + * * <p> * Functionally equivalent to calling {@link #toString()}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HeaderUri.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HeaderUri.java b/juneau-core/src/main/java/org/apache/juneau/http/HeaderUri.java index c4c976d..feae45d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HeaderUri.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HeaderUri.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * Category of headers that consist of a single URL value. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> @@ -57,6 +58,7 @@ public class HeaderUri{ /** * Returns this header as a simple string value. + * * <p> * Functionally equivalent to calling {@link #toString()}. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Host.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Host.java b/juneau-core/src/main/java/org/apache/juneau/http/Host.java index d60c6a1..cc548da 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Host.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Host.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Host</l> HTTP request header. + * * <p> * The domain name of the server (for virtual hosting), and the TCP port number on which the server is listening. * The port number may be omitted if the port is the standard port for the service requested. @@ -33,9 +34,11 @@ package org.apache.juneau.http; * The Host field value MUST represent the naming authority of the origin server or gateway given by the original URL. * This allows the origin server or gateway to differentiate between internally-ambiguous URLs, such as the root "/" URL * of a server for multiple host names on a single IP address. + * * <p class='bcode'> * Host = "Host" ":" host [ ":" port ] ; Section 3.2.2 * </p> + * * <p> * A "host" without any trailing port information implies the default port for the service requested (e.g., "80" for an * HTTP URL). @@ -44,6 +47,7 @@ package org.apache.juneau.http; * GET /pub/WWW/ HTTP/1.1 * Host: www.w3.org * </p> + * * <p> * A client MUST include a Host header field in all HTTP/1.1 request messages. * If the requested URI does not include an Internet host name for the service being requested, then the Host header @@ -52,6 +56,7 @@ package org.apache.juneau.http; * identifies the service being requested by the proxy. * All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request * message which lacks a Host header field. + * * <p> * See sections 5.2 and 19.6.1.1 for other requirements relating to Host. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/HttpMethod.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/HttpMethod.java b/juneau-core/src/main/java/org/apache/juneau/http/HttpMethod.java index 76876ae..58313a2 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/HttpMethod.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/HttpMethod.java @@ -69,6 +69,7 @@ public enum HttpMethod { /** * Returns the enum for the specified key. + * * <p> * Case is ignored. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/IfMatch.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/IfMatch.java b/juneau-core/src/main/java/org/apache/juneau/http/IfMatch.java index e8a09c6..a2d5b02 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/IfMatch.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/IfMatch.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>If-Match</l> HTTP request header. + * * <p> * Only perform the action if the client supplied entity matches the same entity on the server. * This is mainly for methods like PUT to only update a resource if it has not been modified since the user last @@ -34,39 +35,50 @@ package org.apache.juneau.http; * overhead. * It is also used, on updating requests, to prevent inadvertent modification of the wrong version of a resource. * As a special case, the value "*" matches any current entity of the resource. + * * <p class='bcode'> * If-Match = "If-Match" ":" ( "*" | 1#entity-tag ) * </p> + * * <p> * If any of the entity tags match the entity tag of the entity that would have been returned in the response to a * similar GET request (without the If-Match header) on that resource, or if "*" is given and any current entity exists * for that resource, then the server MAY perform the requested method as if the If-Match header field did not exist. + * * <p> * A server MUST use the strong comparison function (see section 13.3.3) to compare the entity tags in If-Match. + * * <p> * If none of the entity tags match, or if "*" is given and no current entity exists, the server MUST NOT perform the * requested method, and MUST return a 412 (Precondition Failed) response. * This behavior is most useful when the client wants to prevent an updating method, such as PUT, from modifying a * resource that has changed since the client last retrieved it. + * * <p> * If the request would, without the If-Match header field, result in anything other than a 2xx or 412 status, then the * If-Match header MUST be ignored. + * * <p> * The meaning of "If-Match: *" is that the method SHOULD be performed if the representation selected by the origin * server (or by a cache, possibly using the Vary mechanism, see section 14.44) exists, and MUST NOT be performed if the * representation does not exist. + * * <p> * A request intended to update a resource (e.g., a PUT) MAY include an If-Match header field to signal that the request * method MUST NOT be applied if the entity corresponding to the If-Match value (a single entity tag) is no longer a * representation of that resource. * This allows the user to indicate that they do not wish the request to be successful if the resource has been changed * without their knowledge. + * + * <p> * Examples: * <p class='bcode'> * If-Match: "xyzzy" * If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz" * If-Match: * * </p> + * + * <p> * The result of a request having both an If-Match header field and either an If-None-Match or an If-Modified-Since * header fields is undefined by this specification. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/IfModifiedSince.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/IfModifiedSince.java b/juneau-core/src/main/java/org/apache/juneau/http/IfModifiedSince.java index 30adcfe..5deef37 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/IfModifiedSince.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/IfModifiedSince.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>If-Modified-Since</l> HTTP request header. + * * <p> * Allows a 304 Not Modified to be returned if content is unchanged. * @@ -27,14 +28,17 @@ package org.apache.juneau.http; * The If-Modified-Since request-header field is used with a method to make it conditional: * if the requested variant has not been modified since the time specified in this field, an entity will not be returned * from the server; instead, a 304 (not modified) response will be returned without any message-body. + * * <p class='bcode'> * If-Modified-Since = "If-Modified-Since" ":" HTTP-date * </p> + * * <p> * An example of the field is: * <p class='bcode'> * If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT * </p> + * * <p> * A GET method with an If-Modified-Since header and no Range header requests that the identified entity be transferred * only if it has been modified since the date given by the If-Modified-Since header. @@ -48,17 +52,23 @@ package org.apache.juneau.http; * <li>If the variant has not been modified since a valid If-Modified-Since date, the server SHOULD return a 304 * (Not Modified) response. * </ol> + * + * <p> * The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction * overhead. + * * <p> * Note: The Range request-header field modifies the meaning of If-Modified-Since; see section 14.35 for full details. + * * <p> * Note: If-Modified-Since times are interpreted by the server, whose clock might not be synchronized with the client. + * * <p> * Note: When handling an If-Modified-Since header field, some servers will use an exact date comparison function, * rather than a less-than function, for deciding whether to send a 304 (Not Modified) response. * To get best results when sending an If-Modified-Since header field for cache validation, clients are * advised to use the exact date string received in a previous Last-Modified header field whenever possible. + * * <p> * Note: If a client uses an arbitrary date in the If-Modified-Since header instead of a date taken from the * Last-Modified header for the same request, the client should be aware of the fact that this date is interpreted in http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/IfNoneMatch.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/IfNoneMatch.java b/juneau-core/src/main/java/org/apache/juneau/http/IfNoneMatch.java index 1494f9b..81c00fa 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/IfNoneMatch.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/IfNoneMatch.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>If-None-Match</l> HTTP request header. + * * <p> * Allows a 304 Not Modified to be returned if content is unchanged. * @@ -31,11 +32,14 @@ package org.apache.juneau.http; * overhead. * It is also used to prevent a method (e.g. PUT) from inadvertently modifying an existing resource when the client * believes that the resource does not exist. + * * <p> * As a special case, the value "*" matches any current entity of the resource. + * * <p class='bcode'> * If-None-Match = "If-None-Match" ":" ( "*" | 1#entity-tag ) * </p> + * * <p> * If any of the entity tags match the entity tag of the entity that would have been returned in the response to a * similar GET request (without the If-None-Match header) on that resource, or if "*" is given @@ -45,23 +49,28 @@ package org.apache.juneau.http; * Instead, if the request method was GET or HEAD, the server SHOULD respond with a 304 (Not Modified) response, * including the cache- related header fields (particularly ETag) of one of the entities that matched. * For all other request methods, the server MUST respond with a status of 412 (Precondition Failed). + * * <p> * See section 13.3.3 for rules on how to determine if two entities tags match. * The weak comparison function can only be used with GET or HEAD requests. + * * <p> * If none of the entity tags match, then the server MAY perform the requested method as if the If-None-Match header * field did not exist, but MUST also ignore any If-Modified-Since header field(s) in the request. * That is, if no entity tags match, then the server MUST NOT return a 304 (Not Modified) response. + * * <p> * If the request would, without the If-None-Match header field, result in anything other than a 2xx or 304 status, * then the If-None-Match header MUST be ignored. * (See section 13.3.4 for a discussion of server behavior when both If-Modified-Since and If-None-Match appear in the * same request.) + * * <p> * The meaning of "If-None-Match: *" is that the method MUST NOT be performed if the representation selected by the * origin server (or by a cache, possibly using the Vary mechanism, see section 14.44) exists, and SHOULD be performed * if the representation does not exist. * This feature is intended to be useful in preventing races between PUT operations. + * * <p> * Examples: * <p class='bcode'> @@ -71,6 +80,7 @@ package org.apache.juneau.http; * If-None-Match: W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz" * If-None-Match: * * </p> + * * <p> * The result of a request having both an If-None-Match header field and either an If-Match or an If-Unmodified-Since * header fields is undefined by this specification. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/IfRange.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/IfRange.java b/juneau-core/src/main/java/org/apache/juneau/http/IfRange.java index 6fe2995..b941b2b 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/IfRange.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/IfRange.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * Represents a parsed <l>If-Range</l> HTTP request header. + * * <p> * If the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity. * @@ -33,6 +34,7 @@ import org.apache.juneau.internal.*; * If-Unmodified-Since and If-Match.) * However, if the condition fails because the entity has been modified, the client would then have to make a second * request to obtain the entire current entity-body. + * * <p> * The If-Range header allows a client to "short-circuit" the second request. * Informally, its meaning is `if the entity is unchanged, send me the part(s) that I am missing; otherwise, send me @@ -40,6 +42,7 @@ import org.apache.juneau.internal.*; * <p class='bcode'> * If-Range = "If-Range" ":" ( entity-tag | HTTP-date ) * </p> + * * <p> * If the client has no entity tag for an entity, but does have a Last- Modified date, it MAY use that date in an * If-Range header. @@ -47,6 +50,7 @@ import org.apache.juneau.internal.*; * characters.) * The If-Range header SHOULD only be used together with a Range header, and MUST be ignored if the request does not * include a Range header, or if the server does not support the sub-range operation. + * * <p> * If the entity tag given in the If-Range header matches the current entity tag for the entity, then the server SHOULD * provide the specified sub-range of the entity using a 206 (Partial content) response. @@ -94,7 +98,8 @@ public final class IfRange extends HeaderString { /** * Returns this header value as an {@link EntityValidator} object. * - * @return This header value as a {@link EntityValidator} object, or <jk>null</jk> if the value is not an entity + * @return + * This header value as a {@link EntityValidator} object, or <jk>null</jk> if the value is not an entity * validator. */ public EntityValidator asValidator() { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/IfUnmodifiedSince.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/IfUnmodifiedSince.java b/juneau-core/src/main/java/org/apache/juneau/http/IfUnmodifiedSince.java index a5d83a3..5d1f74f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/IfUnmodifiedSince.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/IfUnmodifiedSince.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>If-Unmodified-Since</l> HTTP request header. + * * <p> * Only send the response if the entity has not been modified since a specific time. * @@ -23,25 +24,32 @@ package org.apache.juneau.http; * </p> * * <h6 class='topic'>RFC2616 Specification</h6> + * * The If-Unmodified-Since request-header field is used with a method to make it conditional. * If the requested resource has not been modified since the time specified in this field, the server SHOULD perform the * requested operation as if the If-Unmodified-Since header were not present. + * * <p> * If the requested variant has been modified since the specified time, the server MUST NOT perform the requested * operation, and MUST return a 412 (Precondition Failed). + * * <p class='bcode'> * If-Unmodified-Since = "If-Unmodified-Since" ":" HTTP-date * </p> + * * <p> * An example of the field is: * <p class='bcode'> * If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT * </p> + * * <p> * If the request normally (i.e., without the If-Unmodified-Since header) would result in anything other than a 2xx or * 412 status, the If-Unmodified-Since header SHOULD be ignored. + * * <p> * If the specified date is invalid, the header is ignored. + * * <p> * The result of a request having both an If-Unmodified-Since header field and either an If-None-Match or an * If-Modified-Since header fields is undefined by this specification. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/LastModified.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/LastModified.java b/juneau-core/src/main/java/org/apache/juneau/http/LastModified.java index 56a9041..94d543a 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/LastModified.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/LastModified.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Last-Modified</l> HTTP response header. + * * <p> * The last modified date for the requested object (in "HTTP-date" format as defined by RFC 7231). * @@ -26,14 +27,17 @@ package org.apache.juneau.http; * * The Last-Modified entity-header field indicates the date and time at which the origin server believes the variant was * last modified. + * * <p class='bcode'> * Last-Modified = "Last-Modified" ":" HTTP-date * </p> + * * <p> * An example of its use is... * <p class='bcode'> * Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT * </p> + * * <p> * The exact meaning of this header field depends on the implementation of the origin server and the nature of the * original resource. @@ -42,15 +46,18 @@ package org.apache.juneau.http; * component parts. * For database gateways, it may be the last-update time stamp of the record. * For virtual objects, it may be the last time the internal state changed. + * * <p> * An origin server MUST NOT send a Last-Modified date which is later than the server's time of message origination. * In such cases, where the resource's last modification would indicate some time in the future, the server MUST replace * that date with the message origination date. + * * <p> * An origin server SHOULD obtain the Last-Modified value of the entity as close as possible to the time that it * generates the Date value of its response. * This allows a recipient to make an accurate assessment of the entity's modification time, especially if the entity * changes near the time that the response is generated. + * * <p> * HTTP/1.1 servers SHOULD send Last-Modified whenever feasible. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Location.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Location.java b/juneau-core/src/main/java/org/apache/juneau/http/Location.java index fdf3c7a..8734aaf 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Location.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Location.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Location</l> HTTP response header. + * * <p> * Used in redirection, or when a new resource has been created. * @@ -29,14 +30,17 @@ package org.apache.juneau.http; * For 201 (Created) responses, the Location is that of the new resource which was created by the request. * For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. * The field value consists of a single absolute URI. + * * <p class='bcode'> * Location = "Location" ":" absoluteURI * </p> + * * <p> * An example is: * <p class='bcode'> * Location: http://www.w3.org/pub/WWW/People.html * </p> + * * <p> * Note: The Content-Location header field (section 14.14) differs from Location in that the Content-Location identifies * the original location of the entity enclosed in the request. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/MaxForwards.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/MaxForwards.java b/juneau-core/src/main/java/org/apache/juneau/http/MaxForwards.java index c94a2cd..fa8dc07 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/MaxForwards.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/MaxForwards.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Max-Forwards</l> HTTP request header. + * * <p> * Limit the number of times the message can be forwarded through proxies or gateways. * @@ -28,12 +29,15 @@ package org.apache.juneau.http; * methods to limit the number of proxies or gateways that can forward the request to the next inbound server. * This can be useful when the client is attempting to trace a request chain which appears to be failing or looping in * mid-chain. + * * <p class='bcode'> * Max-Forwards = "Max-Forwards" ":" 1*DIGIT * </p> + * * <p> * The Max-Forwards value is a decimal integer indicating the remaining number of times this request message may be * forwarded. + * * <p> * Each proxy or gateway recipient of a TRACE or OPTIONS request containing a Max-Forwards header field MUST check and * update its value prior to forwarding the request. @@ -41,6 +45,7 @@ package org.apache.juneau.http; * recipient. * If the received Max-Forwards value is greater than zero, then the forwarded message MUST contain an updated * Max-Forwards field with a value decremented by one (1). + * * <p> * The Max-Forwards header field MAY be ignored for all other methods defined by this specification and for any * extension methods for which it is not explicitly referred to as part of that method definition. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java b/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java index 148054a..8e8d47d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/MediaType.java @@ -72,18 +72,22 @@ public class MediaType implements Comparable<MediaType> { * Returns the media type for the specified string. * The same media type strings always return the same objects so that these objects * can be compared for equality using '=='. - * <p> + * * <h5 class='section'>Notes:</h5> * <ul> - * <li>Spaces are replaced with <js>'+'</js> characters. + * <li> + * Spaces are replaced with <js>'+'</js> characters. * This gets around the issue where passing media type strings with <js>'+'</js> as HTTP GET parameters * get replaced with spaces by your browser. Since spaces aren't supported by the spec, this * is doesn't break anything. - * <li>Anything including and following the <js>';'</js> character is ignored (e.g. <js>";charset=X"</js>). + * <li> + * Anything including and following the <js>';'</js> character is ignored (e.g. <js>";charset=X"</js>). * </ul> * - * @param s The media type string. Will be lowercased. - * Returns <jk>null</jk> if input is null. + * @param s + * The media type string. + * Will be lowercased. + * Returns <jk>null</jk> if input is null. * @return A cached media type object. */ public static MediaType forString(String s) { @@ -168,6 +172,8 @@ public class MediaType implements Comparable<MediaType> { /** * Returns the subtypes broken down by fragments delimited by <js>"'"</js>. + * + * <P> * For example, the media type <js>"text/foo+bar"</js> will return a list of * <code>[<js>'foo'</js>,<js>'bar'</js>]</code> * @@ -179,6 +185,7 @@ public class MediaType implements Comparable<MediaType> { /** * Returns <jk>true</jk> if this media type is a match for the specified media type. + * * <p> * Matches if any of the following is true: * <ul> @@ -197,6 +204,7 @@ public class MediaType implements Comparable<MediaType> { /** * Returns a match metric against the specified media type where a larger number represents a better match. + * * <p> * <ul> * <li>Exact matches (e.g. <js>"text/json"<js>/</js>"text/json"</js>) should match @@ -253,6 +261,7 @@ public class MediaType implements Comparable<MediaType> { /** * Returns the additional parameters on this media type. + * * <p> * For example, given the media type string <js>"text/html;level=1"</js>, will return a map * with the single entry <code>{level:[<js>'1'</js>]}</code>. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/MediaTypeRange.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/MediaTypeRange.java b/juneau-core/src/main/java/org/apache/juneau/http/MediaTypeRange.java index dd48a70..0267b3d 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/MediaTypeRange.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/MediaTypeRange.java @@ -42,9 +42,11 @@ public final class MediaTypeRange implements Comparable<MediaTypeRange> { /** * Parses an <code>Accept</code> header value into an array of media ranges. + * * <p> * The returned media ranges are sorted such that the most acceptable media is available at ordinal position * <js>'0'</js>, and the least acceptable at position n-1. + * * <p> * The syntax expected to be found in the referenced <code>value</code> complies with the syntax described in * RFC2616, Section 14.1, as described below: @@ -60,11 +62,13 @@ public final class MediaTypeRange implements Comparable<MediaTypeRange> { * accept-extension = ";" token [ "=" ( token | quoted-string ) ] * </p> * - * @param value The value to parse. If <jk>null</jk> or empty, returns a single <code>MediaTypeRange</code> is - * returned that represents all types. - * @return The media ranges described by the string. - * The ranges are sorted such that the most acceptable media is available at ordinal position <js>'0'</js>, and the - * least acceptable at position n-1. + * @param value + * The value to parse. + * If <jk>null</jk> or empty, returns a single <code>MediaTypeRange</code> is returned that represents all types. + * @return + * The media ranges described by the string. + * The ranges are sorted such that the most acceptable media is available at ordinal position <js>'0'</js>, and + * the least acceptable at position n-1. */ public static MediaTypeRange[] parse(String value) { @@ -157,8 +161,10 @@ public final class MediaTypeRange implements Comparable<MediaTypeRange> { /** * Returns the <js>'q'</js> (quality) value for this type, as described in Section 3.9 of RFC2616. + * * <p> * The quality value is a float between <code>0.0</code> (unacceptable) and <code>1.0</code> (most acceptable). + * * <p> * If 'q' value doesn't make sense for the context (e.g. this range was extracted from a <js>"content-*"</js> * header, as opposed to <js>"accept-*"</js> header, its value will always be <js>"1"</js>. @@ -171,6 +177,7 @@ public final class MediaTypeRange implements Comparable<MediaTypeRange> { /** * Returns the optional set of custom extensions defined for this type. + * * <p> * Values are lowercase and never <jk>null</jk>. * @@ -182,6 +189,7 @@ public final class MediaTypeRange implements Comparable<MediaTypeRange> { /** * Provides a string representation of this media range, suitable for use as an <code>Accept</code> header value. + * * <p> * The literal text generated will be all lowercase. * @@ -245,6 +253,7 @@ public final class MediaTypeRange implements Comparable<MediaTypeRange> { /** * Compares two MediaRanges for equality. + * * <p> * The values are first compared according to <code>qValue</code> values. * Should those values be equal, the <code>type</code> is then lexicographically compared (case-insensitive) in http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Pragma.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Pragma.java b/juneau-core/src/main/java/org/apache/juneau/http/Pragma.java index 85d9408..e95b1cc 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Pragma.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Pragma.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Pragma</l> HTTP request/response header. + * * <p> * Implementation-specific fields that may have various effects anywhere along the request-response chain. * @@ -23,15 +24,18 @@ package org.apache.juneau.http; * </p> * * <h6 class='topic'>RFC2616 Specification</h6> + * * The Pragma general-header field is used to include implementation- specific directives that might apply to any * recipient along the request/response chain. * All pragma directives specify optional behavior from the viewpoint of the protocol; however, some systems MAY * require that behavior be consistent with the directives. + * * <p class='bcode'> * Pragma = "Pragma" ":" 1#pragma-directive * pragma-directive = "no-cache" | extension-pragma * extension-pragma = token [ "=" ( token | quoted-string ) ] * </p> + * * <p> * When the no-cache directive is present in a request message, an application SHOULD forward the request toward the * origin server even if it has a cached copy of what is being requested. @@ -39,14 +43,17 @@ package org.apache.juneau.http; * for backward compatibility with HTTP/1.0. * Clients SHOULD include both header fields when a no-cache request is sent to a server not known to be HTTP/1.1 * compliant. + * * <p> * Pragma directives MUST be passed through by a proxy or gateway application, regardless of their significance to that * application, since the directives might be applicable to all recipients along the request/response chain. * It is not possible to specify a pragma for a specific recipient; however, any pragma directive not relevant to a * recipient SHOULD be ignored by that recipient. + * * <p> * HTTP/1.1 caches SHOULD treat "Pragma: no-cache" as if the client had sent "Cache-Control: no-cache". * No new Pragma directives will be defined in HTTP. + * * <p> * Note: because the meaning of "Pragma: no-cache as a response header field is not actually specified, it does not * provide a reliable replacement for "Cache-Control: no-cache" in a response. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthenticate.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthenticate.java b/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthenticate.java index dc60d54..fc5da1c 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthenticate.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthenticate.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l> Proxy-Authenticate</l> HTTP response header. + * * <p> * Request authentication to access the proxy. * @@ -28,9 +29,11 @@ package org.apache.juneau.http; * response. * The field value consists of a challenge that indicates the authentication scheme and parameters applicable to the * proxy for this Request-URI. + * * <p class='bcode'> * Proxy-Authenticate = "Proxy-Authenticate" ":" 1#challenge * </p> + * * <p> * The HTTP access authentication process is described in "HTTP Authentication: Basic and Digest Access Authentication". * Unlike WWW-Authenticate, the Proxy-Authenticate header field applies only to the current connection and SHOULD NOT http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthorization.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthorization.java b/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthorization.java index b944aa0..f6bb7ab 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthorization.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/ProxyAuthorization.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Proxy-Authorization</l> HTTP request header. + * * <p> * Authorization credentials for connecting to a proxy. * @@ -28,9 +29,11 @@ package org.apache.juneau.http; * requires authentication. * The Proxy-Authorization field value consists of credentials containing the authentication information of the user * agent for the proxy and/or realm of the resource being requested. + * * <p class='bcode'> * Proxy-Authorization = "Proxy-Authorization" ":" credentials * </p> + * * <p> * The HTTP access authentication process is described in "HTTP Authentication: Basic and Digest Access Authentication". * Unlike Authorization, the Proxy-Authorization header field applies only to the next outbound proxy that demanded http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Range.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Range.java b/juneau-core/src/main/java/org/apache/juneau/http/Range.java index 00248db..2c105fe 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Range.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Range.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Range</l> HTTP request header. + * * <p> * Request only part of an entity. Bytes are numbered from 0. * @@ -27,9 +28,11 @@ package org.apache.juneau.http; * Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is * meaningful for any HTTP entity. * (However, not all clients and servers need to support byte- range operations.) + * * <p> * Byte range specifications in HTTP apply to the sequence of bytes in the entity-body (not necessarily the same as the * message-body). + * * <p> * A byte range operation MAY specify a single range of bytes, or a set of ranges within a single entity. * <p class='bcode'> @@ -40,19 +43,23 @@ package org.apache.juneau.http; * first-byte-pos = 1*DIGIT * last-byte-pos = 1*DIGIT * </p> + * * <p> * The first-byte-pos value in a byte-range-spec gives the byte-offset of the first byte in a range. * The last-byte-pos value gives the byte-offset of the last byte in the range; that is, the byte positions specified * are inclusive. * Byte offsets start at zero. + * * <p> * If the last-byte-pos value is present, it MUST be greater than or equal to the first-byte-pos in that * byte-range-spec, or the byte- range-spec is syntactically invalid. * The recipient of a byte-range- set that includes one or more syntactically invalid byte-range-spec values MUST * ignore the header field that includes that byte-range-set. + * * <p> * If the last-byte-pos value is absent, or if the value is greater than or equal to the current length of the * entity-body, last-byte-pos is taken to be equal to one less than the current length of the entity-body in bytes. + * * <p> * By its choice of last-byte-pos, a client can limit the number of bytes retrieved without knowing the size of the * entity. @@ -60,11 +67,13 @@ package org.apache.juneau.http; * suffix-byte-range-spec = "-" suffix-length * suffix-length = 1*DIGIT * </p> + * * <p> * A suffix-byte-range-spec is used to specify the suffix of the entity-body, of a length given by the suffix-length * value. * (That is, this form specifies the last N bytes of an entity-body.) * If the entity is shorter than the specified suffix-length, the entire entity-body is used. + * * <p> * If a syntactically valid byte-range-set includes at least one byte- range-spec whose first-byte-pos is less than the * current length of the entity-body, or at least one suffix-byte-range-spec with a non-zero suffix-length, then the @@ -74,6 +83,7 @@ package org.apache.juneau.http; * not satisfiable). * Otherwise, the server SHOULD return a response with a status of 206 (Partial Content) containing the satisfiable * ranges of the entity-body. + * * <p> * Examples of byte-ranges-specifier values (assuming an entity-body of length 10000): * <p class='bcode'> @@ -86,18 +96,22 @@ package org.apache.juneau.http; * bytes=500-600,601-999 * bytes=500-700,601-999 * </p> + * * <p> * HTTP retrieval requests using conditional or unconditional GET methods MAY request one or more sub-ranges of the * entity, instead of the entire entity, using the Range request header, which applies to the entity returned as the * result of the request: + * * <p class='bcode'> * Range = "Range" ":" ranges-specifier * </p> + * * <p> * A server MAY ignore the Range header. * However, HTTP/1.1 origin servers and intermediate caches ought to support byte ranges when possible, since Range * supports efficient recovery from partially failed transfers, and supports efficient partial retrieval of large * entities. + * * <p> * If the server supports the Range header and the specified range or ranges are appropriate for the entity: * <ul> @@ -109,8 +123,11 @@ package org.apache.juneau.http; * otherwise successful and the condition is true. It does not affect the 304 (Not Modified) response returned if * the conditional is false. * </ul> + * + * <p> * In some cases, it might be more appropriate to use the If-Range header (see section 14.27) in addition to the Range * header. + * * <p> * If a proxy that supports ranges receives a Range request, forwards the request to an inbound server, and receives an * entire entity in reply, it SHOULD only return the requested range to its client. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Referer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Referer.java b/juneau-core/src/main/java/org/apache/juneau/http/Referer.java index 3230a0a..f7ba76f 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Referer.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Referer.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Referer</l> HTTP request header. + * * <p> * This is the address of the previous web page from which a link to the currently requested page was followed. * (The word âreferrerâ has been misspelled in the RFC as well as in most implementations to the point that it has @@ -33,14 +34,17 @@ package org.apache.juneau.http; * It also allows obsolete or mistyped links to be traced for maintenance. * The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, * such as input from the user keyboard. + * * <p class='bcode'> * Referer = "Referer" ":" ( absoluteURI | relativeURI ) * </p> + * * <p> * Example: * <p class='bcode'> * Referer: http://www.w3.org/hypertext/DataSources/Overview.html * </p> + * * <p> * If the field value is a relative URI, it SHOULD be interpreted relative to the Request-URI. * The URI MUST NOT include a fragment. See section 15.1.3 for security considerations. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/RetryAfter.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/RetryAfter.java b/juneau-core/src/main/java/org/apache/juneau/http/RetryAfter.java index 60c76a0..d5278e8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/RetryAfter.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/RetryAfter.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * Represents a parsed <l>Retry-After</l> HTTP response header. + * * <p> * If an entity is temporarily unavailable, this instructs the client to try again later. * Value could be a specified period of time (in seconds) or a HTTP-date. @@ -29,21 +30,25 @@ import org.apache.juneau.internal.*; * </p> * * <h6 class='topic'>RFC2616 Specification</h6> + * * The Retry-After response-header field can be used with a 503 (Service Unavailable) response to indicate how long the * service is expected to be unavailable to the requesting client. * This field MAY also be used with any 3xx (Redirection) response to indicate the minimum time the user-agent is asked * wait before issuing the redirected request. * The value of this field can be either an HTTP-date or an integer number of seconds (in decimal) after the time of the * response. + * * <p class='bcode'> * Retry-After = "Retry-After" ":" ( HTTP-date | delta-seconds ) * </p> + * * <p> * Two examples of its use are * <p class='bcode'> * Retry-After: Fri, 31 Dec 1999 23:59:59 GMT * Retry-After: 120 * </p> + * * <p> * In the latter example, the delay is 2 minutes. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Server.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Server.java b/juneau-core/src/main/java/org/apache/juneau/http/Server.java index 0325cf9..e98a3a0 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Server.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Server.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Server</l> HTTP response header. + * * <p> * A name for the server. * @@ -29,17 +30,21 @@ package org.apache.juneau.http; * The field can contain multiple product tokens (section 3.8) and comments identifying the server and any significant * sub-products. * The product tokens are listed in order of their significance for identifying the application. + * * <p class='bcode'> * Server = "Server" ":" 1*( product | comment ) * </p> + * * <p> * Example: * <p class='bcode'> * Server: CERN/3.0 libwww/2.17 * </p> + * * <p> * If the response is being forwarded through a proxy, the proxy application MUST NOT modify the Server response-header. * Instead, it SHOULD include a Via field (as described in section 14.45). + * * <p> * Note: Revealing the specific software version of the server might allow the server machine to become more vulnerable * to attacks against software that is known to contain security holes. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/StringRange.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/StringRange.java b/juneau-core/src/main/java/org/apache/juneau/http/StringRange.java index 2510511..561d5d9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/StringRange.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/StringRange.java @@ -19,11 +19,13 @@ import org.apache.juneau.annotation.*; import org.apache.juneau.internal.*; /** - * Represents a single value in a comma-delimited header value that optionally contains a quality - * metric for comparison and extension parameters. + * Represents a single value in a comma-delimited header value that optionally contains a quality metric for + * comparison and extension parameters. + * * <p> * Similar in concept to {@link MediaTypeRange} except instead of media types (e.g. <js>"text/json"</js>), * it's a simple type (e.g. <js>"iso-8601"</js>). + * * <p> * An example of a type range is a value in an <code>Accept-Encoding</code> header. * @@ -47,6 +49,7 @@ public final class StringRange implements Comparable<StringRange> { /** * Parses a header such as an <code>Accept-Encoding</code> header value into an array of type ranges. + * * <p> * The syntax expected to be found in the referenced <code>value</code> complies with the syntax described in * RFC2616, Section 14.1, as described below: @@ -55,6 +58,7 @@ public final class StringRange implements Comparable<StringRange> { * 1#( codings [ ";" "q" "=" qvalue ] ) * codings = ( content-coding | "*" ) * </p> + * * <p> * Examples of its use are: * <p class='bcode'> @@ -65,11 +69,13 @@ public final class StringRange implements Comparable<StringRange> { * Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0 * </p> * - * @param value The value to parse. If <jk>null</jk> or empty, returns a single <code>TypeRange</code> is returned - * that represents all types. - * @return The type ranges described by the string. - * <br>The ranges are sorted such that the most acceptable type is available at ordinal position <js>'0'</js>, and - * the least acceptable at position n-1. + * @param value + * The value to parse. + * If <jk>null</jk> or empty, returns a single <code>TypeRange</code> is returned that represents all types. + * @return + * The type ranges described by the string. + * <br>The ranges are sorted such that the most acceptable type is available at ordinal position <js>'0'</js>, and + * the least acceptable at position n-1. */ public static StringRange[] parse(String value) { @@ -162,8 +168,10 @@ public final class StringRange implements Comparable<StringRange> { /** * Returns the <js>'q'</js> (quality) value for this type, as described in Section 3.9 of RFC2616. + * * <p> * The quality value is a float between <code>0.0</code> (unacceptable) and <code>1.0</code> (most acceptable). + * * <p> * If 'q' value doesn't make sense for the context (e.g. this range was extracted from a <js>"content-*"</js> * header, as opposed to <js>"accept-*"</js> header, its value will always be <js>"1"</js>. @@ -176,6 +184,7 @@ public final class StringRange implements Comparable<StringRange> { /** * Returns the optional set of custom extensions defined for this type. + * * <p> * Values are lowercase and never <jk>null</jk>. * @@ -187,6 +196,7 @@ public final class StringRange implements Comparable<StringRange> { /** * Provides a string representation of this media range, suitable for use as an <code>Accept</code> header value. + * * <p> * The literal text generated will be all lowercase. * @@ -250,6 +260,7 @@ public final class StringRange implements Comparable<StringRange> { /** * Compares two MediaRanges for equality. + * * <p> * The values are first compared according to <code>qValue</code> values. * Should those values be equal, the <code>type</code> is then lexicographically compared (case-insensitive) in @@ -275,6 +286,7 @@ public final class StringRange implements Comparable<StringRange> { /** * Checks if the specified type matches this range. + * * <p> * The type will match this range if the range type string is the same or <js>"*"</js>. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/TE.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/TE.java b/juneau-core/src/main/java/org/apache/juneau/http/TE.java index c9de654..282f891 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/TE.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/TE.java @@ -18,6 +18,7 @@ import org.apache.juneau.internal.*; /** * Represents a parsed <l>TE</l> HTTP request header. + * * <p> * The transfer encodings the user agent is willing to accept: the same values as for the response header field * Transfer-Encoding can be used, plus the "trailers" value (related to the "chunked" transfer method) to notify the @@ -34,14 +35,18 @@ import org.apache.juneau.internal.*; * whether or not it is willing to accept trailer fields in a chunked transfer-coding. * Its value may consist of the keyword "trailers" and/or a comma-separated list of extension transfer-coding names * with optional accept parameters (as described in section 3.6). + * * <p class='bcode'> * TE = "TE" ":" #( t-codings ) * t-codings = "trailers" | ( transfer-extension [ accept-params ] ) * </p> + * + * <p> * The presence of the keyword "trailers" indicates that the client is willing to accept trailer fields in a chunked * transfer-coding, as defined in section 3.6.1. * This keyword is reserved for use with transfer-coding values even though it does not itself represent a * transfer-coding. + * * <p> * Examples of its use are: * <p class='bcode'> @@ -49,27 +54,31 @@ import org.apache.juneau.internal.*; * TE: * TE: trailers, deflate;q=0.5 * </p> + * * <p> * The TE header field only applies to the immediate connection. * Therefore, the keyword MUST be supplied within a Connection header field (section 14.10) whenever TE is present in * an HTTP/1.1 message. + * * <p> * A server tests whether a transfer-coding is acceptable, according to a TE field, using these rules: * <ol> - * <li>The "chunked" transfer-coding is always acceptable. - * If the keyword "trailers" is listed, the client indicates that it is willing to accept trailer fields in the - * chunked response on behalf of itself and any downstream clients. - * The implication is that, if given, the client is stating that either all downstream clients are willing to accept - * trailer fields in the forwarded response, or that it will attempt to buffer the response on behalf of downstream - * recipients. - * Note: HTTP/1.1 does not define any means to limit the size of a chunked response such that a client can be assured - * of buffering the entire response. - * <li>If the transfer-coding being tested is one of the transfer-codings listed in the TE field, then it is acceptable - * unless it is accompanied by a qvalue of 0. (As defined in section 3.9, a qvalue of 0 means "not acceptable.") - * <li>If multiple transfer-codings are acceptable, then the acceptable transfer-coding with the highest non-zero - * qvalue is preferred. - * The "chunked" transfer-coding always has a qvalue of 1. + * <li>The "chunked" transfer-coding is always acceptable. + * If the keyword "trailers" is listed, the client indicates that it is willing to accept trailer fields in the + * chunked response on behalf of itself and any downstream clients. + * The implication is that, if given, the client is stating that either all downstream clients are willing to accept + * trailer fields in the forwarded response, or that it will attempt to buffer the response on behalf of downstream + * recipients. + * Note: HTTP/1.1 does not define any means to limit the size of a chunked response such that a client can be assured + * of buffering the entire response. + * <li>If the transfer-coding being tested is one of the transfer-codings listed in the TE field, then it is acceptable + * unless it is accompanied by a qvalue of 0. (As defined in section 3.9, a qvalue of 0 means "not acceptable.") + * <li>If multiple transfer-codings are acceptable, then the acceptable transfer-coding with the highest non-zero + * qvalue is preferred. + * The "chunked" transfer-coding always has a qvalue of 1. * </ol> + * + * <p> * If the TE field-value is empty or if no TE field is present, the only transfer-coding is "chunked". * A message with no transfer-coding is always acceptable. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Trailer.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Trailer.java b/juneau-core/src/main/java/org/apache/juneau/http/Trailer.java index 237fbce..25167b5 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Trailer.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Trailer.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Trailer</l> HTTP response header. + * * <p> * The Trailer general field value indicates that the given set of header fields is present in the trailer of a message * encoded with chunked transfer coding. @@ -27,16 +28,20 @@ package org.apache.juneau.http; * * The Trailer general field value indicates that the given set of header fields is present in the trailer of a message * encoded with chunked transfer-coding. + * * <p class='bcode'> * Trailer = "Trailer" ":" 1#field-name * </p> + * * <p> * An HTTP/1.1 message SHOULD include a Trailer header field in a message using chunked transfer-coding with a non-empty * trailer. * Doing so allows the recipient to know which header fields to expect in the trailer. + * * <p> * If no Trailer header field is present, the trailer SHOULD NOT include any header fields. * See section 3.6.1 for restrictions on the use of trailer fields in a "chunked" transfer-coding. + * * <p> * Message header fields listed in the Trailer header field MUST NOT include the following header fields: * <ul> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/TransferEncoding.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/TransferEncoding.java b/juneau-core/src/main/java/org/apache/juneau/http/TransferEncoding.java index 6440a83..b5ee9f9 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/TransferEncoding.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/TransferEncoding.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Transfer-Encoding</l> HTTP response header. + * * <p> * The form of encoding used to safely transfer the entity to the user. * Currently defined methods are: chunked, compress, deflate, gzip, identity. @@ -28,19 +29,24 @@ package org.apache.juneau.http; * The Transfer-Encoding general-header field indicates what (if any) type of transformation has been applied to the * message body in order to safely transfer it between the sender and the recipient. * This differs from the content-coding in that the transfer-coding is a property of the message, not of the entity. + * * <p class='bcode'> * Transfer-Encoding = "Transfer-Encoding" ":" 1#transfer-coding * </p> + * * <p> * Transfer-codings are defined in section 3.6. An example is: + * * <p class='bcode'> * Transfer-Encoding: chunked * </p> + * * <p> * If multiple encodings have been applied to an entity, the transfer-codings MUST be listed in the order in which * they were applied. * Additional information about the encoding parameters MAY be provided by other entity-header fields not defined by * this specification. + * * <p> * Many older HTTP/1.0 applications do not understand the Transfer-Encoding header. * http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Upgrade.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Upgrade.java b/juneau-core/src/main/java/org/apache/juneau/http/Upgrade.java index 6895e31..655de91 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Upgrade.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Upgrade.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Upgrade</l> HTTP request header. + * * <p> * Ask the client to upgrade to another protocol. * @@ -23,18 +24,22 @@ package org.apache.juneau.http; * </p> * * <h6 class='topic'>RFC2616 Specification</h6> + * * The Upgrade general-header allows the client to specify what additional communication protocols it supports and * would like to use if the server finds it appropriate to switch protocols. * The server MUST use the Upgrade header field within a 101 (Switching Protocols) response to indicate which * protocol(s) are being switched. + * * <p class='bcode'> * Upgrade = "Upgrade" ":" 1#product * </p> + * * <p> * For example, * <p class='bcode'> * Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 * </p> + * * <p> * The Upgrade header field is intended to provide a simple mechanism for transition from HTTP/1.1 to some other, * incompatible protocol. @@ -44,6 +49,7 @@ package org.apache.juneau.http; * the more commonly supported protocol while indicating to the server that it would like to use a "better" protocol if * available (where "better" is determined by the server, possibly according to the nature of the method and/or resource * being requested). + * * <p> * The Upgrade header field only applies to switching application-layer protocols upon the existing transport-layer * connection. @@ -51,13 +57,16 @@ package org.apache.juneau.http; * The capabilities and nature of the application-layer communication after the protocol change is entirely dependent * upon the new protocol chosen, although the first action after changing the protocol MUST be a response to the initial * HTTP request containing the Upgrade header field. + * * <p> * The Upgrade header field only applies to the immediate connection. * Therefore, the upgrade keyword MUST be supplied within a Connection header field (section 14.10) whenever Upgrade is * present in an HTTP/1.1 message. + * * <p> * The Upgrade header field cannot be used to indicate a switch to a protocol on a different connection. * For that purpose, it is more appropriate to use a 301, 302, 303, or 305 redirection response. + * * <p> * This specification only defines the protocol name "HTTP" for use by the family of Hypertext Transfer Protocols, as * defined by the HTTP version rules of section 3.1 and future updates to this specification. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/UserAgent.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/UserAgent.java b/juneau-core/src/main/java/org/apache/juneau/http/UserAgent.java index 3b2db5b..4f85e7e 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/UserAgent.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/UserAgent.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>User-Agent</l> HTTP request header. + * * <p> * The user agent string of the user agent. * @@ -31,9 +32,11 @@ package org.apache.juneau.http; * The field can contain multiple product tokens (section 3.8) and comments identifying the agent and any sub-products * which form a significant part of the user agent. * By convention, the product tokens are listed in order of their significance for identifying the application. + * * <p class='bcode'> * User-Agent = "User-Agent" ":" 1*( product | comment ) * </p> + * * <p> * Example: * <p class='bcode'> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Vary.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Vary.java b/juneau-core/src/main/java/org/apache/juneau/http/Vary.java index aff07a2..1a8a1e0 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Vary.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Vary.java @@ -14,10 +14,10 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Vary</l> HTTP response header. + * * <p> * Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather * than requesting a fresh one from the origin server. - * * <h6 class='figure'>Example</h6> * <p class='bcode'> @@ -37,6 +37,7 @@ package org.apache.juneau.http; * <p class='bcode'> * Vary = "Vary" ":" ( "*" | 1#field-name ) * </p> + * * <p> * An HTTP/1.1 server SHOULD include a Vary header field with any cacheable response that is subject to server-driven * negotiation. @@ -45,15 +46,18 @@ package org.apache.juneau.http; * A server MAY include a Vary header field with a non-cacheable response that is subject to server-driven negotiation, * since this might provide the user agent with useful information about the dimensions over which the response varies * at the time of the response. + * * <p> * A Vary field value consisting of a list of field-names signals that the representation selected for the response is * based on a selection algorithm which considers ONLY the listed request-header field values in selecting the most * appropriate representation. * A cache MAY assume that the same selection will be made for future requests with the same values for the listed * field names, for the duration of time for which the response is fresh. + * * <p> * The field-names given are not limited to the set of standard request-header fields defined by this specification. * Field names are case-insensitive. + * * <p> * A Vary field value of "*" signals that unspecified parameters not limited to the request-headers (e.g., the network * address of the client), play a role in the selection of the response representation. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Via.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Via.java b/juneau-core/src/main/java/org/apache/juneau/http/Via.java index 575a813..2b300fc 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Via.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Via.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Via</l> HTTP response header. + * * <p> * Informs the client of proxies through which the response was sent. * @@ -22,12 +23,15 @@ package org.apache.juneau.http; * Via: 1.0 fred, 1.1 example.com (Apache/1.1) * </p> * + * <p> * Informs the client of proxies through which the response was sent. + * * <p> * <h6 class='figure'>Example</h6> * <p class='bcode'> * Via: 1.0 fred, 1.1 example.com (Apache/1.1) * </p> + * * <p> * <h6 class='topic'>RFC2616 Specification</h6> * @@ -36,6 +40,7 @@ package org.apache.juneau.http; * responses. * It is analogous to the "Received" field of RFC 822 and is intended to be used for tracking message forwards, * avoiding request loops, and identifying the protocol capabilities of all senders along the request/response chain. + * * <p class='bcode'> * Via = "Via" ":" 1#( received-protocol received-by [ comment ] ) * received-protocol = [ protocol-name "/" ] protocol-version @@ -44,26 +49,31 @@ package org.apache.juneau.http; * received-by = ( host [ ":" port ] ) | pseudonym * pseudonym = token * </p> + * * <p> * The received-protocol indicates the protocol version of the message received by the server or client along each * segment of the request/response chain. * The received-protocol version is appended to the Via field value when the message is forwarded so that information * about the protocol capabilities of upstream applications remains visible to all recipients. + * * <p> * The protocol-name is optional if and only if it would be "HTTP". * The received-by field is normally the host and optional port number of a recipient server or client that subsequently * forwarded the message. * However, if the real host is considered to be sensitive information, it MAY be replaced by a pseudonym. * If the port is not given, it MAY be assumed to be the default port of the received-protocol. + * * <p> * Multiple Via field values represents each proxy or gateway that has forwarded the message. * Each recipient MUST append its information such that the end result is ordered according to the sequence of * forwarding applications. + * * <p> * Comments MAY be used in the Via header field to identify the software of the recipient proxy or gateway, analogous * to the User-Agent and Server header fields. * However, all comments in the Via field are optional and MAY be removed by any recipient prior to forwarding the * message. + * * <p> * For example, a request message could be sent from an HTTP/1.0 user agent to an internal proxy code-named "fred", * which uses HTTP/1.1 to forward the request to a public proxy at nowhere.com, which completes the request by @@ -72,12 +82,14 @@ package org.apache.juneau.http; * <p class='bcode'> * Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) * </p> + * * <p> * Proxies and gateways used as a portal through a network firewall SHOULD NOT, by default, forward the names and ports * of hosts within the firewall region. * This information SHOULD only be propagated if explicitly enabled. * If not enabled, the received-by host of any host behind the firewall SHOULD be replaced by an appropriate pseudonym * for that host. + * * <p> * For organizations that have strong privacy requirements for hiding internal structures, a proxy MAY combine an * ordered subsequence of Via header field entries with identical received-protocol values into a single such entry. @@ -85,11 +97,13 @@ package org.apache.juneau.http; * <p class='bcode'> * Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy * </p> + * * <p> * ...could be collapsed to... * <p class='bcode'> * Via: 1.0 ricky, 1.1 mertz, 1.0 lucy * </p> + * * <p> * Applications SHOULD NOT combine multiple entries unless they are all under the same organizational control and the * hosts have already been replaced by pseudonyms. http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/Warning.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/Warning.java b/juneau-core/src/main/java/org/apache/juneau/http/Warning.java index ec081ed..d972396 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/Warning.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/Warning.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>Warning</l> HTTP request/response header. + * * <p> * A general warning about possible problems with the entity body. * @@ -28,6 +29,7 @@ package org.apache.juneau.http; * message which might not be reflected in the message. * This information is typically used to warn about a possible lack of semantic transparency from caching operations * or transformations applied to the entity body of the message. + * * <p> * Warning headers are sent with responses using: * <p class='bcode'> @@ -41,17 +43,21 @@ package org.apache.juneau.http; * warn-text = quoted-string * warn-date = <"> HTTP-date <"> * </p> + * * <p> * A response MAY carry more than one Warning header. + * * <p> * The warn-text SHOULD be in a natural language and character set that is most likely to be intelligible to the human * user receiving the response. * This decision MAY be based on any available knowledge, such as the location of the cache or user, the * Accept-Language field in a request, the Content-Language field in a response, etc. * The default language is English and the default character set is ISO-8859-1. + * * <p> * If a character set other than ISO-8859-1 is used, it MUST be encoded in the warn-text using the method described in * RFC 2047. + * * <p> * Warning headers can in general be applied to any message, however some specific warn-codes are specific to caches * and can only be applied to response messages. @@ -61,6 +67,7 @@ package org.apache.juneau.http; * to that entry except as specified for specific Warning codes. * It MUST then add any Warning headers received in the validating response. * In other words, Warning headers are those that would be attached to the most recent relevant response. + * * <p> * When multiple Warning headers are attached to a response, the user agent ought to inform the user of as many of them * as possible, in the order that they appear in the response. @@ -70,9 +77,13 @@ package org.apache.juneau.http; * <li>Warnings in the user's preferred character set take priority over warnings in other character sets but with * identical warn-codes and warn-agents. * </ul> + * + * <p> * Systems that generate multiple Warning headers SHOULD order them with this user agent behavior in mind. + * * <p> * Requirements for the behavior of caches with respect to Warnings are stated in section 13.1.2. + * * <p> * This is a list of the currently-defined warn-codes, each with a recommended warn-text in English, and a description * of its meaning. @@ -94,8 +105,11 @@ package org.apache.juneau.http; * <li>299 Miscellaneous persistent warning The warning text MAY include arbitrary information to be presented to a * human user, or logged. A system receiving this warning MUST NOT take any automated action. * </ul> + * + * <p> * If an implementation sends a message with one or more Warning headers whose version is HTTP/1.0 or lower, then the * sender MUST include in each warning-value a warn-date that matches the date in the response. + * * <p> * If an implementation receives a message with a warning-value that includes a warn-date, and that warn-date is * different from the Date value in the response, then that warning-value MUST be deleted from the message before http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/19c566dd/juneau-core/src/main/java/org/apache/juneau/http/WwwAuthenticate.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/http/WwwAuthenticate.java b/juneau-core/src/main/java/org/apache/juneau/http/WwwAuthenticate.java index 7dad3a0..bbfacd6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/http/WwwAuthenticate.java +++ b/juneau-core/src/main/java/org/apache/juneau/http/WwwAuthenticate.java @@ -14,6 +14,7 @@ package org.apache.juneau.http; /** * Represents a parsed <l>WWW-Authenticate </l> HTTP response header. + * * <p> * Indicates the authentication scheme that should be used to access the requested entity. * @@ -27,9 +28,11 @@ package org.apache.juneau.http; * The WWW-Authenticate response-header field MUST be included in 401 (Unauthorized) response messages. * The field value consists of at least one challenge that indicates the authentication scheme(s) and parameters * applicable to the Request-URI. + * * <p class='bcode'> * WWW-Authenticate = "WWW-Authenticate" ":" 1#challenge * </p> + * * <p> * The HTTP access authentication process is described in "HTTP Authentication: Basic and Digest Access Authentication". * User agents are advised to take special care in parsing the WWW-Authenticate field value as it might contain more
