Return-Path: Delivered-To: apmail-jakarta-httpclient-commits-archive@www.apache.org Received: (qmail 40473 invoked from network); 29 Mar 2005 21:52:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Mar 2005 21:52:11 -0000 Received: (qmail 99925 invoked by uid 500); 29 Mar 2005 21:52:10 -0000 Mailing-List: contact httpclient-commits-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: httpclient-dev@jakarta.apache.org Delivered-To: mailing list httpclient-commits@jakarta.apache.org Received: (qmail 99912 invoked by uid 500); 29 Mar 2005 21:52:10 -0000 Delivered-To: apmail-jakarta-httpclient-cvs@jakarta.apache.org Received: (qmail 99908 invoked by uid 99); 29 Mar 2005 21:52:10 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 29 Mar 2005 13:52:10 -0800 Received: (qmail 40462 invoked by uid 65534); 29 Mar 2005 21:52:09 -0000 Message-ID: <20050329215209.40461.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Tue, 29 Mar 2005 21:52:09 -0000 Subject: svn commit: r159431 - jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/HttpProtocolParams.java To: httpclient-cvs@jakarta.apache.org From: olegk@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: olegk Date: Tue Mar 29 13:52:07 2005 New Revision: 159431 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D159431 Log: More HTTP parameter definitions copied from the Jakarta Commons HttpClient Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/Ht= tpProtocolParams.java Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/par= ams/HttpProtocolParams.java URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src= /java/org/apache/http/params/HttpProtocolParams.java?view=3Ddiff&r1=3D15943= 0&r2=3D159431 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/Ht= tpProtocolParams.java (original) +++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/params/Ht= tpProtocolParams.java Tue Mar 29 13:52:07 2005 @@ -77,6 +77,53 @@ */ public static final String HTTP_CONTENT_CHARSET =3D "http.protocol.con= tent-charset";=20 =20 + /** + * Defines the content of the User-Agent header used by =20 + * {@link org.apache.commons.httpclient.HttpMethod HTTP methods}. + *

+ * This parameter expects a value of type {@link String}. + *

+ */ + public static final String USER_AGENT =3D "http.useragent";=20 + + /** + * Defines the maximum number of ignorable lines before we expect + * a HTTP response's status code. + *

+ * With HTTP/1.1 persistent connections, the problem arises that + * broken scripts could return a wrong Content-Length + * (there are more bytes sent than specified).
+ * Unfortunately, in some cases, this is not possible after the bad re= sponse, + * but only before the next one.
+ * So, HttpClient must be able to skip those surplus lines this way. + *

+ *

+ * Set this to 0 to disallow any garbage/empty lines before the status= line.
+ * To specify no limit, use {@link java.lang.Integer#MAX_VALUE} (defau= lt in lenient mode). + *

+ * =20 + * This parameter expects a value of type {@link Integer}. + */ + public static final String STATUS_LINE_GARBAGE_LIMIT =3D "http.protoco= l=2Estatus-line-garbage-limit"; + + /** + * The key used to look up the date patterns used for parsing. The Str= ing patterns are stored + * in a {@link java.util.Collection} and must be compatible with=20 + * {@link java.text.SimpleDateFormat}. + *

+ * This parameter expects a value of type {@link java.util.Collection}. + *

+ */ + public static final String DATE_PATTERNS =3D "http.dateparser.patterns= "; + + /** + * Defines the virtual host name. + *

+ * This parameter expects a value of type {@link java.lang.String}.=20 + *

+ */ + public static final String VIRTUAL_HOST =3D "http.virtual-host";=20 + private final HttpParams params; =20 /** @@ -221,4 +268,21 @@ return setParameter(PROTOCOL_VERSION, version); } =20 + /** + * Sets the virtual host name. + *=20 + * @param hostname The host name + */ + public void setVirtualHost(final String hostname) { + setParameter(VIRTUAL_HOST, hostname); + } + + /** + * Returns the virtual host name. + *=20 + * @return The virtual host name + */ + public String getVirtualHost() { + return (String) getParameter(VIRTUAL_HOST); + } }