Index: /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/HttpHost.java
===================================================================
--- /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/HttpHost.java	(revision 449757)
+++ /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/HttpHost.java	(working copy)
@@ -45,6 +45,8 @@
  */
 public class HttpHost {
 
+    public static final String DEFAULT_SCHEME_NAME = "http";
+    
     /** The host to use. */
     private String hostname = null;
 
@@ -52,7 +54,7 @@
     private int port = -1;
 
     /** The scheme */
-    private Scheme scheme = null;
+    private String schemeName = null;
 
     /**
      * Constructor for HttpHost.
@@ -59,9 +61,10 @@
      *   
      * @param hostname the hostname (IP or DNS name). Can be <code>null</code>.
      * @param port the port. Value <code>-1</code> can be used to set default scheme port
-     * @param scheme the scheme. Value <code>null</code> can be used to set default scheme
+     * @param schemeName the name of the scheme. Value <code>null</code> can be used to set 
+     *        default scheme
      */
-    public HttpHost(final String hostname, int port, final Scheme scheme) {
+    public HttpHost(final String hostname, int port, final String schemeName) {
         super();
         if (hostname == null) {
             throw new IllegalArgumentException("Host name may not be null");
@@ -66,16 +69,13 @@
         if (hostname == null) {
             throw new IllegalArgumentException("Host name may not be null");
         }
-        if (scheme == null) {
-            throw new IllegalArgumentException("Protocol may not be null");
-        }
         this.hostname = hostname;
-        this.scheme = scheme;
-        if (port >= 0) {
-            this.port = port;
+        if (schemeName != null) {
+            this.schemeName = schemeName.toLowerCase();
         } else {
-            this.port = this.scheme.getDefaultPort();
+            this.schemeName = DEFAULT_SCHEME_NAME;
         }
+        this.port = port;
     }
 
     /**
@@ -85,7 +85,7 @@
      * @param port the port. Value <code>-1</code> can be used to set default scheme port
      */
     public HttpHost(final String hostname, int port) {
-        this(hostname, port, Scheme.getScheme("http"));
+        this(hostname, port, null);
     }
     
     /**
@@ -94,7 +94,7 @@
      * @param hostname the hostname (IP or DNS name). Can be <code>null</code>.
      */
     public HttpHost(final String hostname) {
-        this(hostname, -1, Scheme.getScheme("http"));
+        this(hostname, -1, null);
     }
     
     /**
@@ -106,7 +106,7 @@
         super();
         this.hostname = httphost.hostname;
         this.port = httphost.port;
-        this.scheme = httphost.scheme;
+        this.schemeName = httphost.schemeName;
     }
 
     /**
@@ -131,8 +131,8 @@
      * Returns the scheme.
      * @return The scheme.
      */
-    public Scheme getScheme() {
-        return this.scheme;
+    public String getSchemeName() {
+        return this.schemeName;
     }
 
     /**
@@ -142,10 +142,10 @@
      */
     public String toURI() {
     	CharArrayBuffer buffer = new CharArrayBuffer(32);        
-        buffer.append(this.scheme.getName());
+        buffer.append(this.schemeName);
         buffer.append("://");
         buffer.append(this.hostname);
-        if (this.port != this.scheme.getDefaultPort()) {
+        if (this.port != -1) {
             buffer.append(':');
             buffer.append(Integer.toString(this.port));
         }
@@ -155,7 +155,7 @@
     public String toHostString() {
     	CharArrayBuffer buffer = new CharArrayBuffer(32);        
         buffer.append(this.hostname);
-        if (this.port != this.scheme.getDefaultPort()) {
+        if (this.port != -1) {
             buffer.append(':');
             buffer.append(Integer.toString(this.port));
         }
@@ -179,7 +179,7 @@
             HttpHost that = (HttpHost) obj;
             return this.hostname.equalsIgnoreCase(that.hostname) 
                 && this.port == that.port
-                && this.scheme.equals(that.scheme);
+                && this.schemeName.equals(that.schemeName);
         } else {
             return false;
         }
@@ -192,7 +192,7 @@
         int hash = LangUtils.HASH_SEED;
         hash = LangUtils.hashCode(hash, this.hostname.toUpperCase());
         hash = LangUtils.hashCode(hash, this.port);
-        hash = LangUtils.hashCode(hash, this.scheme);
+        hash = LangUtils.hashCode(hash, this.schemeName);
         return hash;
     }
 
Index: /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/ProxyHost.java
===================================================================
--- /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/ProxyHost.java	(revision 449757)
+++ /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/ProxyHost.java	(working copy)
@@ -1,73 +0,0 @@
-/*
- * $HeadURL$
- * $Revision$
- * $Date$
- *
- * ====================================================================
- *
- *  Copyright 2002-2004 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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;
-
-/**
- * Holds all of the variables needed to describe an HTTP connection to a proxy. Proxy hosts
- * always use plain HTTP connection when communicating with clients.
- * 
- * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a>
- * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
- * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>
- * @author Laura Werner
- * 
- * @since 3.0 
- */
-public class ProxyHost extends HttpHost {
-
-    /**
-     * Copy constructor for ProxyHost.
-     * 
-     * @param httpproxy the HTTP host to copy details from
-     */
-    public ProxyHost (final ProxyHost httpproxy) {
-        super(httpproxy);
-    }
-
-    /**
-     * Constructor for ProxyHost.
-     *   
-     * @param hostname the hostname (IP or DNS name). Can be <code>null</code>.
-     * @param port the port. Value <code>-1</code> can be used to set default scheme port
-     */
-    public ProxyHost(final String hostname, int port) {
-        super(hostname, port, Scheme.getScheme("http"));
-    }
-    
-    /**
-     * Constructor for ProxyHost.
-     *   
-     * @param hostname the hostname (IP or DNS name). Can be <code>null</code>.
-     */
-    public ProxyHost(final String hostname) {
-        this(hostname, -1);
-    }
-    
-}
Index: /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/params/HttpProtocolParams.java
===================================================================
--- /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/params/HttpProtocolParams.java	(revision 449757)
+++ /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/params/HttpProtocolParams.java	(working copy)
@@ -105,14 +105,6 @@
     public static final String STATUS_LINE_GARBAGE_LIMIT = "http.protocol.status-line-garbage-limit";
 
     /**
-     * Defines the virtual host name.
-     * <p>
-     * This parameter expects a value of type {@link java.lang.String}. 
-     * </p>
-     */
-    public static final String VIRTUAL_HOST = "http.virtual-host"; 
-
-    /**
      * Defines whether responses with an invalid <tt>Transfer-Encoding</tt> header should be 
      * rejected.
      * <p>
@@ -237,30 +229,6 @@
         params.setParameter(PROTOCOL_VERSION, version);
     }
 
-    /**
-     * Sets the virtual host name.
-     * 
-     * @param hostname The host name
-     */
-    public static void setVirtualHost(final HttpParams params, final String hostname) {
-        if (params == null) {
-            throw new IllegalArgumentException("HTTP parameters may not be null");
-        }
-        params.setParameter(VIRTUAL_HOST, hostname);
-    }
-
-    /**
-     * Returns the virtual host name.
-     * 
-     * @return The virtual host name
-     */
-    public static String getVirtualHost(final HttpParams params) {
-        if (params == null) {
-            throw new IllegalArgumentException("HTTP parameters may not be null");
-        }
-        return (String) params.getParameter(VIRTUAL_HOST);
-    }
-    
     public static String getUserAgent(final HttpParams params) { 
         if (params == null) {
             throw new IllegalArgumentException("HTTP parameters may not be null");
Index: /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/protocol/RequestTargetHost.java
===================================================================
--- /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/protocol/RequestTargetHost.java	(revision 449757)
+++ /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/main/java/org/apache/http/protocol/RequestTargetHost.java	(working copy)
@@ -37,7 +37,6 @@
 import org.apache.http.HttpRequestInterceptor;
 import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolException;
-import org.apache.http.params.HttpProtocolParams;
 
 /**
  * A request interceptor that sets the Host header for HTTP/1.1 requests.
@@ -73,11 +72,6 @@
                     throw new ProtocolException("Target host missing");
                 }
             }
-            String virtualhost = HttpProtocolParams.getVirtualHost(request.getParams());
-            if (virtualhost != null) {
-                targethost = new HttpHost(virtualhost, 
-                        targethost.getPort(), targethost.getScheme());
-            }
             request.addHeader(HTTP.TARGET_HOST, targethost.toHostString());
         }
     }
Index: /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/test/java/org/apache/http/TestHttpHost.java
===================================================================
--- /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/test/java/org/apache/http/TestHttpHost.java	(revision 449757)
+++ /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/test/java/org/apache/http/TestHttpHost.java	(working copy)
@@ -29,9 +29,6 @@
 
 package org.apache.http;
 
-import org.apache.http.impl.io.PlainSocketFactory;
-import org.apache.http.io.SocketFactory;
-
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
@@ -56,31 +53,23 @@
         return new TestSuite(TestHttpHost.class);
     }
 
-    protected void setUp() throws Exception {
-        super.setUp();
-        SocketFactory socketfactory = PlainSocketFactory.getSocketFactory();
-        final Scheme http = new Scheme("http", socketfactory, 80);
-        Scheme.registerScheme("http", http);
-    }
-    
     public void testConstructor() {
-        Scheme http = Scheme.getScheme("http");
         HttpHost host1 = new HttpHost("somehost");
         assertEquals("somehost", host1.getHostName()); 
-        assertEquals(http.getDefaultPort(), host1.getPort()); 
-        assertEquals(http, host1.getScheme()); 
+        assertEquals(-1, host1.getPort()); 
+        assertEquals("http", host1.getSchemeName()); 
         HttpHost host2 = new HttpHost("somehost", 8080);
         assertEquals("somehost", host2.getHostName()); 
         assertEquals(8080, host2.getPort()); 
-        assertEquals(http, host2.getScheme()); 
+        assertEquals("http", host2.getSchemeName()); 
         HttpHost host3 = new HttpHost("somehost", -1);
         assertEquals("somehost", host3.getHostName()); 
-        assertEquals(http.getDefaultPort(), host3.getPort()); 
-        assertEquals(http, host3.getScheme()); 
-        HttpHost host4 = new HttpHost("somehost", 8080, http);
+        assertEquals(-1, host3.getPort()); 
+        assertEquals("http", host3.getSchemeName()); 
+        HttpHost host4 = new HttpHost("somehost", 443, "https");
         assertEquals("somehost", host4.getHostName()); 
-        assertEquals(8080, host4.getPort()); 
-        assertEquals(http, host4.getScheme()); 
+        assertEquals(443, host4.getPort()); 
+        assertEquals("https", host4.getSchemeName()); 
         try {
             new HttpHost(null, -1, null);
             fail("IllegalArgumentException should have been thrown");
@@ -87,38 +76,15 @@
         } catch (IllegalArgumentException ex) {
             //expected
         }
-        try {
-            new HttpHost("somehost", -1, null);
-            fail("IllegalArgumentException should have been thrown");
-        } catch (IllegalArgumentException ex) {
-            //expected
-        }
-        ProxyHost proxyhost1 = new ProxyHost("somehost");
-        assertEquals("somehost", proxyhost1.getHostName()); 
-        assertEquals(http.getDefaultPort(), proxyhost1.getPort()); 
-        assertEquals(http, proxyhost1.getScheme()); 
-
-        ProxyHost proxyhost2 = new ProxyHost("somehost", 8080);
-        assertEquals("somehost", proxyhost2.getHostName()); 
-        assertEquals(8080, proxyhost2.getPort()); 
-        assertEquals(http, proxyhost2.getScheme()); 
-
-        ProxyHost proxyhost3 = new ProxyHost(proxyhost2);
-        assertEquals("somehost", proxyhost3.getHostName()); 
-        assertEquals(8080, proxyhost3.getPort()); 
-        assertEquals(http, proxyhost3.getScheme()); 
     }
     
     public void testHashCode() {
-        Scheme http = Scheme.getScheme("http");
-        Scheme myhttp = new Scheme("myhttp", 
-                PlainSocketFactory.getSocketFactory(), 8080);
-        HttpHost host1 = new HttpHost("somehost", 8080, http);
-        HttpHost host2 = new HttpHost("somehost", 80, http);
-        HttpHost host3 = new HttpHost("someotherhost", 8080, http);
-        HttpHost host4 = new HttpHost("somehost", 80, http);
-        HttpHost host5 = new HttpHost("SomeHost", 80, http);
-        HttpHost host6 = new HttpHost("SomeHost", 80, myhttp);
+        HttpHost host1 = new HttpHost("somehost", 8080, "http");
+        HttpHost host2 = new HttpHost("somehost", 80, "http");
+        HttpHost host3 = new HttpHost("someotherhost", 8080, "http");
+        HttpHost host4 = new HttpHost("somehost", 80, "http");
+        HttpHost host5 = new HttpHost("SomeHost", 80, "http");
+        HttpHost host6 = new HttpHost("SomeHost", 80, "myhttp");
 
         assertTrue(host1.hashCode() == host1.hashCode());
         assertTrue(host1.hashCode() != host2.hashCode());
@@ -129,15 +95,12 @@
     }
     
     public void testEquals() {
-        Scheme http = Scheme.getScheme("http");
-        Scheme myhttp = new Scheme("myhttp", 
-        		PlainSocketFactory.getSocketFactory(), 8080);
-        HttpHost host1 = new HttpHost("somehost", 8080, http);
-        HttpHost host2 = new HttpHost("somehost", 80, http);
-        HttpHost host3 = new HttpHost("someotherhost", 8080, http);
-        HttpHost host4 = new HttpHost("somehost", 80, http);
-        HttpHost host5 = new HttpHost("SomeHost", 80, http);
-        HttpHost host6 = new HttpHost("SomeHost", 80, myhttp);
+        HttpHost host1 = new HttpHost("somehost", 8080, "http");
+        HttpHost host2 = new HttpHost("somehost", 80, "http");
+        HttpHost host3 = new HttpHost("someotherhost", 8080, "http");
+        HttpHost host4 = new HttpHost("somehost", 80, "http");
+        HttpHost host5 = new HttpHost("SomeHost", 80, "http");
+        HttpHost host6 = new HttpHost("SomeHost", 80, "myhttp");
 
         assertTrue(host1.equals(host1));
         assertFalse(host1.equals(host2));
@@ -150,12 +113,9 @@
     }
     
     public void testToString() {
-        Scheme http = Scheme.getScheme("http");
-        Scheme myhttp = new Scheme("myhttp", 
-        		PlainSocketFactory.getSocketFactory(), 8080);
         HttpHost host1 = new HttpHost("somehost");
         assertEquals("http://somehost", host1.toString());
-        HttpHost host2 = new HttpHost("somehost", http.getDefaultPort());
+        HttpHost host2 = new HttpHost("somehost", -1);
         assertEquals("http://somehost", host2.toString());
         HttpHost host3 = new HttpHost("somehost", -1);
         assertEquals("http://somehost", host3.toString());
@@ -161,9 +121,9 @@
         assertEquals("http://somehost", host3.toString());
         HttpHost host4 = new HttpHost("somehost", 8888);
         assertEquals("http://somehost:8888", host4.toString());
-        HttpHost host5 = new HttpHost("somehost", -1, myhttp);
+        HttpHost host5 = new HttpHost("somehost", -1, "myhttp");
         assertEquals("myhttp://somehost", host5.toString());
-        HttpHost host6 = new HttpHost("somehost", 80, myhttp);
+        HttpHost host6 = new HttpHost("somehost", 80, "myhttp");
         assertEquals("myhttp://somehost:80", host6.toString());
     }
 
@@ -168,10 +128,9 @@
     }
 
     public void testToHostString() {
-        Scheme http = Scheme.getScheme("http");
         HttpHost host1 = new HttpHost("somehost");
         assertEquals("somehost", host1.toHostString());
-        HttpHost host2 = new HttpHost("somehost", http.getDefaultPort());
+        HttpHost host2 = new HttpHost("somehost");
         assertEquals("somehost", host2.toHostString());
         HttpHost host3 = new HttpHost("somehost", -1);
         assertEquals("somehost", host3.toHostString());
Index: /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
===================================================================
--- /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java	(revision 449757)
+++ /home/oleg/src/apache.org/jakarta/httpcomponents/httpcore/module-main/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java	(working copy)
@@ -39,10 +39,8 @@
 import org.apache.http.HttpStatus;
 import org.apache.http.HttpVersion;
 import org.apache.http.ProtocolException;
-import org.apache.http.Scheme;
 import org.apache.http.entity.BasicHttpEntity;
 import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.io.PlainSocketFactory;
 import org.apache.http.message.BasicHeader;
 import org.apache.http.message.BasicHttpEntityEnclosingRequest;
 import org.apache.http.message.BasicHttpRequest;
@@ -339,8 +337,7 @@
 
     public void testRequestTargetHostGenerated() throws Exception {
         HttpContext context = new HttpExecutionContext(null);
-        Scheme http = new Scheme("http", PlainSocketFactory.getSocketFactory(), 80);
-        HttpHost host = new HttpHost("somehost", 8080, http);
+        HttpHost host = new HttpHost("somehost", 8080, "http");
         context.setAttribute(HttpExecutionContext.HTTP_TARGET_HOST, host);
         BasicHttpRequest request = new BasicHttpRequest("GET", "/");
         RequestTargetHost interceptor = new RequestTargetHost();
@@ -352,8 +349,7 @@
 
     public void testRequestTargetHostNotGenerated() throws Exception {
         HttpContext context = new HttpExecutionContext(null);
-        Scheme http = new Scheme("http", PlainSocketFactory.getSocketFactory(), 80);
-        HttpHost host = new HttpHost("somehost", 8080, http);
+        HttpHost host = new HttpHost("somehost", 8080, "http");
         context.setAttribute(HttpExecutionContext.HTTP_TARGET_HOST, host);
         BasicHttpRequest request = new BasicHttpRequest("GET", "/");
         request.addHeader(new BasicHeader(HTTP.TARGET_HOST, "whatever"));
@@ -386,20 +382,6 @@
         }
     }
 
-    public void testRequestTargetHostVirtualHost() throws Exception {
-        HttpContext context = new HttpExecutionContext(null);
-        Scheme http = new Scheme("http", PlainSocketFactory.getSocketFactory(), 80);
-        HttpHost host = new HttpHost("somehost", 8080, http);
-        context.setAttribute(HttpExecutionContext.HTTP_TARGET_HOST, host);
-        BasicHttpRequest request = new BasicHttpRequest("GET", "/");
-        request.getParams().setParameter(HttpProtocolParams.VIRTUAL_HOST, "whatever");
-        RequestTargetHost interceptor = new RequestTargetHost();
-        interceptor.process(request, context);
-        Header header = request.getFirstHeader(HTTP.TARGET_HOST);
-        assertNotNull(header);
-        assertEquals("whatever:8080", header.getValue());
-    }
-
     public void testRequestTargetHostInvalidInput() throws Exception {
         RequestTargetHost interceptor = new RequestTargetHost();
         try {
