hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rola...@apache.org
Subject svn commit: r576073 - in /jakarta/httpcomponents/httpcore/trunk: module-main/src/main/java/org/apache/http/impl/entity/ module-main/src/main/java/org/apache/http/params/ module-main/src/main/java/org/apache/http/protocol/ module-main/src/test/java/org/...
Date Sun, 16 Sep 2007 10:53:15 GMT
Author: rolandw
Date: Sun Sep 16 03:53:13 2007
New Revision: 576073

URL: http://svn.apache.org/viewvc?rev=576073&view=rev
Log:
parameter names in interfaces, part 2

Added:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java   (with props)
Modified:
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpProtocolParams.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/ResponseServer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestBasicRequest.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestLaxContentLengthStrategy.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestStrictContentLengthStrategy.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicMessages.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestHttpServiceAndExecutor.java
    jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/BufferingHttpClientHandler.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java
    jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java
    jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java
    jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestNIOSSLHttp.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/impl/entity/LaxContentLengthStrategy.java Sun Sep 16 03:53:13 2007
@@ -39,7 +39,7 @@
 import org.apache.http.ProtocolException;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.HTTP;
 
 /**
@@ -190,7 +190,7 @@
         }
 
         HttpParams params = message.getParams(); 
-        boolean strict = params.isParameterTrue(HttpProtocolParams.STRICT_TRANSFER_ENCODING);
+        boolean strict = params.isParameterTrue(CoreProtocolPNames.STRICT_TRANSFER_ENCODING);
         
         Header transferEncodingHeader = message.getFirstHeader(HTTP.TRANSFER_ENCODING);
         Header contentLengthHeader = message.getFirstHeader(HTTP.CONTENT_LEN);

Added: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java?rev=576073&view=auto
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java (added)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java Sun Sep 16 03:53:13 2007
@@ -0,0 +1,130 @@
+/*
+ * $HeadURL$
+ * $Revision$
+ * $Date$
+ *
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * 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
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.http.params;
+
+
+/**
+ * Defines parameter names for protocol execution in HttpCore.
+ * 
+ * @version $Revision$
+ * 
+ * @since 4.0
+ */
+public interface CoreProtocolPNames {
+
+    /**
+     * Defines the {@link ProtocolVersion protocol version} used per default.
+     * <p>
+     * This parameter expects a value of type {@link ProtocolVersion}.
+     * </p>
+     */
+    public static final String PROTOCOL_VERSION = "http.protocol.version"; 
+
+    /**
+     * Defines the charset to be used for encoding HTTP protocol elements.
+     * <p>
+     * This parameter expects a value of type {@link String}.
+     * </p>
+     */
+    public static final String HTTP_ELEMENT_CHARSET = "http.protocol.element-charset"; 
+    
+    /**
+     * Defines the charset to be used per default for encoding content body.
+     * <p>
+     * This parameter expects a value of type {@link String}.
+     * </p>
+     */
+    public static final String HTTP_CONTENT_CHARSET = "http.protocol.content-charset"; 
+    
+    /**
+     * Defines the content of the <tt>User-Agent</tt> header.
+     * <p>
+     * This parameter expects a value of type {@link String}.
+     * </p>
+     */
+    public static final String USER_AGENT = "http.useragent"; 
+
+    /**
+     * Defines the content of the <tt>Server</tt> header.
+     * <p>
+     * This parameter expects a value of type {@link String}.
+     * </p>
+     */
+    public static final String ORIGIN_SERVER = "http.origin-server"; 
+
+    /**
+     * Defines whether responses with an invalid <tt>Transfer-Encoding</tt> header should be 
+     * rejected.
+     * <p>
+     * This parameter expects a value of type {@link Boolean}.
+     * </p>
+     */
+    public static final String STRICT_TRANSFER_ENCODING = "http.protocol.strict-transfer-encoding"; 
+
+    /**
+     * <p>
+     * Activates 'Expect: 100-Continue' handshake for the 
+     * entity enclosing methods. The purpose of the 'Expect: 100-Continue'
+     * handshake to allow a client that is sending a request message with 
+     * a request body to determine if the origin server is willing to 
+     * accept the request (based on the request headers) before the client
+     * sends the request body.
+     * </p>
+     * 
+     * <p>
+     * The use of the 'Expect: 100-continue' handshake can result in 
+     * noticable peformance improvement for entity enclosing requests
+     * (such as POST and PUT) that require the target server's 
+     * authentication.
+     * </p>
+     * 
+     * <p>
+     * 'Expect: 100-continue' handshake should be used with 
+     * caution, as it may cause problems with HTTP servers and 
+     * proxies that do not support HTTP/1.1 protocol.
+     * </p>
+     * 
+     * This parameter expects a value of type {@link Boolean}.
+     */
+    public static final String USE_EXPECT_CONTINUE = "http.protocol.expect-continue"; 
+
+    /**
+     * <p>
+     * Defines the maximum period of time in milliseconds the client should spend
+     * waiting for a 100-continue response.
+     * </p>
+     * 
+     * This parameter expects a value of type {@link Integer}.
+     */
+    public static final String WAIT_FOR_CONTINUE = "http.protocol.wait-for-continue";
+    
+}

Propchange: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/CoreProtocolPNames.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpProtocolParams.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpProtocolParams.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpProtocolParams.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/params/HttpProtocolParams.java Sun Sep 16 03:53:13 2007
@@ -44,94 +44,10 @@
  * @version $Revision$
  * 
  * @since 4.0
+ *
+ * @see CoreProtocolPNames
  */
 public final class HttpProtocolParams {
-
-    /**
-     * Defines the {@link ProtocolVersion protocol version} used per default.
-     * <p>
-     * This parameter expects a value of type {@link ProtocolVersion}.
-     * </p>
-     */
-    public static final String PROTOCOL_VERSION = "http.protocol.version"; 
-
-    /**
-     * Defines the charset to be used for encoding HTTP protocol elements.
-     * <p>
-     * This parameter expects a value of type {@link String}.
-     * </p>
-     */
-    public static final String HTTP_ELEMENT_CHARSET = "http.protocol.element-charset"; 
-    
-    /**
-     * Defines the charset to be used per default for encoding content body.
-     * <p>
-     * This parameter expects a value of type {@link String}.
-     * </p>
-     */
-    public static final String HTTP_CONTENT_CHARSET = "http.protocol.content-charset"; 
-    
-    /**
-     * Defines the content of the <tt>User-Agent</tt> header.
-     * <p>
-     * This parameter expects a value of type {@link String}.
-     * </p>
-     */
-    public static final String USER_AGENT = "http.useragent"; 
-
-    /**
-     * Defines the content of the <tt>Server</tt> header.
-     * <p>
-     * This parameter expects a value of type {@link String}.
-     * </p>
-     */
-    public static final String ORIGIN_SERVER = "http.origin-server"; 
-
-    /**
-     * Defines whether responses with an invalid <tt>Transfer-Encoding</tt> header should be 
-     * rejected.
-     * <p>
-     * This parameter expects a value of type {@link Boolean}.
-     * </p>
-     */
-    public static final String STRICT_TRANSFER_ENCODING = "http.protocol.strict-transfer-encoding"; 
-
-    /**
-     * <p>
-     * Activates 'Expect: 100-Continue' handshake for the 
-     * entity enclosing methods. The purpose of the 'Expect: 100-Continue'
-     * handshake to allow a client that is sending a request message with 
-     * a request body to determine if the origin server is willing to 
-     * accept the request (based on the request headers) before the client
-     * sends the request body.
-     * </p>
-     * 
-     * <p>
-     * The use of the 'Expect: 100-continue' handshake can result in 
-     * noticable peformance improvement for entity enclosing requests
-     * (such as POST and PUT) that require the target server's 
-     * authentication.
-     * </p>
-     * 
-     * <p>
-     * 'Expect: 100-continue' handshake should be used with 
-     * caution, as it may cause problems with HTTP servers and 
-     * proxies that do not support HTTP/1.1 protocol.
-     * </p>
-     * 
-     * This parameter expects a value of type {@link Boolean}.
-     */
-    public static final String USE_EXPECT_CONTINUE = "http.protocol.expect-continue"; 
-
-    /**
-     * <p>
-     * Defines the maximum period of time in milliseconds the client should spend
-     * waiting for a 100-continue response.
-     * </p>
-     * 
-     * This parameter expects a value of type {@link Integer}.
-     */
-    public static final String WAIT_FOR_CONTINUE = "http.protocol.wait-for-continue";
     
     /**
      */
@@ -147,7 +63,8 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        String charset = (String) params.getParameter(HTTP_ELEMENT_CHARSET);
+        String charset = (String) params.getParameter
+            (CoreProtocolPNames.HTTP_ELEMENT_CHARSET);
         if (charset == null) {
             charset = HTTP.DEFAULT_PROTOCOL_CHARSET;
         }
@@ -162,7 +79,7 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setParameter(HTTP_ELEMENT_CHARSET, charset);
+        params.setParameter(CoreProtocolPNames.HTTP_ELEMENT_CHARSET, charset);
     }
 
     /**
@@ -174,7 +91,8 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        String charset = (String) params.getParameter(HTTP_CONTENT_CHARSET);
+        String charset = (String) params.getParameter
+            (CoreProtocolPNames.HTTP_CONTENT_CHARSET);
         if (charset == null) {
             charset = HTTP.DEFAULT_CONTENT_CHARSET;
         }
@@ -190,7 +108,7 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setParameter(HTTP_CONTENT_CHARSET, charset);
+        params.setParameter(CoreProtocolPNames.HTTP_CONTENT_CHARSET, charset);
     }
 
     /**
@@ -202,7 +120,8 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        Object param = params.getParameter(PROTOCOL_VERSION);
+        Object param = params.getParameter
+            (CoreProtocolPNames.PROTOCOL_VERSION);
         if (param == null) {
             return HttpVersion.HTTP_1_1;
         }
@@ -219,34 +138,35 @@
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setParameter(PROTOCOL_VERSION, version);
+        params.setParameter(CoreProtocolPNames.PROTOCOL_VERSION, version);
     }
 
     public static String getUserAgent(final HttpParams params) { 
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return (String) params.getParameter(USER_AGENT);
+        return (String) params.getParameter(CoreProtocolPNames.USER_AGENT);
     }
     
     public static void setUserAgent(final HttpParams params, final String useragent) {
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setParameter(USER_AGENT, useragent);
+        params.setParameter(CoreProtocolPNames.USER_AGENT, useragent);
     }
 
     public static boolean useExpectContinue(final HttpParams params) {
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        return params.getBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false);
+        return params.getBooleanParameter
+            (CoreProtocolPNames.USE_EXPECT_CONTINUE, false);
     }
     
     public static void setUseExpectContinue(final HttpParams params, boolean b) {
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
         }
-        params.setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, b);
+        params.setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, b);
     }
 }

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/HttpRequestExecutor.java Sun Sep 16 03:53:13 2007
@@ -42,7 +42,7 @@
 import org.apache.http.HttpStatus;
 import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolVersion;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 /**
  * Sends HTTP requests and receives the responses.
@@ -213,7 +213,7 @@
                 // As suggested by RFC 2616 section 8.2.3, we don't wait for a
                 // 100-continue response forever. On timeout, send the entity.
                 int tms = request.getParams().getIntParameter(
-                        HttpProtocolParams.WAIT_FOR_CONTINUE, 2000);
+                        CoreProtocolPNames.WAIT_FOR_CONTINUE, 2000);
                 
                 if (conn.isResponseAvailable(tms)) {
                     response = conn.receiveResponseHeader();

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/ResponseServer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/ResponseServer.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/ResponseServer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/protocol/ResponseServer.java Sun Sep 16 03:53:13 2007
@@ -36,7 +36,7 @@
 import org.apache.http.HttpException;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 /**
  * A response interceptor that adds a Server header.
@@ -61,7 +61,7 @@
         }
         if (!response.containsHeader(HTTP.SERVER_HEADER)) {
             String s = (String) response.getParams().getParameter(
-                    HttpProtocolParams.ORIGIN_SERVER);
+                    CoreProtocolPNames.ORIGIN_SERVER);
             if (s != null) {
                 response.addHeader(HTTP.SERVER_HEADER, s);
             }

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestBasicRequest.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestBasicRequest.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestBasicRequest.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/TestBasicRequest.java Sun Sep 16 03:53:13 2007
@@ -37,7 +37,7 @@
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpVersion;
 import org.apache.http.message.BasicHttpRequest;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 public class TestBasicRequest extends TestCase {
 
@@ -77,7 +77,7 @@
     public void testRequestLine() throws Exception {
         HttpRequest request = new BasicHttpRequest("GET", "/stuff");
         request.getParams().setParameter(
-                HttpProtocolParams.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
+                CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
         assertEquals("GET", request.getRequestLine().getMethod());
         assertEquals("/stuff", request.getRequestLine().getUri());
         assertEquals(HttpVersion.HTTP_1_0, request.getRequestLine().getProtocolVersion());

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntityDeserializer.java Sun Sep 16 03:53:13 2007
@@ -45,7 +45,7 @@
 import org.apache.http.io.SessionInputBuffer;
 import org.apache.http.mockup.SessionInputBufferMockup;
 import org.apache.http.mockup.HttpMessageMockup;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 public class TestEntityDeserializer extends TestCase {
 
@@ -87,7 +87,7 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Transfer-Encoding", "identity, chunked");
         message.addHeader("Content-Length", "plain wrong");
@@ -100,7 +100,7 @@
         assertTrue(entity.getContent() instanceof ChunkedInputStream);
 
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         entity = entitygen.deserialize(datareceiver, message);
         assertNotNull(entity);
         assertEquals(-1, entity.getContentLength());
@@ -114,7 +114,7 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Transfer-Encoding", "identity");
         message.addHeader("Content-Length", "plain wrong");
@@ -131,7 +131,7 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Transfer-Encoding", "whatever; param=value, chunked");
         message.addHeader("Content-Length", "plain wrong");
@@ -144,7 +144,7 @@
         assertTrue(entity.getContent() instanceof ChunkedInputStream);
 
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
@@ -158,7 +158,7 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Transfer-Encoding", "chunked, identity");
         message.addHeader("Content-Length", "plain wrong");
@@ -171,7 +171,7 @@
         assertFalse(entity.getContent() instanceof ChunkedInputStream);
 
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
@@ -185,7 +185,7 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "0");
         EntityDeserializer entitygen = new EntityDeserializer(
@@ -202,7 +202,7 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "0");
         message.addHeader("Content-Length", "0");
@@ -218,7 +218,7 @@
         assertTrue(instream instanceof ContentLengthInputStream);
         
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
@@ -232,7 +232,7 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "1");
         message.addHeader("Content-Length", "yyy");
@@ -248,7 +248,7 @@
         assertTrue(instream instanceof ContentLengthInputStream);
         
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
@@ -262,7 +262,7 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "yyy");
         message.addHeader("Content-Length", "xxx");
@@ -278,7 +278,7 @@
         assertTrue(instream instanceof IdentityInputStream);
         
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
@@ -292,7 +292,7 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "xxx");
         EntityDeserializer entitygen = new EntityDeserializer(
@@ -307,7 +307,7 @@
         assertTrue(instream instanceof IdentityInputStream);
         
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             entitygen.deserialize(datareceiver, message);
             fail("ProtocolException should have been thrown");
@@ -321,7 +321,7 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         EntityDeserializer entitygen = new EntityDeserializer(
                 new LaxContentLengthStrategy());
         HttpEntity entity = entitygen.deserialize(datareceiver, message);

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestEntitySerializer.java Sun Sep 16 03:53:13 2007
@@ -46,7 +46,7 @@
 import org.apache.http.io.SessionOutputBuffer;
 import org.apache.http.mockup.SessionOutputBufferMockup;
 import org.apache.http.mockup.HttpMessageMockup;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 public class TestEntitySerializer extends TestCase {
 
@@ -131,7 +131,7 @@
     public void testEntityWithInvalidChunkEncodingAndHTTP10() throws Exception {
         SessionOutputBuffer datatransmitter = new SessionOutputBufferMockup();
         HttpMessage message = new HttpMessageMockup();
-        message.getParams().setParameter(HttpProtocolParams.PROTOCOL_VERSION, 
+        message.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, 
                 HttpVersion.HTTP_1_0);
         message.addHeader("Transfer-Encoding", "chunked");
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestLaxContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestLaxContentLengthStrategy.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestLaxContentLengthStrategy.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestLaxContentLengthStrategy.java Sun Sep 16 03:53:13 2007
@@ -38,7 +38,7 @@
 import org.apache.http.ProtocolException;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.mockup.HttpMessageMockup;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 public class TestLaxContentLengthStrategy extends TestCase {
 
@@ -63,14 +63,14 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Transfer-Encoding", "identity, chunked");
         message.addHeader("Content-Length", "plain wrong");
         assertEquals(ContentLengthStrategy.CHUNKED, lenStrategy.determineLength(message));
 
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         assertEquals(ContentLengthStrategy.CHUNKED, lenStrategy.determineLength(message));
     }
 
@@ -79,7 +79,7 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Transfer-Encoding", "identity");
         message.addHeader("Content-Length", "plain wrong");
@@ -91,14 +91,14 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Transfer-Encoding", "whatever; param=value, chunked");
         message.addHeader("Content-Length", "plain wrong");
         assertEquals(ContentLengthStrategy.CHUNKED, lenStrategy.determineLength(message));
 
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             lenStrategy.determineLength(message);
             fail("ProtocolException should have been thrown");
@@ -112,14 +112,14 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Transfer-Encoding", "chunked, identity");
         message.addHeader("Content-Length", "plain wrong");
         assertEquals(ContentLengthStrategy.IDENTITY, lenStrategy.determineLength(message));
 
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             lenStrategy.determineLength(message);
             fail("ProtocolException should have been thrown");
@@ -133,7 +133,7 @@
         HttpMessage message = new HttpMessageMockup();
         
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "0");
         assertEquals(0, lenStrategy.determineLength(message));
@@ -144,7 +144,7 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "0");
         message.addHeader("Content-Length", "0");
@@ -152,7 +152,7 @@
         assertEquals(1, lenStrategy.determineLength(message));
         
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             lenStrategy.determineLength(message);
             fail("ProtocolException should have been thrown");
@@ -166,7 +166,7 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "1");
         message.addHeader("Content-Length", "yyy");
@@ -174,7 +174,7 @@
         assertEquals(1, lenStrategy.determineLength(message));
         
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             lenStrategy.determineLength(message);
             fail("ProtocolException should have been thrown");
@@ -188,14 +188,14 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "yyy");
         message.addHeader("Content-Length", "xxx");
         assertEquals(ContentLengthStrategy.IDENTITY, lenStrategy.determineLength(message));
         
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             lenStrategy.determineLength(message);
             fail("ProtocolException should have been thrown");
@@ -209,13 +209,13 @@
         HttpMessage message = new HttpMessageMockup();
 
         // lenient mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, false);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, false);
         message.addHeader("Content-Type", "unknown");
         message.addHeader("Content-Length", "xxx");
         assertEquals(ContentLengthStrategy.IDENTITY, lenStrategy.determineLength(message));
         
         // strict mode 
-        message.getParams().setBooleanParameter(HttpProtocolParams.STRICT_TRANSFER_ENCODING, true);
+        message.getParams().setBooleanParameter(CoreProtocolPNames.STRICT_TRANSFER_ENCODING, true);
         try {
             lenStrategy.determineLength(message);
             fail("ProtocolException should have been thrown");

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestStrictContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestStrictContentLengthStrategy.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestStrictContentLengthStrategy.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/impl/entity/TestStrictContentLengthStrategy.java Sun Sep 16 03:53:13 2007
@@ -39,7 +39,7 @@
 import org.apache.http.ProtocolException;
 import org.apache.http.entity.ContentLengthStrategy;
 import org.apache.http.mockup.HttpMessageMockup;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 public class TestStrictContentLengthStrategy extends TestCase {
 
@@ -91,7 +91,7 @@
     public void testEntityWithInvalidChunkEncodingAndHTTP10() throws Exception {
         ContentLengthStrategy lenStrategy = new StrictContentLengthStrategy();
         HttpMessage message = new HttpMessageMockup();
-        message.getParams().setParameter(HttpProtocolParams.PROTOCOL_VERSION, 
+        message.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, 
                 HttpVersion.HTTP_1_0);
         message.addHeader("Transfer-Encoding", "chunked");
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicMessages.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicMessages.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicMessages.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicMessages.java Sun Sep 16 03:53:13 2007
@@ -42,7 +42,7 @@
 import org.apache.http.HttpStatus;
 import org.apache.http.HttpVersion;
 import org.apache.http.entity.BasicHttpEntity;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 /**
  * Unit tests for {@link Header}.
@@ -183,7 +183,7 @@
     public void testExpectContinue() {
         BasicHttpEntityEnclosingRequest request = new BasicHttpEntityEnclosingRequest("GET", "/");
         assertFalse(request.expectContinue()); 
-        request.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, true);
+        request.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
         assertFalse(request.expectContinue());
         request.addHeader("Expect", "100-Continue");
         assertTrue(request.expectContinue()); 

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpClient.java Sun Sep 16 03:53:13 2007
@@ -45,7 +45,7 @@
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpParamsLinker;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.BasicHttpContext;
@@ -71,8 +71,8 @@
         this.params
             .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
-            .setParameter(HttpProtocolParams.PROTOCOL_VERSION, HttpVersion.HTTP_1_1)
-            .setParameter(HttpProtocolParams.USER_AGENT, "TEST-CLIENT/1.1");
+            .setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1)
+            .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
 
         this.httpproc = new BasicHttpProcessor();
         // Required protocol interceptors

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java Sun Sep 16 03:53:13 2007
@@ -48,7 +48,7 @@
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.BasicHttpContext;
@@ -83,7 +83,7 @@
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
-            .setParameter(HttpProtocolParams.ORIGIN_SERVER, "TEST-SERVER/1.1");
+            .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         this.httpproc = new BasicHttpProcessor();
         this.httpproc.addInterceptor(new ResponseDate());
         this.httpproc.addInterceptor(new ResponseServer());

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestHttpServiceAndExecutor.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestHttpServiceAndExecutor.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestHttpServiceAndExecutor.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestHttpServiceAndExecutor.java Sun Sep 16 03:53:13 2007
@@ -52,7 +52,7 @@
 import org.apache.http.message.BasicHttpRequest;
 import org.apache.http.mockup.TestHttpClient;
 import org.apache.http.mockup.TestHttpServer;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.util.EncodingUtils;
 import org.apache.http.util.EntityUtils;
 
@@ -374,7 +374,7 @@
         
         // Set protocol level to HTTP/1.0
         this.client.getParams().setParameter(
-                HttpProtocolParams.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
+                CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
         
         DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
         HttpHost host = new HttpHost("localhost", this.server.getPort());
@@ -460,7 +460,7 @@
         this.server.start();
         
         // Activate 'expect: continue' handshake
-        this.client.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, true);
+        this.client.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
         
         DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
         HttpHost host = new HttpHost("localhost", this.server.getPort());
@@ -553,7 +553,7 @@
         this.server.start();
         
         // Activate 'expect: continue' handshake
-        this.client.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, true);
+        this.client.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
         
         DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
         HttpHost host = new HttpHost("localhost", this.server.getPort());

Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java Sun Sep 16 03:53:13 2007
@@ -47,7 +47,7 @@
 import org.apache.http.message.BasicHttpEntityEnclosingRequest;
 import org.apache.http.message.BasicHttpRequest;
 import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 
 /**
  * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
@@ -271,7 +271,7 @@
         String s = "whatever";
         StringEntity entity = new StringEntity(s, "US-ASCII");
         request.setEntity(entity);
-        request.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, true);
+        request.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
         RequestExpectContinue interceptor = new RequestExpectContinue();
         interceptor.process(request, context);
         Header header = request.getFirstHeader(HTTP.EXPECT_DIRECTIVE);
@@ -285,7 +285,7 @@
         String s = "whatever";
         StringEntity entity = new StringEntity(s, "US-ASCII");
         request.setEntity(entity);
-        request.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false);
+        request.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false);
         RequestExpectContinue interceptor = new RequestExpectContinue();
         interceptor.process(request, context);
         Header header = request.getFirstHeader(HTTP.EXPECT_DIRECTIVE);
@@ -299,7 +299,7 @@
         String s = "whatever";
         StringEntity entity = new StringEntity(s, "US-ASCII");
         request.setEntity(entity);
-        request.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, true);
+        request.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
         RequestExpectContinue interceptor = new RequestExpectContinue();
         interceptor.process(request, context);
         Header header = request.getFirstHeader(HTTP.EXPECT_DIRECTIVE);
@@ -312,7 +312,7 @@
         String s = "";
         StringEntity entity = new StringEntity(s, "US-ASCII");
         request.setEntity(entity);
-        request.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, true);
+        request.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
         RequestExpectContinue interceptor = new RequestExpectContinue();
         interceptor.process(request, context);
         Header header = request.getFirstHeader(HTTP.EXPECT_DIRECTIVE);
@@ -403,7 +403,7 @@
     public void testRequestUserAgentGenerated() throws Exception {
         HttpContext context = new BasicHttpContext(null);
         BasicHttpRequest request = new BasicHttpRequest("GET", "/");
-        request.getParams().setParameter(HttpProtocolParams.USER_AGENT, "some agent");
+        request.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "some agent");
         RequestUserAgent interceptor = new RequestUserAgent();
         interceptor.process(request, context);
         Header header = request.getFirstHeader(HTTP.USER_AGENT);
@@ -414,7 +414,7 @@
     public void testRequestUserAgentNotGenerated() throws Exception {
         HttpContext context = new BasicHttpContext(null);
         BasicHttpRequest request = new BasicHttpRequest("GET", "/");
-        request.getParams().setParameter(HttpProtocolParams.USER_AGENT, "some agent");
+        request.getParams().setParameter(CoreProtocolPNames.USER_AGENT, "some agent");
         request.addHeader(new BasicHeader(HTTP.USER_AGENT, "whatever"));
         RequestUserAgent interceptor = new RequestUserAgent();
         interceptor.process(request, context);
@@ -810,7 +810,7 @@
     public void testResponseServerGenerated() throws Exception {
         HttpContext context = new BasicHttpContext(null);
         HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK");
-        response.getParams().setParameter(HttpProtocolParams.ORIGIN_SERVER, "some server");
+        response.getParams().setParameter(CoreProtocolPNames.ORIGIN_SERVER, "some server");
         ResponseServer interceptor = new ResponseServer();
         interceptor.process(response, context);
         Header h1 = response.getFirstHeader(HTTP.SERVER_HEADER);
@@ -821,7 +821,7 @@
     public void testResponseServerNotGenerated() throws Exception {
         HttpContext context = new BasicHttpContext(null);
         HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK");
-        response.getParams().setParameter(HttpProtocolParams.ORIGIN_SERVER, "some server");
+        response.getParams().setParameter(CoreProtocolPNames.ORIGIN_SERVER, "some server");
         response.addHeader(new BasicHeader(HTTP.SERVER_HEADER, "whatever"));
         ResponseServer interceptor = new ResponseServer();
         interceptor.process(response, context);

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/BufferingHttpClientHandler.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/BufferingHttpClientHandler.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/BufferingHttpClientHandler.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/BufferingHttpClientHandler.java Sun Sep 16 03:53:13 2007
@@ -54,7 +54,7 @@
 import org.apache.http.nio.util.SimpleOutputBuffer;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpParamsLinker;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpProcessor;
@@ -142,7 +142,7 @@
                     int timeout = conn.getSocketTimeout();
                     connState.setTimeout(timeout);
                     timeout = this.params.getIntParameter(
-                            HttpProtocolParams.WAIT_FOR_CONTINUE, 3000);
+                            CoreProtocolPNames.WAIT_FOR_CONTINUE, 3000);
                     conn.setSocketTimeout(timeout);
                     connState.setOutputState(ClientConnState.EXPECT_CONTINUE);
                 } else {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java Sun Sep 16 03:53:13 2007
@@ -58,7 +58,7 @@
 import org.apache.http.nio.util.SharedOutputBuffer;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpParamsLinker;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpProcessor;
@@ -168,7 +168,7 @@
                         int timeout = conn.getSocketTimeout();
                         connState.setTimeout(timeout);
                         timeout = this.params.getIntParameter(
-                                HttpProtocolParams.WAIT_FOR_CONTINUE, 3000);
+                                CoreProtocolPNames.WAIT_FOR_CONTINUE, 3000);
                         conn.setSocketTimeout(timeout);
                         connState.setOutputState(ClientConnState.EXPECT_CONTINUE);
                     } else {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/HttpCoreNIOTestBase.java Sun Sep 16 03:53:13 2007
@@ -46,7 +46,7 @@
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
 import org.apache.http.protocol.HttpExpectationVerifier;
 import org.apache.http.protocol.HttpRequestHandler;
@@ -81,7 +81,7 @@
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
-            .setParameter(HttpProtocolParams.ORIGIN_SERVER, "TEST-SERVER/1.1");
+            .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         
         this.server = new TestHttpServer(serverParams);
         
@@ -92,7 +92,7 @@
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
-            .setParameter(HttpProtocolParams.USER_AGENT, "TEST-CLIENT/1.1");
+            .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
         
         this.client = new TestHttpClient(clientParams);
     }

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/nio/protocol/TestNIOHttp.java Sun Sep 16 03:53:13 2007
@@ -70,7 +70,7 @@
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.ExecutionContext;
@@ -184,7 +184,7 @@
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
-            .setParameter(HttpProtocolParams.ORIGIN_SERVER, "TEST-SERVER/1.1");
+            .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         
         this.server = new TestHttpServer(serverParams);
         
@@ -195,7 +195,7 @@
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
-            .setParameter(HttpProtocolParams.USER_AGENT, "TEST-CLIENT/1.1");
+            .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
         
         this.client = new TestHttpClient(clientParams);
         this.executor = new SimpleThreadPoolExecutor();
@@ -751,7 +751,7 @@
         
         // Set protocol level to HTTP/1.0
         this.client.getParams().setParameter(
-                HttpProtocolParams.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
+                CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
         
         HttpRequestExecutionHandler requestExecutionHandler = new HttpRequestExecutionHandler() {
 
@@ -893,7 +893,7 @@
         };
 
         // Activate 'expect: continue' handshake
-        this.client.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, true);
+        this.client.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
         
         HttpRequestExecutionHandler requestExecutionHandler = new HttpRequestExecutionHandler() {
 
@@ -1038,7 +1038,7 @@
         };
 
         // Activate 'expect: continue' handshake
-        this.client.getParams().setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, true);
+        this.client.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
 
         HttpRequestExecutionHandler requestExecutionHandler = new HttpRequestExecutionHandler() {
 

Modified: jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/HttpCoreNIOSSLTestBase.java Sun Sep 16 03:53:13 2007
@@ -17,7 +17,7 @@
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
 import org.apache.http.protocol.HttpExpectationVerifier;
 import org.apache.http.protocol.HttpRequestHandler;
@@ -52,7 +52,7 @@
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
-            .setParameter(HttpProtocolParams.ORIGIN_SERVER, "TEST-SERVER/1.1");
+            .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         
         this.server = new TestHttpSSLServer(serverParams);
         
@@ -63,7 +63,7 @@
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
-            .setParameter(HttpProtocolParams.USER_AGENT, "TEST-CLIENT/1.1");
+            .setParameter(CoreProtocolPNames.USER_AGENT, "TEST-CLIENT/1.1");
         
         this.client = new TestHttpSSLClient(clientParams);
     }

Modified: jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestBaseIOReactorSSL.java Sun Sep 16 03:53:13 2007
@@ -57,7 +57,7 @@
 import org.apache.http.params.BasicHttpParams;
 import org.apache.http.params.HttpConnectionParams;
 import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.BasicHttpProcessor;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpExpectationVerifier;
@@ -78,7 +78,7 @@
             .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 10)
             .setBooleanParameter(HttpConnectionParams.STALE_CONNECTION_CHECK, false)
             .setBooleanParameter(HttpConnectionParams.TCP_NODELAY, true)
-            .setParameter(HttpProtocolParams.ORIGIN_SERVER, "TEST-SERVER/1.1");
+            .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
         
         this.server = new TestHttpSSLServer(serverParams);
     }

Modified: jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestNIOSSLHttp.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestNIOSSLHttp.java?rev=576073&r1=576072&r2=576073&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestNIOSSLHttp.java (original)
+++ jakarta/httpcomponents/httpcore/trunk/module-niossl/src/test/java/org/apache/http/impl/nio/reactor/TestNIOSSLHttp.java Sun Sep 16 03:53:13 2007
@@ -58,7 +58,7 @@
 import org.apache.http.nio.NHttpConnection;
 import org.apache.http.nio.NHttpServiceHandler;
 import org.apache.http.nio.protocol.HttpRequestExecutionHandler;
-import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.params.CoreProtocolPNames;
 import org.apache.http.protocol.ExecutionContext;
 import org.apache.http.protocol.HttpContext;
 import org.apache.http.protocol.HttpRequestHandler;
@@ -567,7 +567,7 @@
         
         // Set protocol level to HTTP/1.0
         this.client.getParams().setParameter(
-                HttpProtocolParams.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
+                CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
         
         HttpRequestExecutionHandler requestExecutionHandler = new HttpRequestExecutionHandler() {
 



Mime
View raw message