hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r917639 - in /httpcomponents/httpclient/trunk: httpclient/src/main/java/org/apache/http/auth/ httpclient/src/main/java/org/apache/http/conn/scheme/ httpclient/src/main/java/org/apache/http/conn/ssl/ httpclient/src/main/java/org/apache/http/...
Date Mon, 01 Mar 2010 18:39:30 GMT
Author: sebb
Date: Mon Mar  1 18:39:29 2010
New Revision: 917639

URL: http://svn.apache.org/viewvc?rev=917639&view=rev
Log:
Tab police

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/DateUtils.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java
    httpcomponents/httpclient/trunk/httpclient/src/site/site.xml
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/utils/TestURLEncodedUtils.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultResponseParser.java
    httpcomponents/httpclient/trunk/httpmime/src/site/site.xml

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeFactory.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/auth/AuthSchemeFactory.java
Mon Mar  1 18:39:29 2010
@@ -34,15 +34,15 @@
  *
  * @since 4.0
  */
-public interface AuthSchemeFactory {    
+public interface AuthSchemeFactory {
 
-	/**
-	 * Creates an instance of {@link AuthScheme} using given HTTP parameters.
-	 * 
-	 * @param params HTTP parameters.
-	 * 
-	 * @return auth scheme.
-	 */
+    /**
+     * Creates an instance of {@link AuthScheme} using given HTTP parameters.
+     * 
+     * @param params HTTP parameters.
+     * 
+     * @return auth scheme.
+     */
     AuthScheme newInstance(HttpParams params);
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/scheme/HostNameResolver.java
Mon Mar  1 18:39:29 2010
@@ -37,13 +37,13 @@
  */
 public interface HostNameResolver {
 
-	/**
-	 * Resolves given hostname to its IP address
-	 * 
-	 * @param hostname the hostname.
-	 * @return IP address.
-	 * @throws IOException
-	 */
+    /**
+     * Resolves given hostname to its IP address
+     * 
+     * @param hostname the hostname.
+     * @return IP address.
+     * @throws IOException
+     */
     InetAddress resolve (String hostname) throws IOException;
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/X509HostnameVerifier.java
Mon Mar  1 18:39:29 2010
@@ -43,25 +43,25 @@
  */
 public interface X509HostnameVerifier extends HostnameVerifier {
 
-	/**
-	 * Verifies that the host name is an acceptable match with the server's 
-	 * authentication scheme based on the given {@link SSLSocket}.
-	 *   
-	 * @param host the host.
-	 * @param ssl the SSL socket.
-	 * @throws IOException if an I/O error occurs or the verification process
-	 *   fails. 
-	 */
+    /**
+     * Verifies that the host name is an acceptable match with the server's 
+     * authentication scheme based on the given {@link SSLSocket}.
+     *
+     * @param host the host.
+     * @param ssl the SSL socket.
+     * @throws IOException if an I/O error occurs or the verification process
+     *   fails. 
+     */
     void verify(String host, SSLSocket ssl) throws IOException;
 
-	/**
-	 * Verifies that the host name is an acceptable match with the server's 
-	 * authentication scheme based on the given {@link X509Certificate}.
-	 *   
-	 * @param host the host.
-	 * @param cert the certificate.
-	 * @throws SSLException if the verification process fails. 
-	 */
+    /**
+     * Verifies that the host name is an acceptable match with the server's 
+     * authentication scheme based on the given {@link X509Certificate}.
+     *
+     * @param host the host.
+     * @param cert the certificate.
+     * @throws SSLException if the verification process fails. 
+     */
     void verify(String host, X509Certificate cert) throws SSLException;
 
     /**
@@ -76,7 +76,7 @@
      * @param subjectAlts Subject-Alt fields of type 2 ("DNS"), as extracted
      *                    from the X.509 certificate.
      * @param host        The hostname to verify.
-	 * @throws SSLException if the verification process fails. 
+     * @throws SSLException if the verification process fails. 
      */
     void verify(String host, String[] cns, String[] subjectAlts)
           throws SSLException;

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/cookie/CookieSpecFactory.java
Mon Mar  1 18:39:29 2010
@@ -34,15 +34,15 @@
  *
  * @since 4.0
  */
-public interface CookieSpecFactory {    
+public interface CookieSpecFactory {
 
-	/**
-	 * Creates an instance of {@link CookieSpec} using given HTTP parameters.
-	 * 
-	 * @param params HTTP parameters.
-	 * 
-	 * @return cookie spec.
-	 */
+    /**
+     * Creates an instance of {@link CookieSpec} using given HTTP parameters.
+     * 
+     * @param params HTTP parameters.
+     * 
+     * @return cookie spec.
+     */
     CookieSpec newInstance(HttpParams params);
 
 }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultClientConnection.java
Mon Mar  1 18:39:29 2010
@@ -82,13 +82,13 @@
 
     /** Whether this connection is secure. */
     private boolean connSecure;
-    
+
     /** True if this connection was shutdown. */
     private volatile boolean shutdown;
 
     /** connection specific attributes */
     private final Map<String, Object> attributes;
-    
+
     public DefaultClientConnection() {
         super();
         this.attributes = new HashMap<String, Object>();
@@ -108,10 +108,10 @@
     }
 
     public void opening(Socket sock, HttpHost target) throws IOException {
-        assertNotOpen();        
+        assertNotOpen();
         this.socket = sock;
         this.targetHost = target;
-        
+
         // Check for shutdown after assigning socket, so that 
         if (this.shutdown) {
             sock.close(); // allow this to throw...
@@ -147,14 +147,14 @@
     public void shutdown() throws IOException {
         log.debug("Connection shut down");
         shutdown = true;
-        
-        super.shutdown();        
+
+        super.shutdown();
         Socket sock = this.socket; // copy volatile attribute
         if (sock != null)
             sock.close();
 
     }
-    
+
     @Override
     public void close() throws IOException {
         log.debug("Connection closed");
@@ -231,10 +231,10 @@
 
     @Override
     public HttpResponse receiveResponseHeader() throws HttpException, IOException {
-    	HttpResponse response = super.receiveResponseHeader();
-    	if (log.isDebugEnabled()) {
+        HttpResponse response = super.receiveResponseHeader();
+        if (log.isDebugEnabled()) {
             log.debug("Receiving response: " + response.getStatusLine());
-    	}
+        }
         if (headerLog.isDebugEnabled()) {
             headerLog.debug("<< " + response.getStatusLine().toString());
             Header[] headers = response.getAllHeaders();
@@ -247,9 +247,9 @@
 
     @Override
     public void sendRequestHeader(HttpRequest request) throws HttpException, IOException
{
-    	if (log.isDebugEnabled()) {
+        if (log.isDebugEnabled()) {
             log.debug("Sending request: " + request.getRequestLine());
-    	}
+        }
         super.sendRequestHeader(request);
         if (headerLog.isDebugEnabled()) {
             headerLog.debug(">> " + request.getRequestLine().toString());

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultResponseParser.java
Mon Mar  1 18:39:29 2010
@@ -64,7 +64,7 @@
 public class DefaultResponseParser extends AbstractMessageParser {
     
     private final Log log = LogFactory.getLog(getClass());
-	
+
     private final HttpResponseFactory responseFactory;
     private final CharArrayBuffer lineBuf;
     private final int maxGarbageLines;
@@ -110,7 +110,7 @@
                         "valid HTTP response");
             }
             if (this.log.isDebugEnabled()) {
-            	this.log.debug("Garbage in response: " + this.lineBuf.toString());
+                this.log.debug("Garbage in response: " + this.lineBuf.toString());
             }
             count++;
         } while(true);

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BestMatchSpecFactory.java
Mon Mar  1 18:39:29 2010
@@ -54,17 +54,17 @@
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-        	
-        	String[] patterns = null;
-        	Collection<?> param = (Collection<?>) params.getParameter(
-        			CookieSpecPNames.DATE_PATTERNS);
-        	if (param != null) {
-        		patterns = new String[param.size()];
-        		patterns = param.toArray(patterns);
-        	}
-        	boolean singleHeader = params.getBooleanParameter(
-        			CookieSpecPNames.SINGLE_COOKIE_HEADER, false);        	
-        	
+            
+            String[] patterns = null;
+            Collection<?> param = (Collection<?>) params.getParameter(
+                    CookieSpecPNames.DATE_PATTERNS);
+            if (param != null) {
+                patterns = new String[param.size()];
+                patterns = param.toArray(patterns);
+            }
+            boolean singleHeader = params.getBooleanParameter(
+                    CookieSpecPNames.SINGLE_COOKIE_HEADER, false);
+            
             return new BestMatchSpec(patterns, singleHeader);
         } else {
             return new BestMatchSpec();

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/BrowserCompatSpecFactory.java
Mon Mar  1 18:39:29 2010
@@ -53,14 +53,14 @@
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-        	
-        	String[] patterns = null;
-        	Collection<?> param = (Collection<?>) params.getParameter(
-        			CookieSpecPNames.DATE_PATTERNS);
-        	if (param != null) {
-        		patterns = new String[param.size()];
-        		patterns = param.toArray(patterns);
-        	}
+
+            String[] patterns = null;
+            Collection<?> param = (Collection<?>) params.getParameter(
+                    CookieSpecPNames.DATE_PATTERNS);
+            if (param != null) {
+                patterns = new String[param.size()];
+                patterns = param.toArray(patterns);
+            }
             return new BrowserCompatSpec(patterns);
         } else {
             return new BrowserCompatSpec();

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/DateUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/DateUtils.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/DateUtils.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/DateUtils.java
Mon Mar  1 18:39:29 2010
@@ -67,8 +67,8 @@
     public static final String PATTERN_ASCTIME = "EEE MMM d HH:mm:ss yyyy";
 
     private static final String[] DEFAULT_PATTERNS = new String[] {
-    	PATTERN_RFC1036,
-    	PATTERN_RFC1123,
+        PATTERN_RFC1036,
+        PATTERN_RFC1123,
         PATTERN_ASCTIME
     };
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/NetscapeDraftSpecFactory.java
Mon Mar  1 18:39:29 2010
@@ -49,18 +49,18 @@
  * @since 4.0
  */
 @Immutable
-public class NetscapeDraftSpecFactory implements CookieSpecFactory {    
+public class NetscapeDraftSpecFactory implements CookieSpecFactory {
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-        	
-        	String[] patterns = null;
-        	Collection<?> param = (Collection<?>) params.getParameter(
-        			CookieSpecPNames.DATE_PATTERNS);
-        	if (param != null) {
-        		patterns = new String[param.size()];
-        		patterns = param.toArray(patterns);
-        	}
+
+            String[] patterns = null;
+            Collection<?> param = (Collection<?>) params.getParameter(
+                    CookieSpecPNames.DATE_PATTERNS);
+            if (param != null) {
+                patterns = new String[param.size()];
+                patterns = param.toArray(patterns);
+            }
             return new NetscapeDraftSpec(patterns);
         } else {
             return new NetscapeDraftSpec();

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2109SpecFactory.java
Mon Mar  1 18:39:29 2010
@@ -50,21 +50,21 @@
  * @since 4.0
  */
 @Immutable
-public class RFC2109SpecFactory implements CookieSpecFactory {    
+public class RFC2109SpecFactory implements CookieSpecFactory {
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-        	
-        	String[] patterns = null;
-        	Collection<?> param = (Collection<?>) params.getParameter(
-        			CookieSpecPNames.DATE_PATTERNS);
-        	if (param != null) {
-        		patterns = new String[param.size()];
-        		patterns = param.toArray(patterns);
-        	}
-        	boolean singleHeader = params.getBooleanParameter(
-        			CookieSpecPNames.SINGLE_COOKIE_HEADER, false);        	
-        	
+
+            String[] patterns = null;
+            Collection<?> param = (Collection<?>) params.getParameter(
+                    CookieSpecPNames.DATE_PATTERNS);
+            if (param != null) {
+                patterns = new String[param.size()];
+                patterns = param.toArray(patterns);
+            }
+            boolean singleHeader = params.getBooleanParameter(
+                    CookieSpecPNames.SINGLE_COOKIE_HEADER, false);
+
             return new RFC2109Spec(patterns, singleHeader);
         } else {
             return new RFC2109Spec();

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/cookie/RFC2965SpecFactory.java
Mon Mar  1 18:39:29 2010
@@ -50,21 +50,21 @@
  * @since 4.0
  */
 @Immutable
-public class RFC2965SpecFactory implements CookieSpecFactory {    
+public class RFC2965SpecFactory implements CookieSpecFactory {
 
     public CookieSpec newInstance(final HttpParams params) {
         if (params != null) {
-        	
-        	String[] patterns = null;
-        	Collection<?> param = (Collection<?>) params.getParameter(
-        			CookieSpecPNames.DATE_PATTERNS);
-        	if (param != null) {
-        		patterns = new String[param.size()];
-        		patterns = param.toArray(patterns);
-        	}
-        	boolean singleHeader = params.getBooleanParameter(
-        			CookieSpecPNames.SINGLE_COOKIE_HEADER, false);        	
-        	
+
+            String[] patterns = null;
+            Collection<?> param = (Collection<?>) params.getParameter(
+                    CookieSpecPNames.DATE_PATTERNS);
+            if (param != null) {
+                patterns = new String[param.size()];
+                patterns = param.toArray(patterns);
+            }
+            boolean singleHeader = params.getBooleanParameter(
+                    CookieSpecPNames.SINGLE_COOKIE_HEADER, false);
+
             return new RFC2965Spec(patterns, singleHeader);
         } else {
             return new RFC2965Spec();

Modified: httpcomponents/httpclient/trunk/httpclient/src/site/site.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/site/site.xml?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/site/site.xml (original)
+++ httpcomponents/httpclient/trunk/httpclient/src/site/site.xml Mon Mar  1 18:39:29 2010
@@ -47,7 +47,7 @@
       <item name="Download" href="../download.html"/>
       <item name="Examples" href="../examples.html"/>
     </menu>
-		<menu ref="modules" />
-		<menu ref="reports"/>      
+    <menu ref="modules" />
+    <menu ref="reports"/>      
   </body>
 </project>

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/utils/TestURLEncodedUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/utils/TestURLEncodedUtils.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/utils/TestURLEncodedUtils.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/utils/TestURLEncodedUtils.java
Mon Mar  1 18:39:29 2010
@@ -41,7 +41,7 @@
 import org.apache.http.protocol.HTTP;
 
 public class TestURLEncodedUtils extends TestCase {
-  
+
     public TestURLEncodedUtils(final String testName) {
         super(testName);
     }
@@ -54,7 +54,7 @@
     public static Test suite() {
         return new TestSuite(TestURLEncodedUtils.class);
     }
-    
+
     public void testParseURI () throws Exception {
         List <NameValuePair> result;
 
@@ -116,12 +116,12 @@
     static final int SWISS_GERMAN_HELLO [] = {
         0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4
     };
-        
+
     static final int RUSSIAN_HELLO [] = {
         0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438, 
         0x432, 0x435, 0x442 
     }; 
-    
+
     private static String constructString(int [] unicodeChars) {
         StringBuffer buffer = new StringBuffer();
         if (unicodeChars != null) {
@@ -138,12 +138,12 @@
         List <NameValuePair> parameters = new ArrayList<NameValuePair>();
         parameters.add(new BasicNameValuePair("russian", ru_hello));
         parameters.add(new BasicNameValuePair("swiss", ch_hello));
-        
+
         String s = URLEncodedUtils.format(parameters, HTTP.UTF_8);
-        
+
         assertEquals("russian=%D0%92%D1%81%D0%B5%D0%BC_%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82"
+
-        		"&swiss=Gr%C3%BCezi_z%C3%A4m%C3%A4", s);
-        
+                "&swiss=Gr%C3%BCezi_z%C3%A4m%C3%A4", s);
+
         StringEntity entity = new StringEntity(s, HTTP.UTF_8);
         entity.setContentType(URLEncodedUtils.CONTENT_TYPE + HTTP.CHARSET_PARAM + HTTP.UTF_8);
         List <NameValuePair> result = URLEncodedUtils.parse(entity);

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultResponseParser.java?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultResponseParser.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/conn/TestDefaultResponseParser.java
Mon Mar  1 18:39:29 2010
@@ -62,98 +62,98 @@
     public static Test suite() {
         return new TestSuite(TestDefaultResponseParser.class);
     }
-    
+
     public void testResponseParsingWithSomeGarbage() throws Exception {
-    	String s = 
-    		"garbage\r\n" + 
-    		"garbage\r\n" + 
-    		"more garbage\r\n" + 
-    		"HTTP/1.1 200 OK\r\n" + 
-    		"header1: value1\r\n" + 
-    		"header2: value2\r\n" + 
-    		"\r\n"; 
-    	
-    	HttpParams params = new BasicHttpParams();
-    	SessionInputBuffer inbuffer = new SessionInputBufferMockup(s, "US-ASCII", params); 
-    	HttpMessageParser parser = new DefaultResponseParser(
-    			inbuffer, 
-    			BasicLineParser.DEFAULT,
-    			new DefaultHttpResponseFactory(),
-    			params);
-    	
-    	HttpResponse response = (HttpResponse) parser.parse();
-    	assertNotNull(response);
-    	assertEquals(HttpVersion.HTTP_1_1, response.getProtocolVersion());
-    	assertEquals(200, response.getStatusLine().getStatusCode());
-    	
-    	Header[] headers = response.getAllHeaders();
-    	assertNotNull(headers);
-    	assertEquals(2, headers.length);
-    	assertEquals("header1", headers[0].getName());
-    	assertEquals("header2", headers[1].getName());
+        String s = 
+            "garbage\r\n" + 
+            "garbage\r\n" + 
+            "more garbage\r\n" + 
+            "HTTP/1.1 200 OK\r\n" + 
+            "header1: value1\r\n" + 
+            "header2: value2\r\n" + 
+            "\r\n"; 
+
+        HttpParams params = new BasicHttpParams();
+        SessionInputBuffer inbuffer = new SessionInputBufferMockup(s, "US-ASCII", params);

+        HttpMessageParser parser = new DefaultResponseParser(
+                inbuffer, 
+                BasicLineParser.DEFAULT,
+                new DefaultHttpResponseFactory(),
+                params);
+
+        HttpResponse response = (HttpResponse) parser.parse();
+        assertNotNull(response);
+        assertEquals(HttpVersion.HTTP_1_1, response.getProtocolVersion());
+        assertEquals(200, response.getStatusLine().getStatusCode());
+
+        Header[] headers = response.getAllHeaders();
+        assertNotNull(headers);
+        assertEquals(2, headers.length);
+        assertEquals("header1", headers[0].getName());
+        assertEquals("header2", headers[1].getName());
     }
 
     public void testResponseParsingWithTooMuchGarbage() throws Exception {
-    	String s = 
-    		"garbage\r\n" + 
-    		"garbage\r\n" + 
-    		"more garbage\r\n" + 
-    		"HTTP/1.1 200 OK\r\n" + 
-    		"header1: value1\r\n" + 
-    		"header2: value2\r\n" + 
-    		"\r\n"; 
-    	
-    	HttpParams params = new BasicHttpParams();
-    	params.setParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, Integer.valueOf(2));
-    	SessionInputBuffer inbuffer = new SessionInputBufferMockup(s, "US-ASCII", params); 
-    	HttpMessageParser parser = new DefaultResponseParser(
-    			inbuffer, 
-    			BasicLineParser.DEFAULT,
-    			new DefaultHttpResponseFactory(),
-    			params);
-    	
-    	try {
-        	parser.parse();
-        	fail("ProtocolException should have been thrown");
-    	} catch (ProtocolException ex) {
-    	}
+        String s = 
+            "garbage\r\n" + 
+            "garbage\r\n" + 
+            "more garbage\r\n" + 
+            "HTTP/1.1 200 OK\r\n" + 
+            "header1: value1\r\n" + 
+            "header2: value2\r\n" + 
+            "\r\n"; 
+
+        HttpParams params = new BasicHttpParams();
+        params.setParameter(ConnConnectionPNames.MAX_STATUS_LINE_GARBAGE, Integer.valueOf(2));
+        SessionInputBuffer inbuffer = new SessionInputBufferMockup(s, "US-ASCII", params);

+        HttpMessageParser parser = new DefaultResponseParser(
+                inbuffer, 
+                BasicLineParser.DEFAULT,
+                new DefaultHttpResponseFactory(),
+                params);
+
+        try {
+            parser.parse();
+            fail("ProtocolException should have been thrown");
+        } catch (ProtocolException ex) {
+        }
     }
 
     public void testResponseParsingNoResponse() throws Exception {
-    	HttpParams params = new BasicHttpParams();
-    	SessionInputBuffer inbuffer = new SessionInputBufferMockup("", "US-ASCII", params);

-    	HttpMessageParser parser = new DefaultResponseParser(
-    			inbuffer, 
-    			BasicLineParser.DEFAULT,
-    			new DefaultHttpResponseFactory(),
-    			params);
-    	
-    	try {
-        	parser.parse();
-        	fail("NoHttpResponseException should have been thrown");
-    	} catch (NoHttpResponseException ex) {
-    	}
+        HttpParams params = new BasicHttpParams();
+        SessionInputBuffer inbuffer = new SessionInputBufferMockup("", "US-ASCII", params);

+        HttpMessageParser parser = new DefaultResponseParser(
+                inbuffer, 
+                BasicLineParser.DEFAULT,
+                new DefaultHttpResponseFactory(),
+                params);
+
+        try {
+            parser.parse();
+            fail("NoHttpResponseException should have been thrown");
+        } catch (NoHttpResponseException ex) {
+        }
     }
-    
+
     public void testResponseParsingOnlyGarbage() throws Exception {
-    	String s = 
-    		"garbage\r\n" + 
-    		"garbage\r\n" + 
-    		"more garbage\r\n" + 
-    		"a lot more garbage\r\n";
-    	HttpParams params = new BasicHttpParams();
-    	SessionInputBuffer inbuffer = new SessionInputBufferMockup(s, "US-ASCII", params); 
-    	HttpMessageParser parser = new DefaultResponseParser(
-    			inbuffer, 
-    			BasicLineParser.DEFAULT,
-    			new DefaultHttpResponseFactory(),
-    			params);
-    	
-    	try {
-        	parser.parse();
-        	fail("ProtocolException should have been thrown");
-    	} catch (ProtocolException ex) {
-    	}
+        String s = 
+            "garbage\r\n" + 
+            "garbage\r\n" + 
+            "more garbage\r\n" + 
+            "a lot more garbage\r\n";
+        HttpParams params = new BasicHttpParams();
+        SessionInputBuffer inbuffer = new SessionInputBufferMockup(s, "US-ASCII", params);

+        HttpMessageParser parser = new DefaultResponseParser(
+                inbuffer, 
+                BasicLineParser.DEFAULT,
+                new DefaultHttpResponseFactory(),
+                params);
+
+        try {
+            parser.parse();
+            fail("ProtocolException should have been thrown");
+        } catch (ProtocolException ex) {
+        }
     }
-    
+
 }

Modified: httpcomponents/httpclient/trunk/httpmime/src/site/site.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/site/site.xml?rev=917639&r1=917638&r2=917639&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/site/site.xml (original)
+++ httpcomponents/httpclient/trunk/httpmime/src/site/site.xml Mon Mar  1 18:39:29 2010
@@ -47,7 +47,7 @@
       <item name="Download" href="../download.html"/>
       <item name="Examples" href="../examples.html"/>
     </menu>
-		<menu ref="modules" />
-		<menu ref="reports"/>      
+    <menu ref="modules" />
+    <menu ref="reports"/>      
   </body>
 </project>



Mime
View raw message