Return-Path: Delivered-To: apmail-jakarta-httpclient-commits-archive@www.apache.org Received: (qmail 26366 invoked from network); 2 May 2005 18:08:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 May 2005 18:08:12 -0000 Received: (qmail 88974 invoked by uid 500); 2 May 2005 18:09:40 -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 88943 invoked by uid 500); 2 May 2005 18:09:40 -0000 Delivered-To: apmail-jakarta-httpclient-cvs@jakarta.apache.org Received: (qmail 88930 invoked by uid 99); 2 May 2005 18:09:39 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=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; Mon, 02 May 2005 11:09:37 -0700 Received: (qmail 26334 invoked by uid 65534); 2 May 2005 18:08:06 -0000 Message-ID: <20050502180806.26333.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r165656 - in /jakarta/httpclient/trunk/http-common/src/java/org/apache/http: executor/ interceptor/ params/ Date: Mon, 02 May 2005 18:08:05 -0000 To: httpclient-cvs@jakarta.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: olegk Date: Mon May 2 11:08:04 2005 New Revision: 165656 URL: http://svn.apache.org/viewcvs?rev=3D165656&view=3Drev Log: Request / response interceptors implementing behaviours mandated / recommen= ded by RFC 2616=20 Added: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestConnControl.java (with props) jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestContent.java - copied, changed from r165655, jakarta/httpclient/trunk/http-common/= src/java/org/apache/http/interceptor/RequestContentInterceptor.java jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestTargetHost.java (with props) jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestUserAgent.java (with props) jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/ResponseContent.java - copied, changed from r165655, jakarta/httpclient/trunk/http-common/= src/java/org/apache/http/interceptor/ResponseContentInterceptor.java Removed: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestContentInterceptor.java jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/ResponseContentInterceptor.java Modified: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/executor/= HttpRequestExecutor.java 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/exe= cutor/HttpRequestExecutor.java URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src= /java/org/apache/http/executor/HttpRequestExecutor.java?rev=3D165656&r1=3D1= 65655&r2=3D165656&view=3Ddiff =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/executor/= HttpRequestExecutor.java (original) +++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/executor/= HttpRequestExecutor.java Mon May 2 11:08:04 2005 @@ -148,8 +148,6 @@ } } =20 - =20 - =20 private void postprocessResponse(final HttpMutableResponse response)=20 throws IOException, HttpException { if (this.interceptors =3D=3D null) { Added: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/interc= eptor/RequestConnControl.java URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src= /java/org/apache/http/interceptor/RequestConnControl.java?rev=3D165656&view= =3Dauto =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/intercept= or/RequestConnControl.java (added) +++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestConnControl.java Mon May 2 11:08:04 2005 @@ -0,0 +1,69 @@ +/* + * $HeadURL$ + * $Revision$ + * $Date$ + * + * =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 + * + * Copyright 1999-2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie= d=2E + * See the License for the specific language governing permissions and + * limitations under the License. + * =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 + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.interceptor; + +import java.io.IOException; + +import org.apache.http.Header; +import org.apache.http.HttpContext; +import org.apache.http.HttpException; +import org.apache.http.HttpMutableRequest; +import org.apache.http.HttpRequestInterceptor; + +/** + *

+ *

+ * @author Oleg Kalnichevski + * + * @version $Revision$ + *=20 + * @since 4.0 + */ +public class RequestConnControl implements HttpRequestInterceptor { + + private static final String CONN_DIRECTIVE =3D "Connection"; + =20 + public RequestConnControl() { + super(); + } + =20 + public void process(final HttpMutableRequest request, final HttpContex= t context)=20 + throws HttpException, IOException { + if (request =3D=3D null) { + throw new IllegalArgumentException("HTTP request may not be nu= ll"); + } + if (!request.containsHeader(CONN_DIRECTIVE)) { + // Default policy is to keep connection alive + // whenever possible + request.addHeader(new Header(CONN_DIRECTIVE, "Keep-Alive", tru= e)); + } + } + =20 +} Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestConnControl.java ---------------------------------------------------------------------------= --- svn:eol-style =3D native Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestConnControl.java ---------------------------------------------------------------------------= --- svn:keywords =3D Date Author Id Revision HeadURL Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestConnControl.java ---------------------------------------------------------------------------= --- svn:mime-type =3D text/plain Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/inter= ceptor/RequestContent.java (from r165655, jakarta/httpclient/trunk/http-com= mon/src/java/org/apache/http/interceptor/RequestContentInterceptor.java) URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src= /java/org/apache/http/interceptor/RequestContent.java?p2=3Djakarta/httpclie= nt/trunk/http-common/src/java/org/apache/http/interceptor/RequestContent.ja= va&p1=3Djakarta/httpclient/trunk/http-common/src/java/org/apache/http/inter= ceptor/RequestContentInterceptor.java&r1=3D165655&r2=3D165656&rev=3D165656&= view=3Ddiff =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/intercept= or/RequestContentInterceptor.java (original) +++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestContent.java Mon May 2 11:08:04 2005 @@ -50,13 +50,13 @@ *=20 * @since 4.0 */ -public class RequestContentInterceptor implements HttpRequestInterceptor { +public class RequestContent implements HttpRequestInterceptor { =20 private static final String TRANSFER_ENC =3D "Transfer-Encoding"; private static final String CONTENT_LEN =3D "Content-Length"; private static final String CONTENT_TYPE =3D "Content-Type"; =20 - public RequestContentInterceptor() { + public RequestContent() { super(); } =20 Added: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/interc= eptor/RequestTargetHost.java URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src= /java/org/apache/http/interceptor/RequestTargetHost.java?rev=3D165656&view= =3Dauto =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/intercept= or/RequestTargetHost.java (added) +++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestTargetHost.java Mon May 2 11:08:04 2005 @@ -0,0 +1,78 @@ +/* + * $HeadURL$ + * $Revision$ + * $Date$ + * + * =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 + * + * Copyright 1999-2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie= d=2E + * See the License for the specific language governing permissions and + * limitations under the License. + * =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 + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.interceptor; + +import java.io.IOException; + +import org.apache.http.Header; +import org.apache.http.HttpContext; +import org.apache.http.HttpException; +import org.apache.http.HttpHost; +import org.apache.http.HttpMutableRequest; +import org.apache.http.HttpRequestInterceptor; +import org.apache.http.params.HttpProtocolParams; + +/** + *

+ *

+ * @author Oleg Kalnichevski + * + * @version $Revision$ + *=20 + * @since 4.0 + */ +public class RequestTargetHost implements HttpRequestInterceptor { + + private static final String TARGET_HOST =3D "Host"; + =20 + public RequestTargetHost() { + super(); + } + =20 + public void process(final HttpMutableRequest request, final HttpContex= t context)=20 + throws HttpException, IOException { + if (request =3D=3D null) { + throw new IllegalArgumentException("HTTP request may not be nu= ll"); + } + if (context =3D=3D null) { + throw new IllegalArgumentException("HTTP context may not be nu= ll"); + } + if (!request.containsHeader(TARGET_HOST)) { + HttpHost targethost =3D (HttpHost) context.getAttribute(HttpCo= ntext.HTTP_TARGET_HOST); + HttpProtocolParams params =3D new HttpProtocolParams(request.g= etParams()); + String virtualhost =3D params.getVirtualHost(); + if (virtualhost !=3D null) { + targethost =3D new HttpHost(virtualhost, targethost.getPor= t()); + } + request.addHeader(new Header(TARGET_HOST, targethost.toHostStr= ing(), true)); + } + } + =20 +} Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestTargetHost.java ---------------------------------------------------------------------------= --- svn:eol-style =3D native Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestTargetHost.java ---------------------------------------------------------------------------= --- svn:keywords =3D Date Author Id Revision HeadURL Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestTargetHost.java ---------------------------------------------------------------------------= --- svn:mime-type =3D text/plain Added: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/interc= eptor/RequestUserAgent.java URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src= /java/org/apache/http/interceptor/RequestUserAgent.java?rev=3D165656&view= =3Dauto =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/intercept= or/RequestUserAgent.java (added) +++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/RequestUserAgent.java Mon May 2 11:08:04 2005 @@ -0,0 +1,72 @@ +/* + * $HeadURL$ + * $Revision$ + * $Date$ + * + * =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 + * + * Copyright 1999-2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie= d=2E + * See the License for the specific language governing permissions and + * limitations under the License. + * =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 + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ + +package org.apache.http.interceptor; + +import java.io.IOException; + +import org.apache.http.Header; +import org.apache.http.HttpContext; +import org.apache.http.HttpException; +import org.apache.http.HttpMutableRequest; +import org.apache.http.HttpRequestInterceptor; +import org.apache.http.params.HttpProtocolParams; + +/** + *

+ *

+ * @author Oleg Kalnichevski + * + * @version $Revision$ + *=20 + * @since 4.0 + */ +public class RequestUserAgent implements HttpRequestInterceptor { + + private static final String USER_AGENT =3D "User-Agent"; + =20 + public RequestUserAgent() { + super(); + } + =20 + public void process(final HttpMutableRequest request, final HttpContex= t context)=20 + throws HttpException, IOException { + if (request =3D=3D null) { + throw new IllegalArgumentException("HTTP request may not be nu= ll"); + } + if (!request.containsHeader(USER_AGENT)) { + HttpProtocolParams params =3D new HttpProtocolParams(request.g= etParams()); + String useragent =3D params.getUserAgent(); + if (useragent !=3D null) { + request.addHeader(new Header(USER_AGENT, useragent, true)); + } + } + } + =20 +} Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestUserAgent.java ---------------------------------------------------------------------------= --- svn:eol-style =3D native Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestUserAgent.java ---------------------------------------------------------------------------= --- svn:keywords =3D Date Author Id Revision HeadURL Propchange: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/i= nterceptor/RequestUserAgent.java ---------------------------------------------------------------------------= --- svn:mime-type =3D text/plain Copied: jakarta/httpclient/trunk/http-common/src/java/org/apache/http/inter= ceptor/ResponseContent.java (from r165655, jakarta/httpclient/trunk/http-co= mmon/src/java/org/apache/http/interceptor/ResponseContentInterceptor.java) URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/http-common/src= /java/org/apache/http/interceptor/ResponseContent.java?p2=3Djakarta/httpcli= ent/trunk/http-common/src/java/org/apache/http/interceptor/ResponseContent.= java&p1=3Djakarta/httpclient/trunk/http-common/src/java/org/apache/http/int= erceptor/ResponseContentInterceptor.java&r1=3D165655&r2=3D165656&rev=3D1656= 56&view=3Ddiff =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/intercept= or/ResponseContentInterceptor.java (original) +++ jakarta/httpclient/trunk/http-common/src/java/org/apache/http/intercept= or/ResponseContent.java Mon May 2 11:08:04 2005 @@ -49,13 +49,13 @@ *=20 * @since 4.0 */ -public class ResponseContentInterceptor implements HttpResponseInterceptor= { +public class ResponseContent implements HttpResponseInterceptor { =20 private static final String TRANSFER_ENC =3D "Transfer-Encoding"; private static final String CONTENT_LEN =3D "Content-Length"; private static final String CONTENT_TYPE =3D "Content-Type"; =20 - public ResponseContentInterceptor() { + public ResponseContent() { super(); } =20 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?rev=3D165656&r1=3D1656= 55&r2=3D165656&view=3Ddiff =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 Mon May 2 11:08:04 2005 @@ -294,4 +294,13 @@ public String getVirtualHost() { return (String) getParameter(VIRTUAL_HOST); } + =20 + public String getUserAgent() {=20 + return (String) getParameter(USER_AGENT); + } + =20 + public HttpProtocolParams setUserAgent(final String useragent) { + return setParameter(USER_AGENT, useragent); + } + }