Index: httpcore/module-main/src/test/java/org/apache/http/impl/TestHeaderGroup.java =================================================================== --- httpcore/module-main/src/test/java/org/apache/http/impl/TestHeaderGroup.java (revision 505861) +++ httpcore/module-main/src/test/java/org/apache/http/impl/TestHeaderGroup.java (working copy) @@ -1,156 +0,0 @@ -/* - * $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 - * . - * - */ - -package org.apache.http.impl; - -import java.util.Iterator; - -import org.apache.http.Header; -import org.apache.http.message.BasicHeader; - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -/** - * Unit tests for {@link HeaderGroup}. - * - * @author Oleg Kalnichevski - */ -public class TestHeaderGroup extends TestCase { - - public TestHeaderGroup(String testName) { - super(testName); - } - - public static void main(String args[]) { - String[] testCaseName = { TestHeaderGroup.class.getName() }; - junit.textui.TestRunner.main(testCaseName); - } - - public static Test suite() { - return new TestSuite(TestHeaderGroup.class); - } - - public void testConstructor() { - HeaderGroup headergroup = new HeaderGroup(); - assertNotNull(headergroup.getAllHeaders()); - assertEquals(0, headergroup.getAllHeaders().length); - } - - public void testClear() { - HeaderGroup headergroup = new HeaderGroup(); - headergroup.addHeader(new BasicHeader("name", "value")); - assertEquals(1, headergroup.getAllHeaders().length); - headergroup.clear(); - assertEquals(0, headergroup.getAllHeaders().length); - } - - public void testAddRemoveHeader() { - HeaderGroup headergroup = new HeaderGroup(); - Header header = new BasicHeader("name", "value"); - headergroup.addHeader(header); - headergroup.addHeader(null); - assertEquals(1, headergroup.getAllHeaders().length); - headergroup.removeHeader(header); - headergroup.removeHeader(null); - assertEquals(0, headergroup.getAllHeaders().length); - } - - public void testUpdateHeader() { - HeaderGroup headergroup = new HeaderGroup(); - Header header1 = new BasicHeader("name1", "value1"); - Header header2 = new BasicHeader("name2", "value2"); - Header header3 = new BasicHeader("name3", "value3"); - headergroup.addHeader(header1); - headergroup.addHeader(header2); - headergroup.addHeader(header3); - headergroup.updateHeader(new BasicHeader("name2", "newvalue")); - headergroup.updateHeader(new BasicHeader("name4", "value4")); - headergroup.updateHeader(null); - assertEquals(4, headergroup.getAllHeaders().length); - assertEquals("newvalue", headergroup.getFirstHeader("name2").getValue()); - } - - public void testSetHeaders() { - HeaderGroup headergroup = new HeaderGroup(); - Header header1 = new BasicHeader("name1", "value1"); - Header header2 = new BasicHeader("name2", "value2"); - Header header3 = new BasicHeader("name3", "value3"); - headergroup.addHeader(header1); - headergroup.setHeaders(new Header[] { header2, header3 }); - assertEquals(2, headergroup.getAllHeaders().length); - assertEquals(0, headergroup.getHeaders("name1").length); - assertFalse(headergroup.containsHeader("name1")); - assertEquals(1, headergroup.getHeaders("name2").length); - assertTrue(headergroup.containsHeader("name2")); - assertEquals(1, headergroup.getHeaders("name3").length); - assertTrue(headergroup.containsHeader("name3")); - headergroup.setHeaders(null); - assertEquals(0, headergroup.getAllHeaders().length); - } - - public void testFirstLastHeaders() { - HeaderGroup headergroup = new HeaderGroup(); - Header header1 = new BasicHeader("name", "value1"); - Header header2 = new BasicHeader("name", "value2"); - Header header3 = new BasicHeader("name", "value3"); - headergroup.setHeaders(new Header[] { header1, header2, header3 }); - - assertNull(headergroup.getFirstHeader("whatever")); - assertNull(headergroup.getLastHeader("whatever")); - - assertEquals("value1", headergroup.getFirstHeader("name").getValue()); - assertEquals("value3", headergroup.getLastHeader("name").getValue()); - } - - public void testCondensedHeader() { - HeaderGroup headergroup = new HeaderGroup(); - assertNull(headergroup.getCondensedHeader("name")); - - Header header1 = new BasicHeader("name", "value1"); - Header header2 = new BasicHeader("name", "value2"); - Header header3 = new BasicHeader("name", "value3"); - headergroup.setHeaders(new Header[] { header1, header2, header3 }); - - assertEquals("value1, value2, value3", headergroup.getCondensedHeader("name").getValue()); - - headergroup.setHeaders(new Header[] { header1 }); - assertEquals(header1, headergroup.getCondensedHeader("name")); - } - - public void testIterator() { - HeaderGroup headergroup = new HeaderGroup(); - Iterator i = headergroup.iterator(); - assertNotNull(i); - assertFalse(i.hasNext()); - } -} Index: httpcore/module-main/src/test/java/org/apache/http/impl/TestAllImpl.java =================================================================== --- httpcore/module-main/src/test/java/org/apache/http/impl/TestAllImpl.java (revision 505861) +++ httpcore/module-main/src/test/java/org/apache/http/impl/TestAllImpl.java (working copy) @@ -40,7 +40,6 @@ public static Test suite() { TestSuite suite = new TestSuite(); - suite.addTest(TestHeaderGroup.suite()); suite.addTest(TestHttpDataReceiverAndTransmitter.suite()); suite.addTest(TestDefaultConnectionReuseStrategy.suite()); suite.addTest(TestEnglishReasonPhraseCatalog.suite()); Index: httpcore/module-main/src/test/java/org/apache/http/impl/TestHttpDataReceiverAndTransmitter.java =================================================================== --- httpcore/module-main/src/test/java/org/apache/http/impl/TestHttpDataReceiverAndTransmitter.java (revision 505861) +++ httpcore/module-main/src/test/java/org/apache/http/impl/TestHttpDataReceiverAndTransmitter.java (working copy) @@ -39,7 +39,7 @@ import junit.framework.TestCase; import junit.framework.TestSuite; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.mockup.HttpDataReceiverMockup; import org.apache.http.mockup.HttpDataTransmitterMockup; import org.apache.http.params.HttpConnectionParams; @@ -313,7 +313,7 @@ } public void testLineLimit() throws Exception { - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); String s = "a very looooooooooooooooooooooooooooooooooooooong line\r\n "; byte[] tmp = s.getBytes("US-ASCII"); HttpDataReceiverMockup receiver1 = new HttpDataReceiverMockup(tmp, 5); @@ -358,7 +358,7 @@ String s2 = constructString(RUSSIAN_HELLO); String s3 = "Like hello and stuff"; - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); HttpProtocolParams.setHttpElementCharset(params, "UTF-8"); HttpDataTransmitterMockup transmitter = new HttpDataTransmitterMockup(); @@ -394,7 +394,7 @@ public void testNonAsciiReadWriteLine() throws Exception { String s1 = constructString(SWISS_GERMAN_HELLO); - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); HttpProtocolParams.setHttpElementCharset(params, HTTP.ISO_8859_1); HttpDataTransmitterMockup transmitter = new HttpDataTransmitterMockup(); Index: httpcore/module-main/src/test/java/org/apache/http/message/TestAbstractMessage.java =================================================================== --- httpcore/module-main/src/test/java/org/apache/http/message/TestAbstractMessage.java (revision 505861) +++ httpcore/module-main/src/test/java/org/apache/http/message/TestAbstractMessage.java (working copy) @@ -33,7 +33,7 @@ import org.apache.http.Header; import org.apache.http.HttpMessage; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.mockup.HttpMessageMockup; import org.apache.http.params.HttpParams; @@ -131,7 +131,7 @@ public void testParameters() { HttpMessage message = new HttpMessageMockup(); assertNotNull(message.getParams()); - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); message.setParams(params); assertTrue(params == message.getParams()); } Index: httpcore/module-main/src/test/java/org/apache/http/util/TestHeaderGroup.java =================================================================== --- httpcore/module-main/src/test/java/org/apache/http/util/TestHeaderGroup.java (revision 505861) +++ httpcore/module-main/src/test/java/org/apache/http/util/TestHeaderGroup.java (working copy) @@ -29,7 +29,7 @@ * */ -package org.apache.http.impl; +package org.apache.http.util; import java.util.Iterator; Index: httpcore/module-main/src/test/java/org/apache/http/util/TestAllUtil.java =================================================================== --- httpcore/module-main/src/test/java/org/apache/http/util/TestAllUtil.java (revision 505861) +++ httpcore/module-main/src/test/java/org/apache/http/util/TestAllUtil.java (working copy) @@ -46,6 +46,7 @@ suite.addTest(TestDateUtils.suite()); suite.addTest(TestEntityUtils.suite()); suite.addTest(TestHeaderUtils.suite()); + suite.addTest(TestHeaderGroup.suite()); suite.addTest(TestByteArrayBuffer.suite()); suite.addTest(TestCharArrayBuffer.suite()); return suite; Index: httpcore/module-main/src/main/java/org/apache/http/message/AbstractHttpMessage.java =================================================================== --- httpcore/module-main/src/main/java/org/apache/http/message/AbstractHttpMessage.java (revision 505861) +++ httpcore/module-main/src/main/java/org/apache/http/message/AbstractHttpMessage.java (working copy) @@ -35,9 +35,9 @@ import org.apache.http.Header; import org.apache.http.HttpMessage; -import org.apache.http.impl.params.DefaultHttpParams; -import org.apache.http.impl.HeaderGroup; +import org.apache.http.util.HeaderGroup; import org.apache.http.params.HttpParams; +import org.apache.http.params.BasicHttpParams; /** * Basic implementation of an HTTP message that can be modified. @@ -57,7 +57,7 @@ protected AbstractHttpMessage() { super(); this.headergroup = new HeaderGroup(); - this.params = new DefaultHttpParams(null); + this.params = new BasicHttpParams(null); } public boolean containsHeader(String name) { Index: httpcore/module-main/src/main/java/org/apache/http/impl/params/DefaultHttpParams.java =================================================================== --- httpcore/module-main/src/main/java/org/apache/http/impl/params/DefaultHttpParams.java (revision 505861) +++ httpcore/module-main/src/main/java/org/apache/http/impl/params/DefaultHttpParams.java (working copy) @@ -1,202 +0,0 @@ -/* - * $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 - * . - * - */ - -package org.apache.http.impl.params; - -import java.io.Serializable; -import java.util.HashMap; - -import org.apache.http.params.HttpParams; - -/** - * This class represents a collection of HTTP protocol parameters. - * Protocol parameters may be linked together to form a hierarchy. - * If a particular parameter value has not been explicitly defined - * in the collection itself, its value will be drawn from the parent - * collection of parameters. - * - * @author Oleg Kalnichevski - * - * @version $Revision$ - */ -public class DefaultHttpParams implements HttpParams, Serializable { - - static final long serialVersionUID = -8296449161405728403L; - - /** The set of default values to defer to */ - private HttpParams defaults = null; - - /** Hash map of HTTP parameters that this collection contains */ - private HashMap parameters = null; - - /** - * Creates a new collection of parameters with the given parent. - * The collection will defer to its parent for a default value - * if a particular parameter is not explicitly set in the collection - * itself. - * - * @param defaults the parent collection to defer to, if a parameter - * is not explictly set in the collection itself. - */ - public DefaultHttpParams(final HttpParams defaults) { - super(); - this.defaults = defaults; - } - - public DefaultHttpParams() { - this(null); - } - - public synchronized HttpParams getDefaults() { - return this.defaults; - } - - public synchronized void setDefaults(final HttpParams params) { - this.defaults = params; - } - - public synchronized Object getParameter(final String name) { - // See if the parameter has been explicitly defined - Object param = null; - if (this.parameters != null) { - param = this.parameters.get(name); - } - if (param != null) { - // If so, return - return param; - } else { - // If not, see if defaults are available - if (this.defaults != null) { - // Return default parameter value - return this.defaults.getParameter(name); - } else { - // Otherwise, return null - return null; - } - } - } - - public synchronized HttpParams setParameter(final String name, final Object value) { - if (this.parameters == null) { - this.parameters = new HashMap(); - } - this.parameters.put(name, value); - return this; - } - - /** - * Assigns the value to all the parameter with the given names - * - * @param names array of parameter name - * @param value parameter value - */ - public synchronized void setParameters(final String[] names, final Object value) { - for (int i = 0; i < names.length; i++) { - setParameter(names[i], value); - } - } - - public long getLongParameter(final String name, long defaultValue) { - Object param = getParameter(name); - if (param == null) { - return defaultValue; - } - return ((Long)param).longValue(); - } - - public HttpParams setLongParameter(final String name, long value) { - setParameter(name, new Long(value)); - return this; - } - - public int getIntParameter(final String name, int defaultValue) { - Object param = getParameter(name); - if (param == null) { - return defaultValue; - } - return ((Integer)param).intValue(); - } - - public HttpParams setIntParameter(final String name, int value) { - setParameter(name, new Integer(value)); - return this; - } - - public double getDoubleParameter(final String name, double defaultValue) { - Object param = getParameter(name); - if (param == null) { - return defaultValue; - } - return ((Double)param).doubleValue(); - } - - public HttpParams setDoubleParameter(final String name, double value) { - setParameter(name, new Double(value)); - return this; - } - - public boolean getBooleanParameter(final String name, boolean defaultValue) { - Object param = getParameter(name); - if (param == null) { - return defaultValue; - } - return ((Boolean)param).booleanValue(); - } - - public HttpParams setBooleanParameter(final String name, boolean value) { - setParameter(name, value ? Boolean.TRUE : Boolean.FALSE); - return this; - } - - public boolean isParameterSet(final String name) { - return getParameter(name) != null; - } - - public boolean isParameterSetLocally(final String name) { - return this.parameters != null && this.parameters.get(name) != null; - } - - public boolean isParameterTrue(final String name) { - return getBooleanParameter(name, false); - } - - public boolean isParameterFalse(final String name) { - return !getBooleanParameter(name, false); - } - - /** - * Removes all parameters from this collection. - */ - public void clear() { - this.parameters = null; - } - -} Index: httpcore/module-main/src/main/java/org/apache/http/impl/HeaderGroup.java =================================================================== --- httpcore/module-main/src/main/java/org/apache/http/impl/HeaderGroup.java (revision 505861) +++ httpcore/module-main/src/main/java/org/apache/http/impl/HeaderGroup.java (working copy) @@ -1,263 +0,0 @@ -/* - * $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 - * . - * - */ - -package org.apache.http.impl; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.http.Header; -import org.apache.http.message.BasicHeader; -import org.apache.http.util.CharArrayBuffer; - -/** - * A class for combining a set of headers. - * This class allows for multiple headers with the same name and - * keeps track of the order in which headers were added. - * - * @author Michael Becke - * - * @since 4.0 - */ -public class HeaderGroup { - - /** The list of headers for this group, in the order in which they were added */ - private List headers; - - /** - * Constructor for HeaderGroup. - */ - public HeaderGroup() { - this.headers = new ArrayList(16); - } - - /** - * Removes any contained headers. - */ - public void clear() { - headers.clear(); - } - - /** - * Adds the given header to the group. The order in which this header was - * added is preserved. - * - * @param header the header to add - */ - public void addHeader(Header header) { - if (header == null) { - return; - } - headers.add(header); - } - - /** - * Removes the given header. - * - * @param header the header to remove - */ - public void removeHeader(Header header) { - if (header == null) { - return; - } - headers.remove(header); - } - - /** - * Replaces the first occurence of the header with the same name. If no header with - * the same name is found the given header is added to the end of the list. - * - * @param header the new header that should replace the first header with the same - * name if present in the list. - */ - public void updateHeader(Header header) { - if (header == null) { - return; - } - for (int i = 0; i < this.headers.size(); i++) { - Header current = (Header) this.headers.get(i); - if (current.getName().equalsIgnoreCase(header.getName())) { - this.headers.set(i, header); - return; - } - } - this.headers.add(header); - } - - /** - * Sets all of the headers contained within this group overriding any - * existing headers. The headers are added in the order in which they appear - * in the array. - * - * @param headers the headers to set - */ - public void setHeaders(Header[] headers) { - clear(); - if (headers == null) { - return; - } - for (int i = 0; i < headers.length; i++) { - this.headers.add(headers[i]); - } - } - - /** - * Gets a header representing all of the header values with the given name. - * If more that one header with the given name exists the values will be - * combined with a "," as per RFC 2616. - * - *

Header name comparison is case insensitive. - * - * @param name the name of the header(s) to get - * @return a header with a condensed value or null if no - * headers by the given name are present - */ - public Header getCondensedHeader(String name) { - Header[] headers = getHeaders(name); - - if (headers.length == 0) { - return null; - } else if (headers.length == 1) { - return headers[0]; - } else { - CharArrayBuffer valueBuffer = new CharArrayBuffer(128); - valueBuffer.append(headers[0].getValue()); - for (int i = 1; i < headers.length; i++) { - valueBuffer.append(", "); - valueBuffer.append(headers[i].getValue()); - } - - return new BasicHeader(name.toLowerCase(), valueBuffer.toString()); - } - } - - /** - * Gets all of the headers with the given name. The returned array - * maintains the relative order in which the headers were added. - * - *

Header name comparison is case insensitive. - * - * @param name the name of the header(s) to get - * - * @return an array of length >= 0 - */ - public Header[] getHeaders(String name) { - ArrayList headersFound = new ArrayList(); - - for (int i = 0; i < headers.size(); i++) { - Header header = (Header) headers.get(i); - if (header.getName().equalsIgnoreCase(name)) { - headersFound.add(header); - } - } - - return (Header[]) headersFound.toArray(new Header[headersFound.size()]); - } - - /** - * Gets the first header with the given name. - * - *

Header name comparison is case insensitive. - * - * @param name the name of the header to get - * @return the first header or null - */ - public Header getFirstHeader(String name) { - for (int i = 0; i < headers.size(); i++) { - Header header = (Header) headers.get(i); - if (header.getName().equalsIgnoreCase(name)) { - return header; - } - } - return null; - } - - /** - * Gets the last header with the given name. - * - *

Header name comparison is case insensitive. - * - * @param name the name of the header to get - * @return the last header or null - */ - public Header getLastHeader(String name) { - // start at the end of the list and work backwards - for (int i = headers.size() - 1; i >= 0; i--) { - Header header = (Header) headers.get(i); - if (header.getName().equalsIgnoreCase(name)) { - return header; - } - } - - return null; - } - - /** - * Gets all of the headers contained within this group. - * - * @return an array of length >= 0 - */ - public Header[] getAllHeaders() { - return (Header[]) headers.toArray(new Header[headers.size()]); - } - - /** - * Tests if headers with the given name are contained within this group. - * - *

Header name comparison is case insensitive. - * - * @param name the header name to test for - * @return true if at least one header with the name is - * contained, false otherwise - */ - public boolean containsHeader(String name) { - for (int i = 0; i < headers.size(); i++) { - Header header = (Header) headers.get(i); - if (header.getName().equalsIgnoreCase(name)) { - return true; - } - } - - return false; - } - - /** - * Returns an iterator over this group of headers. - * - * @return iterator over this group of headers. - * - * @since 4.0 - */ - public Iterator iterator() { - return this.headers.iterator(); - } -} Index: httpcore/module-main/src/main/java/org/apache/http/params/BasicHttpParams.java =================================================================== --- httpcore/module-main/src/main/java/org/apache/http/params/BasicHttpParams.java (revision 505861) +++ httpcore/module-main/src/main/java/org/apache/http/params/BasicHttpParams.java (working copy) @@ -29,7 +29,7 @@ * */ -package org.apache.http.impl.params; +package org.apache.http.params; import java.io.Serializable; import java.util.HashMap; @@ -47,14 +47,14 @@ * * @version $Revision$ */ -public class DefaultHttpParams implements HttpParams, Serializable { +public class BasicHttpParams implements HttpParams, Serializable { - static final long serialVersionUID = -8296449161405728403L; + static final long serialVersionUID = -8296449161405728403L; - /** The set of default values to defer to */ + /** The set of default values to defer to. */ private HttpParams defaults = null; - /** Hash map of HTTP parameters that this collection contains */ + /** Map of HTTP parameters that this collection contains. */ private HashMap parameters = null; /** @@ -66,12 +66,12 @@ * @param defaults the parent collection to defer to, if a parameter * is not explictly set in the collection itself. */ - public DefaultHttpParams(final HttpParams defaults) { + public BasicHttpParams(final HttpParams defaults) { super(); this.defaults = defaults; } - public DefaultHttpParams() { + public BasicHttpParams() { this(null); } Index: httpcore/module-main/src/main/java/org/apache/http/util/HeaderGroup.java =================================================================== --- httpcore/module-main/src/main/java/org/apache/http/util/HeaderGroup.java (revision 505861) +++ httpcore/module-main/src/main/java/org/apache/http/util/HeaderGroup.java (working copy) @@ -29,7 +29,7 @@ * */ -package org.apache.http.impl; +package org.apache.http.util; import java.util.ArrayList; import java.util.Iterator; Index: httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java =================================================================== --- httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java (revision 505861) +++ httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpGet.java (working copy) @@ -39,7 +39,7 @@ import org.apache.http.HttpVersion; import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.DefaultHttpClientConnection; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.HttpGet; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; @@ -67,7 +67,7 @@ public static void main(String[] args) throws Exception { - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1"); Index: httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java =================================================================== --- httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java (revision 505861) +++ httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpPost.java (working copy) @@ -44,7 +44,7 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.DefaultHttpClientConnection; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.HttpPost; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; @@ -72,7 +72,7 @@ public static void main(String[] args) throws Exception { - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1"); Index: httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpServer.java =================================================================== --- httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpServer.java (revision 505861) +++ httpcore/module-main/src/examples/org/apache/http/examples/ElementalHttpServer.java (working copy) @@ -55,7 +55,7 @@ import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.DefaultHttpResponseFactory; import org.apache.http.impl.DefaultHttpServerConnection; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; @@ -175,7 +175,7 @@ public RequestListenerThread(int port, final String docroot) throws IOException { this.serversocket = new ServerSocket(port); - this.params = new DefaultHttpParams(null); + this.params = new BasicHttpParams(null); this.params .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000) .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024) Index: httpcore/src/contrib/org/apache/http/contrib/benchmark/HttpBenchmark.java =================================================================== --- httpcore/src/contrib/org/apache/http/contrib/benchmark/HttpBenchmark.java (revision 505861) +++ httpcore/src/contrib/org/apache/http/contrib/benchmark/HttpBenchmark.java (working copy) @@ -44,7 +44,7 @@ import org.apache.http.HttpRequest; import org.apache.http.HttpVersion; import org.apache.http.entity.FileEntity; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.HttpGet; import org.apache.http.message.HttpHead; import org.apache.http.message.HttpPost; @@ -68,7 +68,7 @@ public static void main(String[] args) throws Exception { - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); params.setParameter(HttpProtocolParams.PROTOCOL_VERSION, HttpVersion.HTTP_1_1) .setParameter(HttpProtocolParams.USER_AGENT, "Jakarta-HttpComponents-Bench/1.1") .setBooleanParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false) Index: httpcore/module-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java =================================================================== --- httpcore/module-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java (revision 505861) +++ httpcore/module-nio/src/test/java/org/apache/http/impl/nio/reactor/TestSessionInOutBuffers.java (working copy) @@ -42,7 +42,7 @@ import junit.framework.TestCase; import junit.framework.TestSuite; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.impl.nio.reactor.SessionInputBuffer; import org.apache.http.impl.nio.reactor.SessionOutputBuffer; import org.apache.http.params.HttpParams; @@ -322,7 +322,7 @@ String s2 = constructString(RUSSIAN_HELLO); String s3 = "Like hello and stuff"; - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); HttpProtocolParams.setHttpElementCharset(params, "UTF-8"); SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 16); Index: httpcore/module-nio/src/test/java/org/apache/http/nio/mockup/TestHttpServiceBase.java =================================================================== --- httpcore/module-nio/src/test/java/org/apache/http/nio/mockup/TestHttpServiceBase.java (revision 505861) +++ httpcore/module-nio/src/test/java/org/apache/http/nio/mockup/TestHttpServiceBase.java (working copy) @@ -35,7 +35,7 @@ import java.net.InetAddress; import org.apache.http.HttpException; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.nio.protocol.EventListener; import org.apache.http.nio.reactor.IOReactor; import org.apache.http.params.HttpParams; @@ -52,7 +52,7 @@ public TestHttpServiceBase() { super(); this.mutex = new Object(); - this.params = new DefaultHttpParams(null); + this.params = new BasicHttpParams(null); } protected abstract void execute() throws IOException; Index: httpcore/module-nio/src/examples/org/apache/http/examples/nio/AsyncHttpServer.java =================================================================== --- httpcore/module-nio/src/examples/org/apache/http/examples/nio/AsyncHttpServer.java (revision 505861) +++ httpcore/module-nio/src/examples/org/apache/http/examples/nio/AsyncHttpServer.java (working copy) @@ -21,7 +21,7 @@ import org.apache.http.entity.FileEntity; import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.DefaultHttpResponseFactory; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.util.concurrent.Executor; import org.apache.http.impl.nio.DefaultServerIOEventDispatch; import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor; @@ -50,7 +50,7 @@ System.err.println("Please specify document root directory"); System.exit(1); } - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); params .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000) .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024) Index: httpcore/module-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java =================================================================== --- httpcore/module-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java (revision 505861) +++ httpcore/module-nio/src/examples/org/apache/http/examples/nio/NHttpServer.java (working copy) @@ -21,7 +21,7 @@ import org.apache.http.entity.FileEntity; import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.DefaultHttpResponseFactory; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.impl.nio.DefaultServerIOEventDispatch; import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor; import org.apache.http.nio.protocol.EventListener; @@ -48,7 +48,7 @@ System.err.println("Please specify document root directory"); System.exit(1); } - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); params .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000) .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024) Index: httpcore/module-nio/src/examples/org/apache/http/examples/nio/ElementalEchoServer.java =================================================================== --- httpcore/module-nio/src/examples/org/apache/http/examples/nio/ElementalEchoServer.java (revision 505861) +++ httpcore/module-nio/src/examples/org/apache/http/examples/nio/ElementalEchoServer.java (working copy) @@ -5,7 +5,7 @@ import java.net.InetSocketAddress; import java.nio.ByteBuffer; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor; import org.apache.http.nio.reactor.EventMask; import org.apache.http.nio.reactor.IOEventDispatch; @@ -16,7 +16,7 @@ public class ElementalEchoServer { public static void main(String[] args) throws Exception { - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); IOEventDispatch ioEventDispatch = new DefaultIoEventDispatch(); ListeningIOReactor ioReactor = new DefaultListeningIOReactor(2, params); ioReactor.listen(new InetSocketAddress(8080)); Index: httpcore/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java =================================================================== --- httpcore/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java (revision 505861) +++ httpcore/module-nio/src/examples/org/apache/http/examples/nio/NHttpClient.java (working copy) @@ -11,7 +11,7 @@ import org.apache.http.HttpRequest; import org.apache.http.HttpResponse; import org.apache.http.impl.DefaultConnectionReuseStrategy; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.HttpGet; import org.apache.http.impl.nio.DefaultClientIOEventDispatch; import org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor; @@ -37,7 +37,7 @@ public class NHttpClient { public static void main(String[] args) throws Exception { - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); params .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000) .setIntParameter(HttpConnectionParams.CONNECTION_TIMEOUT, 10000) Index: httpcore/module-niossl/src/test/java/org/apache/http/impl/nio/mockup/TestHttpSSLServiceBase.java =================================================================== --- httpcore/module-niossl/src/test/java/org/apache/http/impl/nio/mockup/TestHttpSSLServiceBase.java (revision 505861) +++ httpcore/module-niossl/src/test/java/org/apache/http/impl/nio/mockup/TestHttpSSLServiceBase.java (working copy) @@ -35,7 +35,7 @@ import java.net.InetAddress; import org.apache.http.HttpException; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.nio.protocol.EventListener; import org.apache.http.nio.reactor.IOReactor; import org.apache.http.params.HttpParams; @@ -52,7 +52,7 @@ public TestHttpSSLServiceBase() { super(); this.mutex = new Object(); - this.params = new DefaultHttpParams(null); + this.params = new BasicHttpParams(null); } protected abstract void execute() throws IOException; Index: httpcore/module-niossl/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java =================================================================== --- httpcore/module-niossl/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java (revision 505861) +++ httpcore/module-niossl/src/examples/org/apache/http/examples/nio/NHttpSSLServer.java (working copy) @@ -58,7 +58,7 @@ import org.apache.http.entity.FileEntity; import org.apache.http.impl.DefaultConnectionReuseStrategy; import org.apache.http.impl.DefaultHttpResponseFactory; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor; import org.apache.http.impl.nio.reactor.SSLServerIOEventDispatch; import org.apache.http.nio.protocol.EventListener; @@ -97,7 +97,7 @@ SSLContext sslcontext = SSLContext.getInstance("TLS"); sslcontext.init(keymanagers, null, null); - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); params .setIntParameter(HttpConnectionParams.SO_TIMEOUT, 5000) .setIntParameter(HttpConnectionParams.SOCKET_BUFFER_SIZE, 8 * 1024) Index: httpclient/src/test/org/apache/http/impl/client/TestDefaultResponseConsumedWatcher.java =================================================================== --- httpclient/src/test/org/apache/http/impl/client/TestDefaultResponseConsumedWatcher.java (revision 505745) +++ httpclient/src/test/org/apache/http/impl/client/TestDefaultResponseConsumedWatcher.java (working copy) @@ -37,7 +37,7 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpVersion; import org.apache.http.entity.BasicHttpEntity; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.BasicHttpResponse; import org.apache.http.mockup.HttpConnectionMockup; import org.apache.http.protocol.HttpContext; @@ -92,7 +92,7 @@ HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_0, 200, "OK"); response.addHeader("Connection", "Close"); - response.setParams(new DefaultHttpParams(null)); + response.setParams(new BasicHttpParams(null)); response.setEntity(entity); // Wrap the entity input stream @@ -115,7 +115,7 @@ HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK"); response.addHeader("Connection", "Keep-alive"); - response.setParams(new DefaultHttpParams(null)); + response.setParams(new BasicHttpParams(null)); response.setEntity(entity); // Wrap the entity input stream Index: httpclient/src/test/org/apache/http/cookie/TestCookiePolicy.java =================================================================== --- httpclient/src/test/org/apache/http/cookie/TestCookiePolicy.java (revision 505743) +++ httpclient/src/test/org/apache/http/cookie/TestCookiePolicy.java (working copy) @@ -35,7 +35,7 @@ import org.apache.http.impl.cookie.NetscapeDraftSpecFactory; import org.apache.http.impl.cookie.RFC2109SpecFactory; import org.apache.http.cookie.params.CookieSpecParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; import junit.framework.Test; @@ -106,7 +106,7 @@ } catch (IllegalStateException ex) { // expected } - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); assertNotNull(CookiePolicy.getCookieSpec(CookieSpecParams.NETSCAPE, params)); assertNotNull(CookiePolicy.getCookieSpec(CookieSpecParams.RFC_2109, params)); assertNotNull(CookiePolicy.getCookieSpec(CookieSpecParams.BROWSER_COMPATIBILITY, params)); Index: httpclient/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java =================================================================== --- httpclient/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java (revision 505743) +++ httpclient/src/test/org/apache/http/conn/ssl/TestSSLSocketFactory.java (working copy) @@ -34,7 +34,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; import javax.net.ServerSocketFactory; @@ -93,7 +93,7 @@ public void testToString() {} public void testCreateSocket() throws Exception { - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); String password = "changeit"; char[] pwd = password.toCharArray(); Index: httpclient/src/java/org/apache/http/impl/conn/SimpleHttpConnectionManager.java =================================================================== --- httpclient/src/java/org/apache/http/impl/conn/SimpleHttpConnectionManager.java (revision 505743) +++ httpclient/src/java/org/apache/http/impl/conn/SimpleHttpConnectionManager.java (working copy) @@ -40,7 +40,7 @@ import org.apache.http.conn.HostConfiguration; import org.apache.http.conn.HttpConnectionManager; import org.apache.http.conn.HttpHostConnection; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; /** @@ -93,7 +93,7 @@ /** * Collection of parameters associated with this connection manager. */ - private HttpParams params = new DefaultHttpParams(); + private HttpParams params = new BasicHttpParams(); /** * The time the connection was made idle. Index: httpclient/src/java/org/apache/http/impl/conn/MultiThreadedHttpConnectionManager.java =================================================================== --- httpclient/src/java/org/apache/http/impl/conn/MultiThreadedHttpConnectionManager.java (revision 505743) +++ httpclient/src/java/org/apache/http/impl/conn/MultiThreadedHttpConnectionManager.java (working copy) @@ -54,7 +54,7 @@ import org.apache.http.conn.HttpConnectionManager; import org.apache.http.conn.HttpHostConnection; import org.apache.http.conn.params.HttpConnectionManagerParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; /** @@ -233,7 +233,7 @@ /** * Collection of parameters associated with this connection manager. */ - private HttpParams params = new DefaultHttpParams(); + private HttpParams params = new BasicHttpParams(); /** Connection Pool */ private ConnectionPool connectionPool; Index: httpclient/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java =================================================================== --- httpclient/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java (revision 505743) +++ httpclient/src/java/org/apache/http/impl/conn/ThreadSafeClientConnManager.java (working copy) @@ -53,7 +53,7 @@ import org.apache.http.conn.ManagedClientConnection; import org.apache.http.conn.OperatedClientConnection; import org.apache.http.conn.params.HttpConnectionManagerParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.params.HttpParams; import org.apache.http.protocol.HttpContext; @@ -107,7 +107,7 @@ /** The parameters of this connection manager. */ - private HttpParams params = new DefaultHttpParams(); + private HttpParams params = new BasicHttpParams(); /** The pool of connections being managed. */ Index: httpclient/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java =================================================================== --- httpclient/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java (revision 505743) +++ httpclient/src/examples/org/apache/http/examples/conn/ManagerConnectDirect.java (working copy) @@ -40,7 +40,7 @@ import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpExecutionContext; @@ -178,7 +178,7 @@ // Prepare parameters. // Since this example doesn't use the full core framework, // only few parameters are actually required. - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setUseExpectContinue(params, false); defaultParameters = params; Index: httpclient/src/examples/org/apache/http/examples/conn/OperatorConnectDirect.java =================================================================== --- httpclient/src/examples/org/apache/http/examples/conn/OperatorConnectDirect.java (revision 505743) +++ httpclient/src/examples/org/apache/http/examples/conn/OperatorConnectDirect.java (working copy) @@ -40,7 +40,7 @@ import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpExecutionContext; @@ -153,7 +153,7 @@ // Prepare parameters. // Since this example doesn't use the full core framework, // only few parameters are actually required. - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setUseExpectContinue(params, false); defaultParameters = params; Index: httpclient/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java =================================================================== --- httpclient/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java (revision 505743) +++ httpclient/src/examples/org/apache/http/examples/conn/ManagerConnectProxy.java (working copy) @@ -40,7 +40,7 @@ import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpExecutionContext; @@ -208,7 +208,7 @@ // Prepare parameters. // Since this example doesn't use the full core framework, // only few parameters are actually required. - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setUseExpectContinue(params, false); defaultParameters = params; Index: httpclient/src/examples/org/apache/http/examples/conn/OperatorConnectProxy.java =================================================================== --- httpclient/src/examples/org/apache/http/examples/conn/OperatorConnectProxy.java (revision 505743) +++ httpclient/src/examples/org/apache/http/examples/conn/OperatorConnectProxy.java (working copy) @@ -40,7 +40,7 @@ import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpExecutionContext; @@ -187,7 +187,7 @@ // Prepare parameters. // Since this example doesn't use the full core framework, // only few parameters are actually required. - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setUseExpectContinue(params, false); defaultParameters = params; Index: httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java =================================================================== --- httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java (revision 505743) +++ httpclient/src/examples/org/apache/http/examples/client/ClientExecuteProxy.java (working copy) @@ -40,7 +40,7 @@ import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.BasicHttpProcessor; import org.apache.http.protocol.RequestConnControl; import org.apache.http.protocol.RequestContent; @@ -174,7 +174,7 @@ supportedSchemes.register(new Scheme("https", sf, 80)); // prepare parameters - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpClient/4.0"); Index: httpclient/src/examples/org/apache/http/examples/client/ClientExecuteDirect.java =================================================================== --- httpclient/src/examples/org/apache/http/examples/client/ClientExecuteDirect.java (revision 505743) +++ httpclient/src/examples/org/apache/http/examples/client/ClientExecuteDirect.java (working copy) @@ -40,7 +40,7 @@ import org.apache.http.message.BasicHttpRequest; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.protocol.BasicHttpProcessor; import org.apache.http.protocol.RequestConnControl; import org.apache.http.protocol.RequestContent; @@ -160,7 +160,7 @@ supportedSchemes.register(new Scheme("http", sf, 80)); // prepare parameters - HttpParams params = new DefaultHttpParams(); + HttpParams params = new BasicHttpParams(); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpClient/4.0"); Index: httpasync/src/contrib/org/apache/http/async/contrib/routing/RoutingAsyncGet.java =================================================================== --- httpasync/src/contrib/org/apache/http/async/contrib/routing/RoutingAsyncGet.java (revision 505861) +++ httpasync/src/contrib/org/apache/http/async/contrib/routing/RoutingAsyncGet.java (working copy) @@ -44,7 +44,7 @@ import org.apache.http.async.impl.SimpleHttpAsyncClientConnection; import org.apache.http.async.impl.SimpleHttpDispatcher; import org.apache.http.impl.DefaultConnectionReuseStrategy; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.HttpGet; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; @@ -223,7 +223,7 @@ */ private final static HttpDispatcher createDispatcher() { - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1"); Index: httpasync/src/examples/org/apache/http/examples/NotifiedAsyncGet.java =================================================================== --- httpasync/src/examples/org/apache/http/examples/NotifiedAsyncGet.java (revision 505861) +++ httpasync/src/examples/org/apache/http/examples/NotifiedAsyncGet.java (working copy) @@ -46,7 +46,7 @@ import org.apache.http.async.impl.SimpleHttpAsyncClientConnection; import org.apache.http.async.impl.SimpleHttpDispatcher; import org.apache.http.impl.DefaultConnectionReuseStrategy; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.HttpGet; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; @@ -250,7 +250,7 @@ */ private final static HttpDispatcher createDispatcher() { - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1"); Index: httpasync/src/examples/org/apache/http/examples/ElementalAsyncGet.java =================================================================== --- httpasync/src/examples/org/apache/http/examples/ElementalAsyncGet.java (revision 505861) +++ httpasync/src/examples/org/apache/http/examples/ElementalAsyncGet.java (working copy) @@ -43,7 +43,7 @@ import org.apache.http.async.impl.SimpleHttpAsyncClientConnection; import org.apache.http.async.impl.SimpleHttpDispatcher; import org.apache.http.impl.DefaultConnectionReuseStrategy; -import org.apache.http.impl.params.DefaultHttpParams; +import org.apache.http.params.BasicHttpParams; import org.apache.http.message.HttpGet; import org.apache.http.params.HttpParams; import org.apache.http.params.HttpProtocolParams; @@ -151,7 +151,7 @@ */ private final static HttpDispatcher createDispatcher() { - HttpParams params = new DefaultHttpParams(null); + HttpParams params = new BasicHttpParams(null); HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, "UTF-8"); HttpProtocolParams.setUserAgent(params, "Jakarta-HttpComponents/1.1");