svn commit: r539441 - in /jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/HttpMethodBase.java

2007-05-18 Thread oglueck
Author: oglueck
Date: Fri May 18 05:56:55 2007
New Revision: 539441

URL: http://svn.apache.org/viewvc?view=revrev=539441
Log:
Improved API Doc regarding response buffering.
PR: HTTPCLIENT-651
Contributed by: Ortwin Glück

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diffrev=539441r1=539440r2=539441
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Fri May 18 
05:56:55 2007
@@ -1,5 +1,8 @@
 Changes since 3.1 RC 1
 
+* [HTTPCLIENT-651] - Improved API Doc regarding response buffering.
+   Contributed by Ortwin Glück oglueck at apache.org
+
 * [HTTPCLIENT-645] - Cookie#compare() changed to do a simple case-sensitive 
string comparison 
when comparing path attributes instead of using a static instance 
of RuleBasedCollator
Contributed by Oleg Kalnichevski olegk at apache.org

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java?view=diffrev=539441r1=539440r2=539441
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
 Fri May 18 05:56:55 2007
@@ -655,7 +655,9 @@
 
 /**
  * Returns the response body of the HTTP method, if any, as an array of 
bytes.
- * If response body is not available or cannot be read, returns 
ttnull/tt
+ * If response body is not available or cannot be read, returns 
ttnull/tt.
+ * Buffers the response and this method can be called several times 
yielding
+ * the same result each time.
  * 
  * Note: This will cause the entire response body to be buffered in 
memory. A
  * malicious server may easily exhaust all the VM memory. It is strongly
@@ -698,7 +700,9 @@
 
 /**
  * Returns the response body of the HTTP method, if any, as an array of 
bytes.
- * If response body is not available or cannot be read, returns 
ttnull/tt
+ * If response body is not available or cannot be read, returns 
ttnull/tt.
+ * Buffers the response and this method can be called several times 
yielding
+ * the same result each time.
  * 
  * Note: This will cause the entire response body to be buffered in 
memory. This method is
  * safe if the content length of the response is unknown, because the 
amount of memory used
@@ -755,7 +759,9 @@
 
 /**
  * Returns the response body of the HTTP method, if any, as an [EMAIL 
PROTECTED] InputStream}. 
- * If response body is not available, returns ttnull/tt
+ * If response body is not available, returns ttnull/tt. If the 
response has been
+ * buffered this method returns a new stream object on every call. If the 
response
+ * has not been buffered the returned stream can only be read once.
  * 
  * @return The response body or codenull/code.
  * 
@@ -778,7 +784,8 @@
  * Returns the response body of the HTTP method, if any, as a [EMAIL 
PROTECTED] String}. 
  * If response body is not available or cannot be read, returns 
ttnull/tt
  * The string conversion on the data is done using the character encoding 
specified
- * in ttContent-Type/tt header.
+ * in ttContent-Type/tt header. Buffers the response and this method 
can be 
+ * called several times yielding the same result each time.
  * 
  * Note: This will cause the entire response body to be buffered in 
memory. A
  * malicious server may easily exhaust all the VM memory. It is strongly
@@ -806,7 +813,8 @@
  * Returns the response body of the HTTP method, if any, as a [EMAIL 
PROTECTED] String}. 
  * If response body is not available or cannot be read, returns 
ttnull/tt
  * The string conversion on the data is done using the character encoding 
specified
- * in ttContent-Type/tt header.p
+ * in ttContent-Type/tt header. Buffers the response and this method 
can be 
+ * called several times yielding the same result each time./p
  * 
  * Note: This will cause the entire response body to be buffered in 
memory. This method is
  * safe if the content length of the response is unknown, because the 
amount of memory used



-
To unsubscribe, e-mail: [EMAIL PROTECTED

svn commit: r514390 - in /jakarta/commons/proper/httpclient/trunk: ./ src/contrib/org/apache/commons/httpclient/contrib/ssl/ src/test/org/apache/commons/httpclient/ssl/

2007-03-04 Thread oglueck
Author: oglueck
Date: Sun Mar  4 04:37:15 2007
New Revision: 514390

URL: http://svn.apache.org/viewvc?view=revrev=514390
Log:
Fixed resource leaks
PR: HTTPCLIENT-641
Contributed by Hanson Char
Reviewed by Ortwin Glück

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLProtocolSocketFactory.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/ssl/SimpleSSLSocketFactory.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/ssl/SimpleSSLTestProtocolSocketFactory.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diffrev=514390r1=514389r2=514390
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Sun Mar  4 
04:37:15 2007
@@ -1,4 +1,7 @@
 Changes since Release 3.1 Beta 1:
+* [HTTPCLIENT-641] - Resource Leakage when loading keystore in 
AuthSSLProtocolSocketFactory.
+   Contributed by Hanson Char
+
 * [HTTPCLIENT-634] - Default host config can override scheme of absolute URL.
Contributed by John Kristian
 

Modified: 
jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLProtocolSocketFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLProtocolSocketFactory.java?view=diffrev=514390r1=514389r2=514390
==
--- 
jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLProtocolSocketFactory.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/contrib/org/apache/commons/httpclient/contrib/ssl/AuthSSLProtocolSocketFactory.java
 Sun Mar  4 04:37:15 2007
@@ -31,6 +31,7 @@
 package org.apache.commons.httpclient.contrib.ssl;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.Socket;
@@ -215,7 +216,13 @@
 }
 LOG.debug(Initializing key store);
 KeyStore keystore  = KeyStore.getInstance(jks);
-keystore.load(url.openStream(), password != null ? 
password.toCharArray(): null);
+InputStream is = null;
+try {
+   is = url.openStream(); 
+keystore.load(is, password != null ? password.toCharArray(): null);
+} finally {
+   if (is != null) is.close();
+}
 return keystore;
 }
 

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/ssl/SimpleSSLSocketFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/ssl/SimpleSSLSocketFactory.java?view=diffrev=514390r1=514389r2=514390
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/ssl/SimpleSSLSocketFactory.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/ssl/SimpleSSLSocketFactory.java
 Sun Mar  4 04:37:15 2007
@@ -31,6 +31,7 @@
 package org.apache.commons.httpclient.ssl;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.ServerSocket;
 import java.net.URL;
 import java.security.KeyStore;
@@ -61,7 +62,13 @@
 ClassLoader cl = SimpleSocketFactory.class.getClassLoader();
 URL url = 
cl.getResource(org/apache/commons/httpclient/ssl/simpleserver.keystore);
 KeyStore keystore  = KeyStore.getInstance(jks);
-keystore.load(url.openStream(), nopassword.toCharArray());
+InputStream is = null;
+try {
+   is = url.openStream();
+   keystore.load(is, nopassword.toCharArray());
+} finally {
+   if (is != null) is.close();
+}
 KeyManagerFactory kmfactory = KeyManagerFactory.getInstance(
 KeyManagerFactory.getDefaultAlgorithm());
 kmfactory.init(keystore, nopassword.toCharArray());

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/ssl/SimpleSSLTestProtocolSocketFactory.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/ssl/SimpleSSLTestProtocolSocketFactory.java?view=diffrev=514390r1=514389r2=514390
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons

svn commit: r496642 - in /jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java

2007-01-16 Thread oglueck
Author: oglueck
Date: Tue Jan 16 01:45:14 2007
New Revision: 496642

URL: http://svn.apache.org/viewvc?view=revrev=496642
Log:
Fixed leak in ConnectionPool.mapHost

PR: HTTPCLIENT-622
Contributed by: Michael Becke, Ortwin Glück
Reviewed by: Michael Becke, Ortwin Glück

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diffrev=496642r1=496641r2=496642
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Tue Jan 16 
01:45:14 2007
@@ -1,5 +1,8 @@
 Changes since Release 3.1 Beta 1:
 
+* [HTTPCLIENT-622] - Leak in 
MultiThreadedHttpConnectionManager.ConnectionPool.mapHosts
+   Contributed by Michael Becke mbecke at apache.org and Ortwin 
Glueck oglueck at apache.org
+
 * [HTTPCLIENT-612] - FileRequestEntity now always closes the input file.
Contributed by Sebastian Bazley sebb at apache.org
 

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java?view=diffrev=496642r1=496641r2=496642
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
 Tue Jan 16 01:45:14 2007
@@ -760,7 +760,8 @@
 public synchronized void handleLostConnection(HostConfiguration 
config) {
 HostConnectionPool hostPool = getHostPool(config);
 hostPool.numConnections--;
-
+if (hostPool.numConnections == 0) mapHosts.remove(config);
+
 numConnections--;
 notifyWaitingThread(config);
 }
@@ -866,7 +867,8 @@
 hostPool.freeConnections.remove(connection);
 hostPool.numConnections--;
 numConnections--;
-
+if (hostPool.numConnections == 0) 
mapHosts.remove(connectionConfiguration);
+
 // remove the connection from the timeout handler
 idleConnectionHandler.remove(connection);
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r481225 - in /jakarta/commons/proper/httpclient/trunk: ./ src/java/org/apache/commons/httpclient/ src/test/org/apache/commons/httpclient/

2006-12-01 Thread oglueck
Author: oglueck
Date: Fri Dec  1 03:26:28 2006
New Revision: 481225

URL: http://svn.apache.org/viewvc?view=revrev=481225
Log:
Added a convenience method that is memory-safe.

PR: HTTPCLIENT-610
Contributed by: Ortwin Glück
Reviewed by: Oleg Kalnichevski

Added:

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java
Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestHttpMethodFundamentals.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diffrev=481225r1=481224r2=481225
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Fri Dec  1 
03:26:28 2006
@@ -1,3 +1,8 @@
+Changes since Release 3.1 Beta 1:
+
+* [HTTPCLIENT-610] - Added for convenience 
HttpMethodBase.getResponseBodyAsString(int)
+   Contributed by Ortwin Glueck oglueck at apache.org
+   
 Release 3.1 Beta 1
 ---
 Changes since Release 3.1 Alpha 1:

Added: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java?view=autorev=481225
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java
 (added)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java
 Fri Dec  1 03:26:28 2006
@@ -0,0 +1,22 @@
+package org.apache.commons.httpclient;
+
+/**
+ * Signals that the response content was larger than anticipated. 
+ * 
+ * @author Ortwin Glück
+ */
+public class HttpContentTooLargeException extends HttpException {
+private int maxlen;
+
+public HttpContentTooLargeException(String message, int maxlen) {
+super(message);
+this.maxlen = maxlen;
+}
+
+/**
+ * @return the maximum anticipated content length in bytes.
+ */
+public int getMaxLength() {
+return maxlen;
+}
+}

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java?view=diffrev=481225r1=481224r2=481225
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
 Fri Dec  1 03:26:28 2006
@@ -34,7 +34,9 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.InterruptedIOException;
+import java.io.Reader;
 import java.util.Collection;
 
 import org.apache.commons.httpclient.auth.AuthState;
@@ -698,7 +700,7 @@
  * Returns the response body of the HTTP method, if any, as an [EMAIL 
PROTECTED] InputStream}. 
  * If response body is not available, returns ttnull/tt
  * 
- * @return The response body
+ * @return The response body or codenull/code.
  * 
  * @throws IOException If an I/O (transport) problem occurs while 
obtaining the 
  * response body.
@@ -726,7 +728,7 @@
  * recommended, to use getResponseAsStream if the content length of the 
response
  * is unknown or resonably large.
  * 
- * @return The response body.
+ * @return The response body or codenull/code.
  * 
  * @throws IOException If an I/O (transport) problem occurs while 
obtaining the 
  * response body.
@@ -741,6 +743,61 @@
 } else {
 return null;
 }
+}
+
+/**
+ * Returns the response body of the HTTP method, if any, as a [EMAIL 
PROTECTED] String}. 
+ * If response body is not available or cannot be read, returns 
ttnull/tt
+ * The string conversion on the data is done using the character encoding 
specified
+ * in ttContent-Type/tt header.p
+ * 
+ * Note: This will cause the entire response body to be buffered in 
memory. This method is
+ * safe if the content length of the response is unknown, because the 
amount of memory used
+ * is limited.p
+ * 
+ * If the response is large this method involves lots of array copying and 
many object

svn commit: r430322 - in /jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv: CSVParser.java ExtendedBufferedReader.java

2006-08-10 Thread oglueck
Author: oglueck
Date: Thu Aug 10 02:01:18 2006
New Revision: 430322

URL: http://svn.apache.org/viewvc?rev=430322view=rev
Log:
This patch reduces the amount of intermediate garbage significantly.
PR: SANDBOX-166
Contributed by: Ortwin Glück
Reviewed by: Henri Yandell

Modified:

jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java

jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/ExtendedBufferedReader.java

Modified: 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java?rev=430322r1=430321r2=430322view=diff
==
--- 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java
 (original)
+++ 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CSVParser.java
 Thu Aug 10 02:01:18 2006
@@ -19,7 +19,7 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.Reader;
-import java.util.Vector;
+import java.util.ArrayList;
 
 
 /**
@@ -63,12 +63,23 @@
   protected static final int TT_EOF = 1;
   /** Token with content when end of a line is reached. */
   protected static final int TT_EORECORD = 2;
+
+  /** Immutable empty String array. */
+  private static final String[] EMPTY_STRING_ARRAY = new String[0];

   // the input stream
   private ExtendedBufferedReader in;
 
   private CSVStrategy strategy;
   
+  // the following objects are shared to reduce garbage 
+  /** A record buffer for getLine(). Grows as necessary and is reused. */
+  private ArrayList record = new ArrayList();
+  private Token reusableToken = new Token();
+  private CharBuffer wsBuf = new CharBuffer();
+  private CharBuffer code = new CharBuffer(4);
+
+  
   /**
* Token is an internal token representation.
* 
@@ -76,16 +87,17 @@
*/
   class Token {
 /** Token type, see TT_xxx constants. */
-int type;
+int type = TT_INVALID;
 /** The content buffer. */
-StringBuffer content;
+CharBuffer content = new CharBuffer(INITIAL_TOKEN_LENGTH);
 /** Token ready flag: indicates a valid token with content (ready for the 
parser). */
 boolean isReady;
-/** Initializes an empty token. */
-Token() {
-  content = new StringBuffer(INITIAL_TOKEN_LENGTH);
-  type = TT_INVALID;
-  isReady = false;
+
+Token reset() {
+content.clear();
+type = TT_INVALID;
+isReady = false;
+return this;
 }
   }
   
@@ -160,7 +172,7 @@
* @throws IOException on parse error or input read-failure
*/
   public String[][] getAllValues() throws IOException {
-Vector records = new Vector();
+ArrayList records = new ArrayList();
 String[] values;
 String[][] ret = null;
 while ((values = getLine()) != null)  {
@@ -211,35 +223,35 @@
* @throws IOException on parse error or input read-failure
*/
   public String[] getLine() throws IOException {
-Vector record = new Vector();
-String[] ret = new String[0];
-Token tkn;
-while ((tkn = nextToken()).type == TT_TOKEN) {
-  record.add(tkn.content.toString());  
-}
-// did we reached eorecord or eof ?
-switch (tkn.type) {
-  case TT_EORECORD:
-record.add(tkn.content.toString());
-break;
-  case TT_EOF:
-if (tkn.isReady) {
-  record.add(tkn.content.toString());
-} else {
-  ret = null;
+String[] ret = EMPTY_STRING_ARRAY;
+record.clear();
+while (true) {
+reusableToken.reset();
+nextToken(reusableToken);
+switch (reusableToken.type) {
+case TT_TOKEN:
+record.add(reusableToken.content.toString());
+break;
+case TT_EORECORD:
+record.add(reusableToken.content.toString());
+break;
+case TT_EOF:
+if (reusableToken.isReady) {
+record.add(reusableToken.content.toString());
+} else {
+ret = null;
+}
+break;
+case TT_INVALID:
+default:
+// error: throw IOException
+throw new IOException((line  + getLineNumber() + ) invalid 
parse sequence);
+// unreachable: break;
 }
-break;
-  case TT_INVALID:
-  default:
-// error: throw IOException
-throw new IOException(
-  (line  + getLineNumber() 
-  + ) invalid parse sequence);
-// unreachable: break;
+if (reusableToken.type != TT_TOKEN) break;
 }
-if (record.size()  0) {
-  ret = new String[record.size()];
-  record.toArray(ret);
+if (!record.isEmpty()) {
+  ret = (String[]) record.toArray(new String[record.size()]);
 }
 return ret;
   }
@@ -260,18 +272,26

svn commit: r430324 - in /jakarta/commons/sandbox/csv/trunk/src: java/org/apache/commons/csv/CharBuffer.java test/org/apache/commons/csv/CharBufferTest.java

2006-08-10 Thread oglueck
Author: oglueck
Date: Thu Aug 10 02:02:13 2006
New Revision: 430324

URL: http://svn.apache.org/viewvc?rev=430324view=rev
Log:
This patch reduces the amount of intermediate garbage significantly.
PR: SANDBOX-166
Contributed by: Ortwin Glück
Reviewed by: Henri Yandell

Added:

jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CharBuffer.java

jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/CharBufferTest.java

Added: 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CharBuffer.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CharBuffer.java?rev=430324view=auto
==
--- 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CharBuffer.java
 (added)
+++ 
jakarta/commons/sandbox/csv/trunk/src/java/org/apache/commons/csv/CharBuffer.java
 Thu Aug 10 02:02:13 2006
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.commons.csv;
+
+/**
+ * A simple StringBuffer replacement that aims to 
+ * reduce copying as much as possible. The buffer
+ * grows as necessary.
+ * This class is not thread safe.
+ * 
+ * @author Ortwin Glück
+ */
+public class CharBuffer {
+private char[] c;
+/**
+ * Actually used number of characters in the array. 
+ * It is also the index at which
+ * a new character will be inserted into codec/code. 
+ */ 
+private int length;
+
+/**
+ * Creates a new CharBuffer with an initial capacity of 32 characters.
+ */
+public CharBuffer() {
+this(32);
+}
+
+/**
+ * Creates a new CharBuffer with an initial capacity 
+ * of codelength/code characters.
+ */
+public CharBuffer(final int length) {
+if (length == 0) throw new IllegalArgumentException(Can't create an 
empty CharBuffer);
+this.c = new char[length];
+}
+
+/**
+ * Empties the buffer. The capacity still remains the same, so no memory 
is freed.
+ */
+public void clear() {
+length = 0;
+}
+
+/**
+ * Returns the number of characters in the buffer.
+ * @return the number of characters
+ */
+public int length() {
+return length;
+}
+
+/**
+ * Returns the current capacity of the buffer.
+ * @return the maximum number of characters that can be stored in this 
buffer without
+ * resizing it.
+ */
+public int capacity() {
+return c.length;
+}
+
+/**
+ * Appends the contents of codecb/code to the end of this CharBuffer.
+ * @param cb the CharBuffer to append or null
+ */
+public void append(final CharBuffer cb) {
+if (cb == null) return;
+provideCapacity(length + cb.length);
+System.arraycopy(cb.c, 0, c, length, cb.length);
+length += cb.length;
+}
+
+/**
+ * Appends codes/code to the end of this CharBuffer.
+ * This method involves copying the new data once!
+ * @param s the String to append or null
+ */
+public void append(final String s) {
+if (s == null) return;
+append(s.toCharArray());
+}
+
+/**
+ * Appends codesb/code to the end of this CharBuffer.
+ * This method involves copying the new data once!
+ * @param sb the StringBuffer to append or null
+ */
+public void append(final StringBuffer sb) {
+if (sb == null) return;
+provideCapacity(length + sb.length());
+sb.getChars(0, sb.length(), c, length);
+length += sb.length();
+}
+
+/**
+ * Appends codedata/code to the end of this CharBuffer.
+ * This method involves copying the new data once!
+ * @param data the char[] to append or null
+ */
+public void append(final char[] data) {
+if (data == null) return;
+provideCapacity(length + data.length);
+System.arraycopy(data, 0, c, length, data.length);
+length += data.length;
+}
+
+/**
+ * Appends a single character to the end of this CharBuffer.
+ * This method involves copying the new data once!
+ * @param data the char to append
+ */
+public void append(final char data) {
+provideCapacity(length + 1);
+c[length] = data;
+length

svn commit: r430326 - in /jakarta/commons/sandbox/csv/trunk/src/test: AllTests.java org/apache/commons/csv/AllTests.java org/apache/commons/csv/writer/AllTests.java

2006-08-10 Thread oglueck
Author: oglueck
Date: Thu Aug 10 02:06:19 2006
New Revision: 430326

URL: http://svn.apache.org/viewvc?rev=430326view=rev
Log:
added test suites

Added:
jakarta/commons/sandbox/csv/trunk/src/test/AllTests.java

jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/AllTests.java

jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/writer/AllTests.java

Added: jakarta/commons/sandbox/csv/trunk/src/test/AllTests.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/test/AllTests.java?rev=430326view=auto
==
--- jakarta/commons/sandbox/csv/trunk/src/test/AllTests.java (added)
+++ jakarta/commons/sandbox/csv/trunk/src/test/AllTests.java Thu Aug 10 
02:06:19 2006
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2005 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.
+ */
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+public static Test suite() {
+TestSuite suite = new TestSuite(Test for default package);
+//$JUnit-BEGIN$
+suite.addTest(org.apache.commons.csv.AllTests.suite());
+suite.addTest(org.apache.commons.csv.writer.AllTests.suite());
+//$JUnit-END$
+return suite;
+}
+
+}

Added: 
jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/AllTests.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/AllTests.java?rev=430326view=auto
==
--- 
jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/AllTests.java 
(added)
+++ 
jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/AllTests.java 
Thu Aug 10 02:06:19 2006
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.commons.csv;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+public static Test suite() {
+TestSuite suite = new TestSuite(Test for org.apache.commons.csv);
+//$JUnit-BEGIN$
+suite.addTest(ExtendedBufferedReaderTest.suite());
+suite.addTest(CSVPrinterTest.suite());
+suite.addTest(CSVParserTest.suite());
+suite.addTest(CSVStrategyTest.suite());
+suite.addTestSuite(CSVUtilsTest.class);
+//$JUnit-END$
+return suite;
+}
+
+}

Added: 
jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/writer/AllTests.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/writer/AllTests.java?rev=430326view=auto
==
--- 
jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/writer/AllTests.java
 (added)
+++ 
jakarta/commons/sandbox/csv/trunk/src/test/org/apache/commons/csv/writer/AllTests.java
 Thu Aug 10 02:06:19 2006
@@ -0,0 +1,19 @@
+package org.apache.commons.csv.writer;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTests {
+
+public static Test suite() {
+TestSuite suite = new TestSuite(Test for 
org.apache.commons.csv.writer);
+//$JUnit-BEGIN$
+suite.addTestSuite(CSVConfigGuesserTest.class);
+suite.addTestSuite(CSVConfigTest.class);
+suite.addTestSuite(CSVFieldTest.class);
+suite.addTestSuite(CSVWriterTest.class);
+//$JUnit-END$
+return suite;
+}
+
+}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r407743 - in /jakarta/commons/proper/httpclient: branches/HTTPCLIENT_3_0_BRANCH/src/test/org/apache/commons/httpclient/TestURI.java trunk/src/test/org/apache/commons/httpclient/TestURI.jav

2006-05-19 Thread oglueck
Author: oglueck
Date: Fri May 19 01:13:39 2006
New Revision: 407743

URL: http://svn.apache.org/viewvc?rev=407743view=rev
Log:
added test case

Modified:

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/test/org/apache/commons/httpclient/TestURI.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/test/org/apache/commons/httpclient/TestURI.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/test/org/apache/commons/httpclient/TestURI.java?rev=407743r1=407742r2=407743view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/test/org/apache/commons/httpclient/TestURI.java
 (original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/test/org/apache/commons/httpclient/TestURI.java
 Fri May 19 01:13:39 2006
@@ -152,7 +152,8 @@
 { g?y/../x, http, a, /b/c/g, y/../x, null, 
http://a/b/c/g?y/../x; },
 { g#s/./x, http, a, /b/c/g, null, s/./x, 
http://a/b/c/g#s/./x; },
 { g#s/../x, http, a, /b/c/g, null, s/../x, 
http://a/b/c/g#s/../x; },
-{ :g, http, a, /b/c/:g, null, null, http://a/b/c/:g; } // 
see issue #35148
+{ :g, http, a, /b/c/:g, null, null, http://a/b/c/:g; }, 
// see issue #35148
+{ //a/b/c, http, a, /b/c, null, null, http://a/b/c; } // 
see HTTPCLIENT-580 
 };
 for (int i = 0; i  testRelativeURIs.length; i++) {
 URI testURI = null;

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
URL: 
http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java?rev=407743r1=407742r2=407743view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
 Fri May 19 01:13:39 2006
@@ -152,7 +152,8 @@
 { g?y/../x, http, a, /b/c/g, y/../x, null, 
http://a/b/c/g?y/../x; },
 { g#s/./x, http, a, /b/c/g, null, s/./x, 
http://a/b/c/g#s/./x; },
 { g#s/../x, http, a, /b/c/g, null, s/../x, 
http://a/b/c/g#s/../x; },
-{ :g, http, a, /b/c/:g, null, null, http://a/b/c/:g; } // 
see issue #35148
+{ :g, http, a, /b/c/:g, null, null, http://a/b/c/:g; }, 
// see issue #35148
+{ //a/b/c, http, a, /b/c, null, null, http://a/b/c; } // 
see HTTPCLIENT-580 
 };
 for (int i = 0; i  testRelativeURIs.length; i++) {
 URI testURI = null;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r377704 - in /jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH: release_notes.txt src/java/org/apache/commons/httpclient/HttpState.java

2006-02-14 Thread oglueck
Author: oglueck
Date: Tue Feb 14 03:48:29 2006
New Revision: 377704

URL: http://svn.apache.org/viewcvs?rev=377704view=rev
Log:
PR: 38636

HttpState.clearCookies() should be synchronized

Submitted by: Peter Dolberg
Reviewed by: Oleg Kalnichevsky

Modified:

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/release_notes.txt

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/java/org/apache/commons/httpclient/HttpState.java

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/release_notes.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/release_notes.txt?rev=377704r1=377703r2=377704view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/release_notes.txt
 (original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/release_notes.txt
 Tue Feb 14 03:48:29 2006
@@ -1,5 +1,8 @@
 Changes since Release 3.0:
-
+ 
+ * 38636 - Calling HttpState.clearCookies() is now safe from a different 
thread.
+   Contributed by Peter Dolberg observewisdom at yahoo.com
+ 
  * 38385 - Fixed NPE when creating URI from scheme specific part with null 
fragment
Contributed by Michele Vivoda vivodamichele at hotmail.com
 

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/java/org/apache/commons/httpclient/HttpState.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/java/org/apache/commons/httpclient/HttpState.java?rev=377704r1=377703r2=377704view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/java/org/apache/commons/httpclient/HttpState.java
 (original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_3_0_BRANCH/src/java/org/apache/commons/httpclient/HttpState.java
 Tue Feb 14 03:48:29 2006
@@ -610,7 +610,7 @@
 /**
  * Clears all cookies.
  */
-public void clearCookies() {
+public synchronized void clearCookies() {
 this.cookies.clear();
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r366716 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java

2006-01-07 Thread oglueck
Author: oglueck
Date: Sat Jan  7 05:04:58 2006
New Revision: 366716

URL: http://svn.apache.org/viewcvs?rev=366716view=rev
Log:
Fixed broken setter method.

PR: 38139
Submitted by: Mike Boyers
Reviewed by: Oleg Kalnichevski

Modified:

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java?rev=366716r1=366715r2=366716view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/MultiThreadedHttpConnectionManager.java
 Sat Jan  7 05:04:58 2006
@@ -337,7 +337,7 @@
  * [EMAIL PROTECTED] HttpConnectionManager#getParams()}.
  */
 public void setMaxTotalConnections(int maxTotalConnections) {
-this.params.getMaxTotalConnections();
+this.params.setMaxTotalConnections(maxTotalConnections);
 }
 
 /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r366717 - /jakarta/commons/proper/httpclient/trunk/release_notes.txt

2006-01-07 Thread oglueck
Author: oglueck
Date: Sat Jan  7 05:08:56 2006
New Revision: 366717

URL: http://svn.apache.org/viewcvs?rev=366717view=rev
Log:
Fixed broken setter method.

PR: 38139
Submitted by: Mike Boyers
Reviewed by: Oleg Kalnichevski

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/release_notes.txt?rev=366717r1=366716r2=366717view=diff
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Sat Jan  7 
05:08:56 2006
@@ -1,5 +1,7 @@
 Changes since Release 3.0:
 
+ * 38139 - Calling 
MultiThreadedHttpConnectionManager.setMaxTotalConnections(int) had no effect
+
  * 37988 - Fixed bug in URI#toString() causing user name / password to 
stripped from the resultant String
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r365660 - /jakarta/commons/proper/httpclient/trunk/xdocs/navigation.xml

2006-01-03 Thread oglueck
Author: oglueck
Date: Tue Jan  3 07:17:33 2006
New Revision: 365660

URL: http://svn.apache.org/viewcvs?rev=365660view=rev
Log:
It's about time to include a link to the Wiki.

Modified:
jakarta/commons/proper/httpclient/trunk/xdocs/navigation.xml

Modified: jakarta/commons/proper/httpclient/trunk/xdocs/navigation.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/xdocs/navigation.xml?rev=365660r1=365659r2=365660view=diff
==
--- jakarta/commons/proper/httpclient/trunk/xdocs/navigation.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/xdocs/navigation.xml Tue Jan  3 
07:17:33 2006
@@ -16,7 +16,7 @@
   item name=News href=/news.html/
   item name=Status href=/status.html/
   item name=Download href=/downloads.html/
-  item name=Applications 
href=http://wiki.apache.org/jakarta-httpclient/HttpClientPowered/
+  item name=Wiki href=http://wiki.apache.org/jakarta-httpclient//
   item name=User Guide href=/userguide.html
 item name=Authentication Guide href=/authentication.html/
 item name=Character Encodings href=/charencodings.html/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r357992 - /jakarta/commons/proper/httpclient/trunk/project.properties

2005-12-20 Thread oglueck
Author: oglueck
Date: Tue Dec 20 06:15:16 2005
New Revision: 357992

URL: http://svn.apache.org/viewcvs?rev=357992view=rev
Log:
fixed broken link

Modified:
jakarta/commons/proper/httpclient/trunk/project.properties

Modified: jakarta/commons/proper/httpclient/trunk/project.properties
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/project.properties?rev=357992r1=357991r2=357992view=diff
==
--- jakarta/commons/proper/httpclient/trunk/project.properties (original)
+++ jakarta/commons/proper/httpclient/trunk/project.properties Tue Dec 20 
06:15:16 2005
@@ -6,7 +6,7 @@
 maven.checkstyle.properties=checkstyle.xml.properties
 maven.checkstyle.includes=**/*.java
 maven.checkstyle.excludes=**/*.html
-maven.javadoc.links=http://java.sun.com/j2se/1.4.1/docs/api/, 
http://jakarta.apache.org/commons/logging/apidocs/
+maven.javadoc.links=http://java.sun.com/j2se/1.4.2/docs/api/, 
http://jakarta.apache.org/commons/logging/apidocs/
 maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
 maven.repo.list=asf
 maven.repo.asf=scp://people.apache.org



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r358011 - /jakarta/commons/proper/httpclient/trunk/project.xml

2005-12-20 Thread oglueck
Author: oglueck
Date: Tue Dec 20 06:51:18 2005
New Revision: 358011

URL: http://svn.apache.org/viewcvs?rev=358011view=rev
Log:
fixed broken archive links

Modified:
jakarta/commons/proper/httpclient/trunk/project.xml

Modified: jakarta/commons/proper/httpclient/trunk/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/project.xml?rev=358011r1=358010r2=358011view=diff
==
--- jakarta/commons/proper/httpclient/trunk/project.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/project.xml Tue Dec 20 06:51:18 2005
@@ -131,13 +131,13 @@
   nameHttpClient Developer List/name
   subscribe[EMAIL PROTECTED]/subscribe
   unsubscribe[EMAIL PROTECTED]/unsubscribe
-  
archivehttp://mail-archives.apache.org/eyebrowse/SummarizeList?listId=281/archive
+  
archivehttp://mail-archives.apache.org/mod_mbox/jakarta-httpclient-dev//archive
 /mailingList
 mailingList
   nameHttpClient User List/name
   subscribe[EMAIL PROTECTED]/subscribe
   unsubscribe[EMAIL PROTECTED]/unsubscribe
-  
archivehttp://mail-archives.apache.org/eyebrowse/SummarizeList?listId=280/archive
+  
archivehttp://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user//archive
 /mailingList
   /mailingLists
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r357669 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/CredentialsProvider.java

2005-12-19 Thread oglueck
Author: oglueck
Date: Mon Dec 19 01:19:10 2005
New Revision: 357669

URL: http://svn.apache.org/viewcvs?rev=357669view=rev
Log:
doc: fixed broken link

Modified:

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/CredentialsProvider.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/CredentialsProvider.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/CredentialsProvider.java?rev=357669r1=357668r2=357669view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/CredentialsProvider.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/CredentialsProvider.java
 Mon Dec 19 01:19:10 2005
@@ -34,23 +34,23 @@
 /**
  * p
  * Credentials provider interface can be used to provide [EMAIL PROTECTED] 
- * org.apache.commons.httpclient.HttpMethod HTTP method} with a means 
- * to request authentication credentials if no credentials have been given 
- * or given credentials are incorrect. 
+ * org.apache.commons.httpclient.HttpMethod HTTP method} with a means to 
request
+ * authentication credentials if no credentials have been given or given
+ * credentials are incorrect.
  * /p
  * p
- * HttpClient makes no provisions to check whether the same credentials have 
- * been tried already. It is a responsibility of the custom credentials 
- * provider to keep track of authentication attempts and to ensure that 
- * credentials known to be invalid are not retried. HttpClient will simply 
- * store the set of credentials returned by the custom credentials provider 
- * in the [EMAIL PROTECTED] HttpState http state} object and will attempt to 
use these 
- * credentials for all subsequent requests with the given authentication 
- * scope.
+ * HttpClient makes no provisions to check whether the same credentials have
+ * been tried already. It is a responsibility of the custom credentials 
provider
+ * to keep track of authentication attempts and to ensure that credentials 
known
+ * to be invalid are not retried. HttpClient will simply store the set of
+ * credentials returned by the custom credentials provider in the
+ * [EMAIL PROTECTED] org.apache.commons.httpclient.HttpState http state} 
object and will
+ * attempt to use these credentials for all subsequent requests with the given
+ * authentication scope.
  * /p
  * p
- * Classes implementing this interface must synchronize access to shared
- * data as methods of this interfrace may be executed from multiple threads 
+ * Classes implementing this interface must synchronize access to shared data 
as
+ * methods of this interfrace may be executed from multiple threads
  * /p
  * 
  * 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r354422 - /jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml

2005-12-06 Thread oglueck
Author: oglueck
Date: Tue Dec  6 05:18:49 2005
New Revision: 354422

URL: http://svn.apache.org/viewcvs?rev=354422view=rev
Log:
CookiePolicy.registerCookieSpec(CookiePolicy.DEFAULT, Some CookieSpec); does 
not work as documented

PR 37712
Contributed by Ortwin Glück
Reviewed by Oleg Kalnichevski

Modified:
jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml

Modified: jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml?rev=354422r1=354421r2=354422view=diff
==
--- jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/xdocs/cookies.xml Tue Dec  6 
05:18:49 2005
@@ -111,6 +111,7 @@
 /source
   /subsection
 
+  !-- re-enable when issue #37712 is fixed
   subsection name=Default
 pThe default cookie specification can be set by defining the default 
cookie
 policy on codeCookiePolicy/code./p
@@ -119,6 +120,7 @@
 CookiePolicy.registerCookieSpec(CookiePolicy.DEFAULT, Some 
CookieSpec);
 ]]/source
   /subsection
+  --
 /section
 
 section name=Common Problems



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r290666 - in /jakarta/commons/proper/httpclient/trunk/src: java/org/apache/commons/httpclient/cookie/RFC2109Spec.java test/org/apache/commons/httpclient/cookie/TestCookieRFC2109Spec.java

2005-09-21 Thread oglueck
Author: oglueck
Date: Wed Sep 21 02:30:56 2005
New Revision: 290666

URL: http://svn.apache.org/viewcvs?rev=290666view=rev
Log:
Fixed pair ordering

PR #36740 (Minor RFC 2109 / 2965 violation)

Contributed by Ortwin Glück

Reviewed by Oleg Kalnichevski

Modified:

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2109Spec.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java?rev=290666r1=290665r2=290666view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/RFC2109Spec.java
 Wed Sep 21 02:30:56 2005
@@ -222,14 +222,14 @@
 value = ;
 }
 formatParam(buffer, new NameValuePair(cookie.getName(), value), 
version);
-if (cookie.getDomain() != null 
+if ((cookie.getPath() != null)  cookie.isPathAttributeSpecified()) {
+  buffer.append(; );
+  formatParam(buffer, new NameValuePair($Path, cookie.getPath()), 
version);
+}
+if ((cookie.getDomain() != null) 
  cookie.isDomainAttributeSpecified()) {
 buffer.append(; );
 formatParam(buffer, new NameValuePair($Domain, 
cookie.getDomain()), version);
-}
-if (cookie.getPath() != null  cookie.isPathAttributeSpecified()) {
-buffer.append(; );
-formatParam(buffer, new NameValuePair($Path, cookie.getPath()), 
version);
 }
 }
 

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2109Spec.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2109Spec.java?rev=290666r1=290665r2=290666view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2109Spec.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieRFC2109Spec.java
 Wed Sep 21 02:30:56 2005
@@ -333,14 +333,14 @@
 Cookie[] cookies  = cookiespec.parse(myhost.mydomain.com, 80, /, 
false, header );
 cookiespec.validate(myhost.mydomain.com, 80, /, false, cookies[0]);
 String s1 = cookiespec.formatCookie(cookies[0]);
-assertEquals(s1, $Version=\1\; name=\value\; 
$Domain=\.mydomain.com\; $Path=\/\);
+assertEquals(s1, $Version=\1\; name=\value\; $Path=\/\; 
$Domain=\.mydomain.com\);
 
 header = new Header( Set-Cookie, 
 name=value; path=/; domain=.mydomain.com);
 cookies = cookiespec.parse(myhost.mydomain.com, 80, /, false, 
header );
 cookiespec.validate(myhost.mydomain.com, 80, /, false, cookies[0]);
 String s2 = cookiespec.formatCookie(cookies[0]);
-assertEquals(s2, $Version=0; name=value; $Domain=.mydomain.com; 
$Path=/);
+assertEquals(s2, $Version=0; name=value; $Path=/; 
$Domain=.mydomain.com);
 }
 
 public void testRFC2109CookiesFormatting() throws Exception {
@@ -353,8 +353,8 @@
 assertEquals(2, cookies.length);
 String s1 = cookiespec.formatCookies(cookies);
 assertEquals(s1, 
-$Version=0; name1=value1; $Domain=.mydomain.com; $Path=/;  + 
-name2=value2; $Domain=.mydomain.com; $Path=/);
+$Version=0; name1=value1; $Path=/; $Domain=.mydomain.com;  + 
+name2=value2; $Path=/; $Domain=.mydomain.com);
 
 header = new Header(Set-Cookie, 
 name1=value1; version=1; path=/; domain=.mydomain.com,  + 
@@ -364,8 +364,8 @@
 assertEquals(2, cookies.length);
 String s2 = cookiespec.formatCookies(cookies);
 assertEquals(s2, 
-$Version=\1\; name1=\value1\; $Domain=\.mydomain.com\; 
$Path=\/\;  + 
-name2=\value2\; $Domain=\.mydomain.com\; $Path=\/\);
+$Version=\1\; name1=\value1\; $Path=\/\; 
$Domain=\.mydomain.com\;  + 
+name2=\value2\; $Path=\/\; $Domain=\.mydomain.com\);
 }
 
 /**
@@ -378,11 +378,11 @@
 
 CookieSpec cookiespec = new RFC2109Spec();
 String s = cookiespec.formatCookie(cookie);
-assertEquals($Version=0; name=; $Domain=.whatever.com; $Path=/, s);
+assertEquals($Version=0; name=; $Path=/; $Domain=.whatever.com, s);
 
 cookie.setVersion(1);
 s = cookiespec.formatCookie(cookie);
-assertEquals($Version

svn commit: r289266 - /jakarta/commons/proper/httpclient/trunk/project.xml

2005-09-15 Thread oglueck
Author: oglueck
Date: Thu Sep 15 08:47:00 2005
New Revision: 289266

URL: http://svn.apache.org/viewcvs?rev=289266view=rev
Log:
PR #36672 (wrong dependency URL)

Modified:
jakarta/commons/proper/httpclient/trunk/project.xml

Modified: jakarta/commons/proper/httpclient/trunk/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/project.xml?rev=289266r1=289265r2=289266view=diff
==
--- jakarta/commons/proper/httpclient/trunk/project.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/project.xml Thu Sep 15 08:47:00 2005
@@ -288,7 +288,7 @@
 dependency
   idcommons-logging/id
   version1.0.3/version
-  urlhttp://jakarta.apache.org/commons/logging.html/url
+  urlhttp://jakarta.apache.org/commons/logging//url
 /dependency
 dependency
   idcommons-codec/id



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r289267 - /jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

2005-09-15 Thread oglueck
Author: oglueck
Date: Thu Sep 15 08:48:33 2005
New Revision: 289267

URL: http://svn.apache.org/viewcvs?rev=289267view=rev
Log:
PR #36672 (wrong dependency URL)

Modified:
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml?rev=289267r1=289266r2=289267view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
(original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
Thu Sep 15 08:48:33 2005
@@ -247,7 +247,7 @@
 dependency
   idcommons-logging/id
   version1.0.3/version
-  urlhttp://jakarta.apache.org/commons/logging.html/url
+  urlhttp://jakarta.apache.org/commons/logging//url
 /dependency
   /dependencies
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r280908 - in /jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/auth/DigestScheme.java src/test/org/apache/commons/httpclient/auth/TestDiges

2005-09-14 Thread oglueck
Author: oglueck
Date: Wed Sep 14 11:59:25 2005
New Revision: 280908

URL: http://svn.apache.org/viewcvs?rev=280908view=rev
Log:
PR #36372 (nonce-count in digest auth should not be quoted)
Contributed by Ortwin Glück
Reviewed by Oleg Kalnichevsky

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/release_notes.txt?rev=280908r1=280907r2=280908view=diff
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Wed Sep 14 
11:59:25 2005
@@ -1,6 +1,9 @@
 
 Changes since Release Candidate 3:
 
+ * 36372 - nonce-count in digest auth should not be quoted
+   Contributed by Ortwin Glueck oglueck at apache.org
+   
  * 36369 - Custom Proxy-Connection header no longer gets overwritten
Contributed by Oleg Kalnichevski olegk at apache.org
 
@@ -21,7 +24,7 @@
 
  * 35642 - Do not retry if host is unreachable. This ensures a connection 
timeout
will be obeyed.
-   Contributed by Ortwin Gl�ck oglueck at apache.org
+   Contributed by Ortwin Glueck oglueck at apache.org

  * 35815 - SimpleHttpConnectionManager now logs warnings when it detects it is
being used incorrectly. 

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java?rev=280908r1=280907r2=280908view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
 Wed Sep 14 11:59:25 2005
@@ -111,7 +111,6 @@
 super();
 this.complete = false;
 this.formatter = new ParameterFormatter();
-this.formatter.setAlwaysUseQuotes(true);
 }
 
 /**
@@ -491,6 +490,9 @@
 if (i  0) {
 buffer.append(, );
 }
+boolean noQuotes = nc.equals(param.getName()) ||
+   qop.equals(param.getName());
+this.formatter.setAlwaysUseQuotes(!noQuotes);
 this.formatter.format(buffer, param);
 }
 return buffer.toString();

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java?rev=280908r1=280907r2=280908view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
 Wed Sep 14 11:59:25 2005
@@ -179,7 +179,7 @@
 AuthScheme authscheme = new DigestScheme();
 authscheme.processChallenge(challenge);
 String response = authscheme.authenticate(cred, method);
-
+assertTrue(response.indexOf(nc=0001)  0);
 Map table = AuthChallengeParser.extractParams(response);
 assertEquals(username, table.get(username));
 assertEquals(realm, table.get(realm));



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r280921 - /jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java

2005-09-14 Thread oglueck
Author: oglueck
Date: Wed Sep 14 12:31:28 2005
New Revision: 280921

URL: http://svn.apache.org/viewcvs?rev=280921view=rev
Log:
added another test for formerly fixed issue

Modified:

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java?rev=280921r1=280920r2=280921view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/auth/TestDigestAuth.java
 Wed Sep 14 12:31:28 2005
@@ -179,7 +179,8 @@
 AuthScheme authscheme = new DigestScheme();
 authscheme.processChallenge(challenge);
 String response = authscheme.authenticate(cred, method);
-assertTrue(response.indexOf(nc=0001)  0);
+assertTrue(response.indexOf(nc=0001)  0); // test for quotes
+assertTrue(response.indexOf(qop=auth)  0); // test for quotes
 Map table = AuthChallengeParser.extractParams(response);
 assertEquals(username, table.get(username));
 assertEquals(realm, table.get(realm));



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r280350 - /jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java

2005-09-12 Thread oglueck
Author: oglueck
Date: Mon Sep 12 08:03:03 2005
New Revision: 280350

URL: http://svn.apache.org/viewcvs?rev=280350view=rev
Log:
fix spacing
prepare for adding another case

Modified:

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java?rev=280350r1=280349r2=280350view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestRedirects.java
 Mon Sep 12 08:03:03 2005
@@ -45,7 +45,7 @@
 import org.apache.commons.httpclient.server.SimpleResponse;
 
 /**
- * Basic authentication test cases.
+ * Redirection test cases.
  *
  * @author Oleg Kalnichevski
  * 
@@ -73,43 +73,41 @@
 }
 
 private class BasicRedirectService implements HttpService {
-
-   private int statuscode = HttpStatus.SC_MOVED_TEMPORARILY;
-   private String host = null;
-private int port;
+   private int statuscode = HttpStatus.SC_MOVED_TEMPORARILY;
+   private String host = null;
+private int port;
 
-public BasicRedirectService(final String host, int port, int 
statuscode) {
-super();
-this.host = host;
-this.port = port;
-if (statuscode  0) {
-   this.statuscode = statuscode;
-}
+public BasicRedirectService(final String host, int port, int 
statuscode) {
+super();
+this.host = host;
+this.port = port;
+if (statuscode  0) {
+   this.statuscode = statuscode;
 }
+}
 
-public BasicRedirectService(final String host, int port) {
-this(host, port, -1);
-}
+public BasicRedirectService(final String host, int port) {
+this(host, port, -1);
+}
 
-public boolean process(final SimpleRequest request, final 
SimpleResponse response)
-throws IOException
-{
-RequestLine reqline = request.getRequestLine();
-HttpVersion ver = reqline.getHttpVersion();
-if (reqline.getUri().equals(/oldlocation/)) {
-response.setStatusLine(ver, this.statuscode);
-response.addHeader(new Header(Location, 
-   http://; + this.host + : + this.port + 
/newlocation/));
-response.addHeader(new Header(Connection, close));
-} else if (reqline.getUri().equals(/newlocation/)) {
-response.setStatusLine(ver, HttpStatus.SC_OK);
-response.setBodyString(Successful redirect);
-} else {
-response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND);
-}
-return true;
+public boolean process(final SimpleRequest request, final 
SimpleResponse response)
+throws IOException {
+RequestLine reqline = request.getRequestLine();
+HttpVersion ver = reqline.getHttpVersion();
+if (reqline.getUri().equals(/oldlocation/)) {
+response.setStatusLine(ver, this.statuscode);
+response.addHeader(new Header(Location, 
+   http://; + this.host + : + this.port + 
/newlocation/));
+response.addHeader(new Header(Connection, close));
+} else if (reqline.getUri().equals(/newlocation/)) {
+response.setStatusLine(ver, HttpStatus.SC_OK);
+response.setBodyString(Successful redirect);
+} else {
+response.setStatusLine(ver, HttpStatus.SC_NOT_FOUND);
 }
+return true;
 }
+}
 
 private class CircularRedirectService implements HttpService {
 
@@ -162,29 +160,30 @@
 }
 
 private class BogusRedirectService implements HttpService {
+private String url;
 
-public BogusRedirectService() {
-super();
-}
+public BogusRedirectService(String redirectUrl) {
+super();
+this.url = redirectUrl;
+}
 
-public boolean process(final SimpleRequest request, final 
SimpleResponse response)
-throws IOException
-{
-RequestLine reqline = request.getRequestLine();
-HttpVersion ver = reqline.getHttpVersion();
-if (reqline.getUri().equals(/oldlocation

svn commit: r280351 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java

2005-09-12 Thread oglueck
Author: oglueck
Date: Mon Sep 12 08:03:31 2005
New Revision: 280351

URL: http://svn.apache.org/viewcvs?rev=280351view=rev
Log:
typo

Modified:

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java?rev=280351r1=280350r2=280351view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
 Mon Sep 12 08:03:31 2005
@@ -557,8 +557,7 @@
 * @return codetrue/code if the redirect was successful
 */
private boolean processRedirectResponse(final HttpMethod method)
- throws RedirectException  
-{
+ throws RedirectException {
//get the location header to find out where to redirect to
Header locationHeader = method.getResponseHeader(location);
if (locationHeader == null) {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r226834 - /jakarta/commons/proper/httpclient/trunk/xdocs/preference-api.xml

2005-08-01 Thread oglueck
Author: oglueck
Date: Mon Aug  1 09:12:15 2005
New Revision: 226834

URL: http://svn.apache.org/viewcvs?rev=226834view=rev
Log:
some clarifications

Modified:
jakarta/commons/proper/httpclient/trunk/xdocs/preference-api.xml

Modified: jakarta/commons/proper/httpclient/trunk/xdocs/preference-api.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/xdocs/preference-api.xml?rev=226834r1=226833r2=226834view=diff
==
--- jakarta/commons/proper/httpclient/trunk/xdocs/preference-api.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/xdocs/preference-api.xml Mon Aug  1 
09:12:15 2005
@@ -446,7 +446,7 @@
bandwidth by minimizing the number of segments that are sent. When 
applications wish to 
decrease network latency and increase performance, they can disable 
Nagle's algorithm (by enabling
codeTCP_NODELAY/code). Data will be sent earlier, at the cost 
of an increase 
-   in bandwidth consumption.
+   in bandwidth consumption and number of packets.
/p
   /td
   tdpcodelt;undefinedgt;/code/p/td
@@ -621,7 +621,7 @@
   td
p
 The timeout in milliseconds used when retrieving an HTTP 
connection from the
-HTTP connection manager.
+HTTP connection manager. 0 means to wait indefinitely.
/p
   /td
   tdpcodelt;undefinedgt;/code/p/td
@@ -643,7 +643,7 @@
   tdpBoolean/p/td
   td
p
-Defines whether authentication should be attempted preemptively.
+Defines whether authentication should be attempted preemptively. 
See authentication guide.
/p
   /td
   tdpcodelt;undefinedgt;/code/p/td
@@ -653,7 +653,8 @@
   tdpBoolean/p/td
   td
p
-Defines whether relative redirects should be rejected.
+Defines whether relative redirects should be rejected. Although 
redirects are supposed to be absolute
+it is common internet practice to use relative URLs.
/p
   /td
   tdpcodelt;undefinedgt;/code/p/td



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r225123 - /jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

2005-07-25 Thread oglueck
Author: oglueck
Date: Mon Jul 25 06:56:02 2005
New Revision: 225123

URL: http://svn.apache.org/viewcvs?rev=225123view=rev
Log:
I don't work for Nose anymore.

Modified:
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml?rev=225123r1=225122r2=225123view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
(original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
Mon Jul 25 06:56:02 2005
@@ -136,8 +136,8 @@
 developer
   nameOrtwin Glueck/name
   idoglueck/id
-  emailoglueck -at -apache.org/email
-  organizationNose Applied Intelligence AG/organization
+  emailoglueck -at apache.org/email
+  organization/organization
   roles
 roleJava Developer/role
   /roles



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r225124 - /jakarta/commons/proper/httpclient/trunk/project.xml

2005-07-25 Thread oglueck
Author: oglueck
Date: Mon Jul 25 06:56:10 2005
New Revision: 225124

URL: http://svn.apache.org/viewcvs?rev=225124view=rev
Log:
I don't work for Nose anymore.

Modified:
jakarta/commons/proper/httpclient/trunk/project.xml

Modified: jakarta/commons/proper/httpclient/trunk/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/project.xml?rev=225124r1=225123r2=225124view=diff
==
--- jakarta/commons/proper/httpclient/trunk/project.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/project.xml Mon Jul 25 06:56:10 2005
@@ -164,14 +164,11 @@
   nameOrtwin Glueck/name
   idoglueck/id
   emailoglueck -at- apache.org/email
-  organizationNose Applied Intelligence AG/organization
+  organization/organization
   roles
 roleJava Developer/role
   /roles
   urlhttp://www.odi.ch//url
-  !-- don't include this until http://jira.codehaus.org/browse/MPXDOC-121 
is resolved
-  timezone1/timezone
-  --
 /developer
 developer
   nameSung-Gu/name



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r220267 - /jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

2005-07-22 Thread oglueck
Author: oglueck
Date: Fri Jul 22 01:46:47 2005
New Revision: 220267

URL: http://svn.apache.org/viewcvs?rev=220267view=rev
Log:
include NEEDINFO (status was recently added) and UNCONFIRMED bugs in the list

Modified:
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml?rev=220267r1=220266r2=220267view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
(original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
Fri Jul 22 01:46:47 2005
@@ -23,7 +23,7 @@
 
   logo/images/httpclient_logo.png/logo
   urlhttp://jakarta.apache.org/commons/httpclient//url
-  
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?short_desc_type=allwordssubstrproduct=HttpClientcomponent=Commons+HttpClientversion=2.0+Finallong_desc_type=allwordssubstrbug_file_loc_type=allwordssubstrkeywords_type=anywordsbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailtype1=substringemailtype2=substringbugidtype=includeorder=Importancefield0-0-0=nooptype0-0-0=noopquery_format=advancedshort_desc=long_desc=bug_file_loc=keywords=emailassigned_to1=1email1=emailreporter2=1email2=bug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitvalue0-0-0=]]/issueTrackingUrl
+  
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?query_format=advancedshort_desc_type=allwordssubstrshort_desc=product=HttpClientcomponent=Commons+HttpClientversion=2.0+Finallong_desc_type=allwordssubstrlong_desc=bug_file_loc_type=allwordssubstrbug_file_loc=keywords_type=anywordskeywords=bug_status=UNCONFIRMEDbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDbug_status=NEEDINFOemailassigned_to1=1emailtype1=substringemail1=emailreporter2=1emailtype2=substringemail2=bugidtype=includebug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitorder=Reuse+same+sort+as+last+timefield0-0-0=nooptype0-0-0=noopvalue0-0-0=]]/issueTrackingUrl
 
   siteAddresspeople.apache.org/siteAddress
   siteDirectory/www/jakarta.apache.org/commons/httpclient//siteDirectory



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r220268 - /jakarta/commons/proper/httpclient/trunk/project.xml

2005-07-22 Thread oglueck
Author: oglueck
Date: Fri Jul 22 01:46:55 2005
New Revision: 220268

URL: http://svn.apache.org/viewcvs?rev=220268view=rev
Log:
include NEEDINFO (status was recently added) and UNCONFIRMED bugs in the list

Modified:
jakarta/commons/proper/httpclient/trunk/project.xml

Modified: jakarta/commons/proper/httpclient/trunk/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/project.xml?rev=220268r1=220267r2=220268view=diff
==
--- jakarta/commons/proper/httpclient/trunk/project.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/project.xml Fri Jul 22 01:46:55 2005
@@ -23,7 +23,7 @@
 
   logo/images/httpclient_logo.png/logo
   urlhttp://jakarta.apache.org/commons/httpclient//url
-  
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?query_format=advancedshort_desc_type=allwordssubstrshort_desc=product=HttpClientcomponent=Commons+HttpClientlong_desc_type=allwordssubstrlong_desc=bug_file_loc_type=allwordssubstrbug_file_loc=keywords_type=anywordskeywords=bug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailassigned_to1=1emailtype1=substringemail1=emailreporter2=1emailtype2=substringemail2=bugidtype=includebug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitorder=Importancefield0-0-0=nooptype0-0-0=noopvalue0-0-0=]]/issueTrackingUrl
+  
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?query_format=advancedshort_desc_type=allwordssubstrshort_desc=product=HttpClientcomponent=Commons+HttpClientlong_desc_type=allwordssubstrlong_desc=bug_file_loc_type=allwordssubstrbug_file_loc=keywords_type=anywordskeywords=bug_status=UNCONFIRMEDbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDbug_status=NEEDINFOemailassigned_to1=1emailtype1=substringemail1=emailreporter2=1emailtype2=substringemail2=bugidtype=includebug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitorder=Reuse+same+sort+as+last+timefield0-0-0=nooptype0-0-0=noopvalue0-0-0=]]/issueTrackingUrl
 
   siteAddresspeople.apache.org/siteAddress
   siteDirectory/www/jakarta.apache.org/commons/httpclient//siteDirectory



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r220177 - /jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java

2005-07-21 Thread oglueck
Author: oglueck
Date: Thu Jul 21 13:14:39 2005
New Revision: 220177

URL: http://svn.apache.org/viewcvs?rev=220177view=rev
Log:
doc

Modified:

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java?rev=220177r1=220176r2=220177view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java
 (original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java
 Thu Jul 21 13:14:39 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: 
/home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java,v
 1.10.2.1 2004/02/22 18:21:13 olegk Exp $
  * $Revision: 1.10.2.1 $
- * $Date: 2004/02/22 18:21:13 $
+ * $Date$
  *
  * 
  *
@@ -46,7 +46,7 @@
  * @author a href=mailto:[EMAIL PROTECTED]dIon Gillard/a
  * @author a href=mailto:[EMAIL PROTECTED]Oleg Kalnichevski/a
  * @author a href=mailto:[EMAIL PROTECTED]Mike Bowler/a
- * @version $Revision: 1.10.2.1 $ $Date: 2004/02/22 18:21:13 $
+ * @version $Revision: 1.10.2.1 $ $Date$
  *
  * @see ChunkedInputStream
  * @since 2.0
@@ -138,7 +138,10 @@
 
 /**
  * Write the specified byte to our output stream.
- *
+ * 
+ * Note: Avoid this method as it will cause an inefficient single byte 
chunk. 
+ * Use write (byte[], int, int) instead.
+ * 
  * @param b The byte to be written
  * @throws IOException if an input/output error occurs
  * @throws IllegalStateException if stream already closed



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r220180 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java

2005-07-21 Thread oglueck
Author: oglueck
Date: Thu Jul 21 13:29:45 2005
New Revision: 220180

URL: http://svn.apache.org/viewcvs?rev=220180view=rev
Log:
doc

Modified:

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java?rev=220180r1=220179r2=220180view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/ChunkedOutputStream.java
 Thu Jul 21 13:29:45 2005
@@ -146,6 +146,15 @@
 }
 
 //  OutputStream Methods
+/**
+ * Write the specified byte to our output stream.
+ * 
+ * Note: Avoid this method as it will cause an inefficient single byte 
chunk. 
+ * Use write (byte[], int, int) instead.
+ * 
+ * @param b The byte to be written
+ * @throws IOException if an input/output error occurs
+ */
 public void write(int b) throws IOException {
 cache[cachePosition] = (byte) b;
 cachePosition++;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r220184 - /jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestLocalHostBase.java

2005-07-21 Thread oglueck
Author: oglueck
Date: Thu Jul 21 14:02:38 2005
New Revision: 220184

URL: http://svn.apache.org/viewcvs?rev=220184view=rev
Log:
obsolete

PR: 31994
Reviewed by: Oleg Kalnichevski, Michael Becke

Removed:

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestLocalHostBase.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r219639 - in /jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java src/java/org/apache/commons/httpclient/HttpMethodDirector.java

2005-07-19 Thread oglueck
Author: oglueck
Date: Tue Jul 19 03:14:55 2005
New Revision: 219639

URL: http://svn.apache.org/viewcvs?rev=219639view=rev
Log:
Fixed: Do not retry if host is unreachable.



PR: 35642

Reviewed by: Oleg Kalnichevski

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/release_notes.txt?rev=219639r1=219638r2=219639view=diff
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Tue Jul 19 
03:14:55 2005
@@ -1,3 +1,10 @@
+
+Changes since Release Candidate 3:
+
+ * 35642 - Do not retry if host is unreachable. This ensures a connection 
timeout
+   will be obeied.
+   Contributed by Ortwin Glück oglueck at apache.org
+
 Release 3.0 Release Candidate 3
 ---
 Changes since Release Candidate 2:

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java?rev=219639r1=219638r2=219639view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/DefaultHttpMethodRetryHandler.java
 Tue Jul 19 03:14:55 2005
@@ -31,6 +31,7 @@
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
+import java.net.NoRouteToHostException;
 import java.net.UnknownHostException;
 
 /**
@@ -57,7 +58,9 @@
 private boolean requestSentRetryEnabled;
 
 /**
- * Default constructor
+ * Creates a new DefaultHttpMethodRetryHandler.
+ * @param retryCount the number of times a method will be retried
+ * @param requestSentRetryEnabled if true, methods that have successfully 
sent their request will be retried
  */
 public DefaultHttpMethodRetryHandler(int retryCount, boolean 
requestSentRetryEnabled) {
 super();
@@ -66,7 +69,8 @@
 }
 
 /**
- * Default constructor
+ * Creates a new DefaultHttpMethodRetryHandler that retries up to 3 times
+ * but does not retry methods that have successfully sent their requests.
  */
 public DefaultHttpMethodRetryHandler() {
 this(3, false);
@@ -101,6 +105,10 @@
 }
 if (exception instanceof UnknownHostException) {
 // Unknown host
+return false;
+}
+if (exception instanceof NoRouteToHostException) {
+// Host unreachable
 return false;
 }
 if (SSL_HANDSHAKE_EXCEPTION != null  
SSL_HANDSHAKE_EXCEPTION.isInstance(exception)) {

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java?rev=219639r1=219638r2=219639view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
 Tue Jul 19 03:14:55 2005
@@ -431,7 +431,7 @@
 throw e;
 }
 if (LOG.isInfoEnabled()) {
-LOG.info(I/O exception caught when processing 
request: 
+LOG.info(I/O exception (+ e.getClass().getName() +) 
caught when processing request: 
 + e.getMessage());
 }
 if (LOG.isDebugEnabled()) {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r190380 - in /jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH: build.properties.sample project.properties project.xml xdocs/releases.xml

2005-06-13 Thread oglueck
Author: oglueck
Date: Mon Jun 13 03:47:13 2005
New Revision: 190380

URL: http://svn.apache.org/viewcvs?rev=190380view=rev
Log:
fixed Maven deployment

Modified:

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/build.properties.sample

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.properties
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/xdocs/releases.xml

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/build.properties.sample
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/build.properties.sample?rev=190380r1=190379r2=190380view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/build.properties.sample
 (original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/build.properties.sample
 Mon Jun 13 03:47:13 2005
@@ -4,7 +4,7 @@
 # Make a copy this file named build.properties,
 # and customize it to your environment and preferences.
 #
-# $Id: build.properties.sample,v 1.12 2003/02/25 02:10:15 jsdever Exp $
+# $Id$
 # ===
 
 # ===
@@ -71,7 +71,9 @@
 # where to build the test-webapp to
 #test-webapp.dest=${dist.home}
 #test-webapp.dest=/java/jakarta-tomcat-4.0-b7/webapps
-
+#httpclient.test.log=org.apache.commons.logging.impl.NoOpLog
+maven.username=yourASFid
+maven.repo.asf.privatekey=/home/myuser/.ssh/id_dsa
 
 # ===
 # Anakia Properties (used by the xdoc target)

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.properties
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.properties?rev=190380r1=190379r2=190380view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.properties
 (original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.properties
 Mon Jun 13 03:47:13 2005
@@ -7,3 +7,9 @@
 maven.checkstyle.excludes=**/*.html
 maven.javadoc.links=http://java.sun.com/j2se/1.4.1/docs/api/, 
http://jakarta.apache.org/commons/logging/apidocs/
 maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
+maven.repo.list=asf
+maven.repo.asf=scp://people.apache.org
+maven.repo.asf.directory=/www/www.apache.org/dist/java-repository
+maven.repo.asf.username=${maven.username}
+maven.repo.asf.compress=true
+maven.repo.asf.group=jakarta 
\ No newline at end of file

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml?rev=190380r1=190379r2=190380view=diff
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
(original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
Mon Jun 13 03:47:13 2005
@@ -25,9 +25,8 @@
   urlhttp://jakarta.apache.org/commons/httpclient//url
   
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?short_desc_type=allwordssubstrproduct=HttpClientcomponent=Commons+HttpClientversion=2.0+Finallong_desc_type=allwordssubstrbug_file_loc_type=allwordssubstrkeywords_type=anywordsbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailtype1=substringemailtype2=substringbugidtype=includeorder=Importancefield0-0-0=nooptype0-0-0=noopquery_format=advancedshort_desc=long_desc=bug_file_loc=keywords=emailassigned_to1=1email1=emailreporter2=1email2=bug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitvalue0-0-0=]]/issueTrackingUrl
 
-  siteAddressminotaur.apache.org/siteAddress
+  siteAddresspeople.apache.org/siteAddress
   siteDirectory/www/jakarta.apache.org/commons/httpclient//siteDirectory
-  
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/httpclient/distributionDirectory
   repository

connectionscm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/branches/HTTPCLIENT_2_0_BRANCH/connection
 
urlhttp://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/branches/HTTPCLIENT_2_0_BRANCH/url

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/xdocs/releases.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/xdocs/releases.xml?rev=190380r1=190379r2=190380view=diff

svn commit: r190382 - in /jakarta/commons/proper/httpclient/trunk: build.properties.sample project.properties project.xml xdocs/releases.xml

2005-06-13 Thread oglueck
Author: oglueck
Date: Mon Jun 13 03:58:56 2005
New Revision: 190382

URL: http://svn.apache.org/viewcvs?rev=190382view=rev
Log:
fixed Maven deployment

Modified:
jakarta/commons/proper/httpclient/trunk/build.properties.sample
jakarta/commons/proper/httpclient/trunk/project.properties
jakarta/commons/proper/httpclient/trunk/project.xml
jakarta/commons/proper/httpclient/trunk/xdocs/releases.xml

Modified: jakarta/commons/proper/httpclient/trunk/build.properties.sample
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/build.properties.sample?rev=190382r1=190381r2=190382view=diff
==
--- jakarta/commons/proper/httpclient/trunk/build.properties.sample (original)
+++ jakarta/commons/proper/httpclient/trunk/build.properties.sample Mon Jun 13 
03:58:56 2005
@@ -38,4 +38,5 @@
 httpclient.test.log=org.apache.commons.logging.impl.SimpleLog
 #httpclient.test.log=org.apache.commons.logging.impl.Log4JCategoryLog
 #httpclient.test.log=org.apache.commons.logging.impl.NoOpLog
-
+maven.username=yourASFid
+maven.repo.asf.privatekey=/home/myuser/.ssh/id_dsa

Modified: jakarta/commons/proper/httpclient/trunk/project.properties
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/project.properties?rev=190382r1=190381r2=190382view=diff
==
--- jakarta/commons/proper/httpclient/trunk/project.properties (original)
+++ jakarta/commons/proper/httpclient/trunk/project.properties Mon Jun 13 
03:58:56 2005
@@ -8,3 +8,9 @@
 maven.checkstyle.excludes=**/*.html
 maven.javadoc.links=http://java.sun.com/j2se/1.4.1/docs/api/, 
http://jakarta.apache.org/commons/logging/apidocs/
 maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
+maven.repo.list=asf
+maven.repo.asf=scp://people.apache.org
+maven.repo.asf.directory=/www/www.apache.org/dist/java-repository
+maven.repo.asf.username=${maven.username}
+maven.repo.asf.compress=true
+maven.repo.asf.group=jakarta 
\ No newline at end of file

Modified: jakarta/commons/proper/httpclient/trunk/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/project.xml?rev=190382r1=190381r2=190382view=diff
==
--- jakarta/commons/proper/httpclient/trunk/project.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/project.xml Mon Jun 13 03:58:56 2005
@@ -25,9 +25,8 @@
   urlhttp://jakarta.apache.org/commons/httpclient//url
   
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?query_format=advancedshort_desc_type=allwordssubstrshort_desc=product=HttpClientcomponent=Commons+HttpClientlong_desc_type=allwordssubstrlong_desc=bug_file_loc_type=allwordssubstrbug_file_loc=keywords_type=anywordskeywords=bug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailassigned_to1=1emailtype1=substringemail1=emailreporter2=1emailtype2=substringemail2=bugidtype=includebug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitorder=Importancefield0-0-0=nooptype0-0-0=noopvalue0-0-0=]]/issueTrackingUrl
 
-  siteAddressminotaur.apache.org/siteAddress
+  siteAddresspeople.apache.org/siteAddress
   
siteDirectory/www/jakarta.apache.org/commons/httpclient/3.0//siteDirectory
-  
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/httpclient/distributionDirectory
   repository

connectionscm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk/connection
 
urlhttp://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk/url

Modified: jakarta/commons/proper/httpclient/trunk/xdocs/releases.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/xdocs/releases.xml?rev=190382r1=190381r2=190382view=diff
==
--- jakarta/commons/proper/httpclient/trunk/xdocs/releases.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/xdocs/releases.xml Mon Jun 13 
03:58:56 2005
@@ -158,11 +158,9 @@
   to bugzilla you can contact a href=mailto:[EMAIL 
PROTECTED][EMAIL PROTECTED]/abr/br//li
 
 liDeploy the jar file to the ibiblio repository.
-  ul
-liIf you have an account on the ibiblio server, run codemaven 
jar:deploy/code/li
-liIf you don't have this account, contact a href=mailto:[EMAIL 
PROTECTED]dion/a
-  and ask him inicely/i to do it./li
-  /ul
+  pre
+maven jar:deploy
+  /pre
 /li
   /ol
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r179784 - in /jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/URI.java src/test/org/apache/commons/httpclient/TestURI.java

2005-06-03 Thread oglueck
Author: oglueck
Date: Fri Jun  3 06:18:34 2005
New Revision: 179784

URL: http://svn.apache.org/viewcvs?rev=179784view=rev
Log:
fixed relative URIs beginning with a colon.
PR: 35148
Contributed by: Gordon Mohr
Reviewed by: Oleg Kalnichevsky, Ortwin Glck

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/release_notes.txt?rev=179784r1=179783r2=179784view=diff
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Fri Jun  3 
06:18:34 2005
@@ -1,4 +1,6 @@
 Changes since Release Candidate 2:
+ * 35148 - HttpClient now correctly handles relative URIs beginning with a 
colon.
+   Contributed by Gordon Mohr gojomo at archive.org
 
  * 34961 - HttpClient now correctly handles escaped characters in HTTP header 
elements
Contributed by Oleg Kalnichevski olegk at apache.org

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java?rev=179784r1=179783r2=179784view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
 Fri Jun  3 06:18:34 2005
@@ -1913,7 +1913,7 @@
 boolean isStartedFromPath = false;
 int atColon = tmp.indexOf(':');
 int atSlash = tmp.indexOf('/');
-if (atColon  0 || (atSlash = 0  atSlash  atColon)) {
+if (atColon = 0 || (atSlash = 0  atSlash  atColon)) {
 isStartedFromPath = true;
 }
 
@@ -1936,7 +1936,7 @@
  *  ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
  * /pre/blockquotep
  */
-if (at  length  tmp.charAt(at) == ':') {
+if (at  0  at  length  tmp.charAt(at) == ':') {
 char[] target = tmp.substring(0, at).toLowerCase().toCharArray();
 if (validate(target, scheme)) {
 _scheme = target;

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java?rev=179784r1=179783r2=179784view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
 Fri Jun  3 06:18:34 2005
@@ -109,7 +109,7 @@
 }
 
 // the following is an array of arrays in the following order
-// relative URI and resolved( scheme, host, path, query, fragment URI )
+// relative URI, scheme, host(authority), path, query, fragment, abs. 
URI
 //
 // these examples were taken from rfc 2396
 String[][] testRelativeURIs = {
@@ -154,7 +154,8 @@
 { g?y/./x, http, a, /b/c/g, y/./x, null, 
http://a/b/c/g?y/./x; },
 { g?y/../x, http, a, /b/c/g, y/../x, null, 
http://a/b/c/g?y/../x; },
 { g#s/./x, http, a, /b/c/g, null, s/./x, 
http://a/b/c/g#s/./x; },
-{ g#s/../x, http, a, /b/c/g, null, s/../x, 
http://a/b/c/g#s/../x; }
+{ g#s/../x, http, a, /b/c/g, null, s/../x, 
http://a/b/c/g#s/../x; },
+{ :g, http, a, /b/c/:g, null, null, http://a/b/c/:g; } // 
see issue #35148
 };
 for (int i = 0; i  testRelativeURIs.length; i++) {
 URI testURI = null;
@@ -170,12 +171,12 @@
 }
 
 try {
-assertEquals( testURI.getScheme(), testRelativeURIs[i][1] );
-assertEquals( testURI.getAuthority(), testRelativeURIs[i][2] );
-assertEquals( testURI.getPath(), testRelativeURIs[i][3] );
-assertEquals( testURI.getQuery(), testRelativeURIs[i][4] );
-assertEquals( testURI.getFragment(), testRelativeURIs[i][5] );
-assertEquals( testURI.getURIReference(), 
testRelativeURIs[i][6] );
+assertEquals(array index +i, testRelativeURIs[i][1], 
testURI.getScheme());
+assertEquals(array index +i, testRelativeURIs[i][2], 
testURI.getAuthority());
+assertEquals(array index +i, testRelativeURIs[i][3

svn commit: r179050 - /jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.java

2005-05-30 Thread oglueck
Author: oglueck
Date: Mon May 30 05:22:06 2005
New Revision: 179050

URL: http://svn.apache.org/viewcvs?rev=179050view=rev
Log:
doc

Modified:

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.java?rev=179050r1=179049r2=179050view=diff
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.java
 Mon May 30 05:22:06 2005
@@ -37,6 +37,7 @@
 
 /**
  * A cookie spec that does nothing.  Cookies are neither parsed, formatted nor 
matched.
+ * It can be used to effectively disable cookies altogether. 
  * 
  * @since 3.0
  */



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r160004 - jakarta/commons/proper/httpclient/trunk/xdocs/logging.xml

2005-04-04 Thread oglueck
Author: oglueck
Date: Mon Apr  4 01:35:59 2005
New Revision: 160004

URL: http://svn.apache.org/viewcvs?view=revrev=160004
Log:
enhanced guide
added java.util.logging section

reviewed by: Oleg Kalnichevski

Modified:
jakarta/commons/proper/httpclient/trunk/xdocs/logging.xml

Modified: jakarta/commons/proper/httpclient/trunk/xdocs/logging.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/xdocs/logging.xml?view=diffr1=160003r2=160004
==
--- jakarta/commons/proper/httpclient/trunk/xdocs/logging.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/xdocs/logging.xml Mon Apr  4 
01:35:59 2005
@@ -11,14 +11,30 @@
body
   section name=Logging Practices
  p
-emHttpClient/em utilizes the logging interface provided by the
+Being a library HttpClient is not to dictate which logging 
framework
+the user has to use. Therefore  emHttpClient/em utilizes the 
logging 
+interface provided by the
 a href=http://jakarta.apache.org/commons/logging/;
 Jakarta Commons Logging/a package.  emCommons Logging/em 
provides
 a simple and generalized 
 a href=http://jakarta.apache.org/commons/logging/api/index.html;
-log interface/a to various logging packages.  By using
+log interface/a to various logging packages. By using
 emCommons Logging/em, emHttpClient/em can be configured
-for a variety of different logging behaviours.
+for a variety of different logging behaviours. That means the user 
will have
+to make a choice which logging framework to use. By default 
emCommons Logging/em
+supports the following logging frameworks:
+ul
+  lia 
href=http://logging.apache.org/log4j/docs/index.html;Log4J/a/li
+  lia 
href=http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/package-summary.html;
+  java.util.logging/a/li
+  lia 
href=http://jakarta.apache.org/commons/logging/api/org/apache/commons/logging/impl/SimpleLog.html;
+  SimpleLog/a (internal to emCommons Logging/em)/li  
+/ul
+By implementing some simple interfaces emCommons Logging/em 
can be extended to support
+basically any other custom logging framework.
+emCommons Logging/em tries to automatically discover the 
logging framework to use. If it
+fails to select the expected one, you must configure emCommons 
Logging/em by hand. Please
+refer to the emCommons Logging/em documentation for more 
information.
  /pp
 emHttpClient/em performs two different kinds of logging: the 
standard
 context logging used within each class, and wire logging.  
  
@@ -52,8 +68,8 @@
   section name=Configuration Examples
   p
  emCommons Logging/em can delegate to a variety of loggers for 
processing 
- the actual output.  Below are configuration examples for 
emCommons Logging/em 
- and emLog4j/em.
+ the actual output.  Below are configuration examples for 
emCommons Logging/em, 
+ emLog4j/em and emjava.util.logging/em.
   /p
   subsection name=Commons Logging Examples
   p
@@ -91,7 +107,7 @@
  
System.setProperty(org.apache.commons.logging.simplelog.showdatetime, 
true);br /
  
System.setProperty(org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient,
 debug);br /
 /blockquote
- /p  
+  /p  
   /subsection
   subsection name=Log4j Examples
 p
@@ -107,39 +123,57 @@
   p
 uEnable header wire + context logging/u - bBest for 
Debugging/bbr /
 blockquote
-log4j.rootLogger=INFO, stdoutbr /
-br /
-log4j.appender.stdout=org.apache.log4j.ConsoleAppenderbr /
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayoutbr /
-log4j.appender.stdout.layout.ConversionPattern=%5p [%c] %m%nbr /
-br /
-log4j.logger.httpclient.wire.header=DEBUGbr /
-log4j.logger.org.apache.commons.httpclient=DEBUGbr /
+  log4j.rootLogger=INFO, stdoutbr /
+  br /
+  log4j.appender.stdout=org.apache.log4j.ConsoleAppenderbr /
+  
log4j.appender.stdout.layout=org.apache.log4j.PatternLayoutbr /
+  log4j.appender.stdout.layout.ConversionPattern=%5p [%c] 
%m%nbr /
+  br /
+  log4j.logger.httpclient.wire.header=DEBUGbr /
+  log4j.logger.org.apache.commons.httpclient=DEBUGbr /
 /blockquote
   /p  
   p
 uEnable full wire(header and content) + context 
logging/ubr

svn commit: r160028 - jakarta/commons/proper/httpclient/trunk/project.xml

2005-04-04 Thread oglueck
Author: oglueck
Date: Mon Apr  4 04:22:48 2005
New Revision: 160028

URL: http://svn.apache.org/viewcvs?view=revrev=160028
Log:
adapted to new infrastructure

Modified:
jakarta/commons/proper/httpclient/trunk/project.xml

Modified: jakarta/commons/proper/httpclient/trunk/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/project.xml?view=diffr1=160027r2=160028
==
--- jakarta/commons/proper/httpclient/trunk/project.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/project.xml Mon Apr  4 04:22:48 2005
@@ -25,7 +25,7 @@
   urlhttp://jakarta.apache.org/commons/httpclient//url
   
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?query_format=advancedshort_desc_type=allwordssubstrshort_desc=product=HttpClientcomponent=Commons+HttpClientlong_desc_type=allwordssubstrlong_desc=bug_file_loc_type=allwordssubstrbug_file_loc=keywords_type=anywordskeywords=bug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailassigned_to1=1emailtype1=substringemail1=emailreporter2=1emailtype2=substringemail2=bugidtype=includebug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitorder=Importancefield0-0-0=nooptype0-0-0=noopvalue0-0-0=]]/issueTrackingUrl
 
-  siteAddressjakarta.apache.org/siteAddress
+  siteAddressminotaur.apache.org/siteAddress
   
siteDirectory/www/jakarta.apache.org/commons/httpclient/3.0//siteDirectory
   
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/httpclient/distributionDirectory
   repository



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r160029 - jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

2005-04-04 Thread oglueck
Author: oglueck
Date: Mon Apr  4 04:24:01 2005
New Revision: 160029

URL: http://svn.apache.org/viewcvs?view=revrev=160029
Log:
adapted to new infrastructure

Modified:
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml?view=diffr1=160028r2=160029
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
(original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/project.xml 
Mon Apr  4 04:24:01 2005
@@ -25,7 +25,7 @@
   urlhttp://jakarta.apache.org/commons/httpclient//url
   
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?short_desc_type=allwordssubstrproduct=HttpClientcomponent=Commons+HttpClientversion=2.0+Finallong_desc_type=allwordssubstrbug_file_loc_type=allwordssubstrkeywords_type=anywordsbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailtype1=substringemailtype2=substringbugidtype=includeorder=Importancefield0-0-0=nooptype0-0-0=noopquery_format=advancedshort_desc=long_desc=bug_file_loc=keywords=emailassigned_to1=1email1=emailreporter2=1email2=bug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitvalue0-0-0=]]/issueTrackingUrl
 
-  siteAddressjakarta.apache.org/siteAddress
+  siteAddressminotaur.apache.org/siteAddress
   siteDirectory/www/jakarta.apache.org/commons/httpclient//siteDirectory
   
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/httpclient/distributionDirectory
   repository



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r156933 - in jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH: release_notes.txt src/java/org/apache/commons/httpclient/HttpConnection.java

2005-03-10 Thread oglueck
Author: oglueck
Date: Thu Mar 10 02:33:41 2005
New Revision: 156933

URL: http://svn.apache.org/viewcvs?view=revrev=156933
Log:
Fixed exception in HttpConnection because of unchecked buffer size

PR: 33947
Reviewed by: Oleg Kalnichevsku, Jorge Gonzales Varela

Modified:

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/release_notes.txt

jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/HttpConnection.java

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/release_notes.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/release_notes.txt?view=diffr1=156932r2=156933
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/release_notes.txt
 (original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/release_notes.txt
 Thu Mar 10 02:33:41 2005
@@ -1,3 +1,6 @@
+Changes since Release 2.0.2
+ * 33947 - Exception in HttpConnection because of unchecked buffer size
+
 Release 2.0.2
 ---
 Changes since Release 2.0.1

Modified: 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/HttpConnection.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/HttpConnection.java?view=diffr1=156932r2=156933
==
--- 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/HttpConnection.java
 (original)
+++ 
jakarta/commons/proper/httpclient/branches/HTTPCLIENT_2_0_BRANCH/src/java/org/apache/commons/httpclient/HttpConnection.java
 Thu Mar 10 02:33:41 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: 
/home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
 1.67.2.13 2004/09/06 17:41:45 olegk Exp $
  * $Revision: 1.67.2.13 $
- * $Date: 2004/09/06 17:41:45 $
+ * $Date$
  *
  * 
  *
@@ -80,7 +80,7 @@
  * @author Eric E Johnson
  * @author Laura Werner
  * 
- * @version   $Revision: 1.67.2.13 $ $Date: 2004/09/06 17:41:45 $
+ * @version   $Revision: 1.67.2.13 $ $Date$
  */
 public class HttpConnection {
 
@@ -684,11 +684,11 @@
 socket.setSendBufferSize(sendBufferSize);
 }
 int outbuffersize = socket.getSendBufferSize();
-if (outbuffersize  2048) {
+if ((outbuffersize  2048) || (outbuffersize = 0)) {
 outbuffersize = 2048;
 }
 int inbuffersize = socket.getReceiveBufferSize();
-if (inbuffersize  2048) {
+if ((inbuffersize  2048) || (inbuffersize = 0)) {
 inbuffersize = 2048;
 }
 inputStream = new BufferedInputStream(



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r156935 - in jakarta/commons/proper/httpclient/trunk: release_notes.txt src/java/org/apache/commons/httpclient/HttpConnection.java

2005-03-10 Thread oglueck
Author: oglueck
Date: Thu Mar 10 02:38:29 2005
New Revision: 156935

URL: http://svn.apache.org/viewcvs?view=revrev=156935
Log:
Fixed exception in HttpConnection because of unchecked buffer size

PR: 33947
Reviewed by: Oleg Kalnichevsku, Jorge Gonzales Varela

Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java

Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diffr1=156934r2=156935
==
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Thu Mar 10 
02:38:29 2005
@@ -1,5 +1,6 @@
 Changes since Release Candidate 1:
-
+ * 33947 - Exception in HttpConnection because of unchecked buffer size
+ 
  * 33856 - Fixed the problem with the credential-charset parameter not having 
an effect on
the encoding of the NTLM credentials
Contributed by Oleg Kalnichevski olegk at apache.org

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java?view=diffr1=156934r2=156935
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpConnection.java
 Thu Mar 10 02:38:29 2005
@@ -732,11 +732,11 @@
 socket.setReceiveBufferSize(rcvBufSize);
 }
 int outbuffersize = socket.getSendBufferSize();
-if (outbuffersize  2048) {
+if ((outbuffersize  2048) || (outbuffersize = 0)) {
 outbuffersize = 2048;
 }
 int inbuffersize = socket.getReceiveBufferSize();
-if (inbuffersize  2048) {
+if ((inbuffersize  2048) || (inbuffersize = 0)) {
 inbuffersize = 2048;
 }
 inputStream = new BufferedInputStream(socket.getInputStream(), 
inbuffersize);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r156023 - jakarta/commons/proper/httpclient/trunk/xdocs/tutorial.xml

2005-03-03 Thread oglueck
Author: oglueck
Date: Thu Mar  3 00:44:53 2005
New Revision: 156023

URL: http://svn.apache.org/viewcvs?view=revrev=156023
Log:
Fixed: dependencies and JDK version

PR: 33815

Modified:
jakarta/commons/proper/httpclient/trunk/xdocs/tutorial.xml

Modified: jakarta/commons/proper/httpclient/trunk/xdocs/tutorial.xml
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/xdocs/tutorial.xml?view=diffr1=156022r2=156023
==
--- jakarta/commons/proper/httpclient/trunk/xdocs/tutorial.xml (original)
+++ jakarta/commons/proper/httpclient/trunk/xdocs/tutorial.xml Thu Mar  3 
00:44:53 2005
@@ -21,12 +21,10 @@
 
 section name=Getting Ready
   pThe first thing you need to do is get a copy of emHttpClient/em 
and it's
-  dependencies.  Currently the only required dependency is
-  a href=/commons/logging/commons-logging/a.  This tutorial was
-  written for emHttpClient/em 2.0 and at a minimum requires 2.0 Alpha
-  2.  You will also need JDK 1.2.2 or above./p
+  a href=dependencies.htmldependencies/a. This tutorial was
+  written for emHttpClient/em 3.0.  You will also need JDK 1.3 or 
above./p
 
-pOnce you've downloaded emHttpClient/em and commons-logging you'll 
need to
+pOnce you've downloaded emHttpClient/em and dependencies you will 
need to
   put them on your classpath.  There is also an optional dependency on JSSE
   which is required for HTTPS connections;  this is not required for this
   tutorial./p



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r149281 - in jakarta/commons/proper/httpclient/trunk/src: java/org/apache/commons/httpclient/util/DateParser.java java/org/apache/commons/httpclient/util/DateUtil.java test/org/apache/commons/httpclient/TestMethodsExternalHost.java test/org/apache/commons/httpclient/cookie/TestCookieCompatibilitySpec.java

2005-01-31 Thread oglueck
Author: oglueck
Date: Mon Jan 31 10:35:07 2005
New Revision: 149281

URL: http://svn.apache.org/viewcvs?view=revrev=149281
Log:
Removed references to nagoya.


Modified:

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateParser.java

jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateUtil.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java

jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieCompatibilitySpec.java

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateParser.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateParser.java?view=diffr1=149280r2=149281
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateParser.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateParser.java
 Mon Jan 31 10:35:07 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: 
/home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/util/DateParser.java,v
 1.11 2004/11/06 19:15:42 mbecke Exp $
  * $Revision: 1.11 $
- * $Date: 2004/11/06 19:15:42 $
+ * $Date$
  *
  * 
  *
@@ -111,7 +111,7 @@
dateFormats = DEFAULT_PATTERNS;
 }
 // trim single quotes around date if present
-// see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5279
+// see issue #5279
 if (dateValue.length()  1 
  dateValue.startsWith(') 
  dateValue.endsWith(')

Modified: 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateUtil.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateUtil.java?view=diffr1=149280r2=149281
==
--- 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateUtil.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/util/DateUtil.java
 Mon Jan 31 10:35:07 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: 
/home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/util/DateUtil.java,v
 1.2 2004/12/24 20:36:13 olegk Exp $
  * $Revision: 1.2 $
- * $Date: 2004/12/24 20:36:13 $
+ * $Date$
  *
  * 
  *
@@ -142,7 +142,7 @@
 startDate = DEFAULT_TWO_DIGIT_YEAR_START;
 }
 // trim single quotes around date if present
-// see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5279
+// see issue #5279
 if (dateValue.length()  1 
  dateValue.startsWith(') 
  dateValue.endsWith(')

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java?view=diffr1=149280r2=149281
==
--- 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java
 (original)
+++ 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java
 Mon Jan 31 10:35:07 2005
@@ -1,7 +1,7 @@
 /*
  * $Header: 
/home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java,v
 1.15 2004/09/17 07:57:49 oglueck Exp $
  * $Revision: 1.15 $
- * $Date: 2004/09/17 07:57:49 $
+ * $Date$
  * 
  *
  *  Copyright 1999-2004 The Apache Software Foundation
@@ -47,7 +47,7 @@
  * @author Rodney Waldhoff
  * @author Ortwin Glck
  * @author Jeff Dever
- * @version $Id: TestMethodsExternalHost.java,v 1.15 2004/09/17 07:57:49 
oglueck Exp $
+ * @version $Id$
  */
 public class TestMethodsExternalHost extends TestCase {
 
@@ -194,7 +194,7 @@
 
 
 /**
- * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16864
+ * see issue #16864
  */
 public void testDomino_Go_Webserver404() throws Exception {
 

Modified: 
jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/cookie/TestCookieCompatibilitySpec.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/httpclient/trunk/src/test/org/apache

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpParser.java

2005-01-11 Thread oglueck
oglueck 2005/01/11 05:57:06

  Modified:httpclient/src/java/org/apache/commons/httpclient
HttpParser.java
  Log:
  doc (as a result of bug #33041)
  
  Revision  ChangesPath
  1.13  +9 -7  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpParser.java
  
  Index: HttpParser.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpParser.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HttpParser.java   13 May 2004 04:03:25 -  1.12
  +++ HttpParser.java   11 Jan 2005 13:57:06 -  1.13
  @@ -39,7 +39,8 @@
   import org.apache.commons.logging.LogFactory;
   
   /**
  - * A utility class for parsing http header values.
  + * A utility class for parsing http header values according to
  + * RFC-2616 Section 4 and 19.3.
* 
* @author Michael Becke
* @author a href=mailto:[EMAIL PROTECTED]Oleg Kalnichevski/a
  @@ -61,7 +62,7 @@
* Stop reading when tt\n/tt terminator encountered 
* If the stream ends before the line terminator is found,
* the last part of the string will still be returned. 
  - * If no input data available, codenull/code is returned
  + * If no input data available, codenull/code is returned.
*
* @param inputStream the stream to read from
*
  @@ -75,7 +76,7 @@
   int ch;
   while ((ch = inputStream.read()) = 0) {
   buf.write(ch);
  -if (ch == '\n') {
  +if (ch == '\n') { // be tolerant (RFC-2616 Section 19.3)
   break;
   }
   }
  @@ -89,7 +90,7 @@
* Read up to tt\n/tt from an (unchunked) input stream.
* If the stream ends before the line terminator is found,
* the last part of the string will still be returned.
  - * If no input data available, codenull/code is returned
  + * If no input data available, codenull/code is returned.
*
* @param inputStream the stream to read from
* @param charset charset of HTTP protocol elements
  @@ -105,6 +106,7 @@
   if (rawdata == null) {
   return null;
   }
  +// strip CR and LF from the end
   int len = rawdata.length;
   int offset = 0;
   if (len  0) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/xdocs/stylesheets project.xml

2004-12-31 Thread oglueck
oglueck 2004/12/31 02:23:34

  Removed: httpclient/xdocs/stylesheets project.xml
  Log:
  not used

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2004-12-31 Thread oglueck
oglueck 2004/12/31 02:24:06

  Modified:httpclient/xdocs troubleshooting.xml status.xml
   httpclient project.xml
  Log:
  replace references to nagoya with the correct DNS name
  
  Revision  ChangesPath
  1.4   +2 -2  jakarta-commons/httpclient/xdocs/troubleshooting.xml
  
  Index: troubleshooting.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/troubleshooting.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- troubleshooting.xml   1 Jun 2003 18:51:23 -   1.3
  +++ troubleshooting.xml   31 Dec 2004 10:24:06 -  1.4
  @@ -73,7 +73,7 @@
   section name=Reporting Bugs
 pIf you're fairly certain that the problem is a bug in 
emHttpClient/em or
   something that emHttpClient/em doesn't currently support but 
probably should,
  -  log it in a href=http://nagoya.apache.org/bugzilla/;Bugzilla/a.
  +  log it in a href=http://issues.apache.org/bugzilla/;Bugzilla/a.
 Make sure you spend some time searching the existing bugs to make sure 
it
 hasn't already been logged.  If you're unsure about whether or not to 
log
 something in Bugzilla, it's probably worth bringing it up on the
  
  
  
  1.29  +2 -2  jakarta-commons/httpclient/xdocs/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/status.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- status.xml20 Nov 2004 21:48:47 -  1.28
  +++ status.xml31 Dec 2004 10:24:06 -  1.29
  @@ -30,7 +30,7 @@
   /p
   
   pBug reports targeted for the next release can be found
  - a 
href=http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEWamp;bug_status=ASSIGNEDamp;bug_status=REOPENEDamp;email1=amp;emailtype1=substringamp;emailassigned_to1=1amp;email2=amp;emailtype2=substringamp;emailreporter2=1amp;bugidtype=includeamp;bug_id=amp;changedin=amp;votes=amp;chfieldfrom=amp;chfieldto=Nowamp;chfieldvalue=amp;product=Commonsamp;component=HttpClientamp;target_milestone=3.0+Beta+1amp;short_desc=amp;short_desc_type=allwordssubstramp;long_desc=amp;long_desc_type=allwordssubstramp;bug_file_loc=amp;bug_file_loc_type=allwordssubstramp;keywords=amp;keywords_type=anywordsamp;field0-0-0=noopamp;type0-0-0=noopamp;value0-0-0=amp;cmdtype=doitamp;newqueryname=amp;order=Reuse+same+sort+as+last+time;here/a.
  + a 
href=http://issues.apache.org/bugzilla/buglist.cgi?bug_status=NEWamp;bug_status=ASSIGNEDamp;bug_status=REOPENEDamp;email1=amp;emailtype1=substringamp;emailassigned_to1=1amp;email2=amp;emailtype2=substringamp;emailreporter2=1amp;bugidtype=includeamp;bug_id=amp;changedin=amp;votes=amp;chfieldfrom=amp;chfieldto=Nowamp;chfieldvalue=amp;product=Commonsamp;component=HttpClientamp;target_milestone=3.0+Beta+1amp;short_desc=amp;short_desc_type=allwordssubstramp;long_desc=amp;long_desc_type=allwordssubstramp;bug_file_loc=amp;bug_file_loc_type=allwordssubstramp;keywords=amp;keywords_type=anywordsamp;field0-0-0=noopamp;type0-0-0=noopamp;value0-0-0=amp;cmdtype=doitamp;newqueryname=amp;order=Reuse+same+sort+as+last+time;here/a.
  /p
   /section
   
  
  
  
  1.55  +3 -3  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- project.xml   29 Dec 2004 11:06:42 -  1.54
  +++ project.xml   31 Dec 2004 10:24:06 -  1.55
  @@ -106,14 +106,14 @@
   mailingList
 nameHttpClient Developer List/name
 subscribe[EMAIL PROTECTED]/subscribe
  -  unsubscribe[EMAIL PROTECTED] /unsubscribe
  -  
archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=281/archive
  +  unsubscribe[EMAIL PROTECTED]/unsubscribe
  +  
archivehttp://mail-archives.apache.org/eyebrowse/SummarizeList?listId=281/archive
   /mailingList
   mailingList
 nameHttpClient User List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=280/archive
  +  
archivehttp://mail-archives.apache.org/eyebrowse/SummarizeList?listId=280/archive
   /mailingList
 /mailingLists
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/xdocs/stylesheets project.xml

2004-12-31 Thread oglueck
oglueck 2004/12/31 02:30:26

  Removed: httpclient/xdocs/stylesheets Tag: HTTPCLIENT_2_0_BRANCH
project.xml
  Log:
  not used

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2004-12-31 Thread oglueck
oglueck 2004/12/31 02:31:04

  Modified:httpclient/xdocs Tag: HTTPCLIENT_2_0_BRANCH
troubleshooting.xml status.xml
   httpclient Tag: HTTPCLIENT_2_0_BRANCH project.xml
  Log:
  replace references to nagoya with the correct DNS name
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.3.2.1   +2 -2  jakarta-commons/httpclient/xdocs/troubleshooting.xml
  
  Index: troubleshooting.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/troubleshooting.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- troubleshooting.xml   1 Jun 2003 18:51:23 -   1.3
  +++ troubleshooting.xml   31 Dec 2004 10:31:04 -  1.3.2.1
  @@ -73,7 +73,7 @@
   section name=Reporting Bugs
 pIf you're fairly certain that the problem is a bug in 
emHttpClient/em or
   something that emHttpClient/em doesn't currently support but 
probably should,
  -  log it in a href=http://nagoya.apache.org/bugzilla/;Bugzilla/a.
  +  log it in a href=http://issues.apache.org/bugzilla/;Bugzilla/a.
 Make sure you spend some time searching the existing bugs to make sure 
it
 hasn't already been logged.  If you're unsure about whether or not to 
log
 something in Bugzilla, it's probably worth bringing it up on the
  
  
  
  1.20.2.14 +2 -2  jakarta-commons/httpclient/xdocs/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/status.xml,v
  retrieving revision 1.20.2.13
  retrieving revision 1.20.2.14
  diff -u -r1.20.2.13 -r1.20.2.14
  --- status.xml10 Oct 2004 00:00:35 -  1.20.2.13
  +++ status.xml31 Dec 2004 10:31:04 -  1.20.2.14
  @@ -35,7 +35,7 @@
   /p
   
   pBug reports targeted for the next release can be found
  - a 
href=http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEWamp;bug_status=ASSIGNEDamp;bug_status=REOPENEDamp;email1=amp;emailtype1=substringamp;emailassigned_to1=1amp;email2=amp;emailtype2=substringamp;emailreporter2=1amp;bugidtype=includeamp;bug_id=amp;changedin=amp;votes=amp;chfieldfrom=amp;chfieldto=Nowamp;chfieldvalue=amp;product=Commonsamp;component=HttpClientamp;target_milestone=3.0+Beta+1amp;short_desc=amp;short_desc_type=allwordssubstramp;long_desc=amp;long_desc_type=allwordssubstramp;bug_file_loc=amp;bug_file_loc_type=allwordssubstramp;keywords=amp;keywords_type=anywordsamp;field0-0-0=noopamp;type0-0-0=noopamp;value0-0-0=amp;cmdtype=doitamp;newqueryname=amp;order=Reuse+same+sort+as+last+time;here/a.
  + a 
href=http://issues.apache.org/bugzilla/buglist.cgi?bug_status=NEWamp;bug_status=ASSIGNEDamp;bug_status=REOPENEDamp;email1=amp;emailtype1=substringamp;emailassigned_to1=1amp;email2=amp;emailtype2=substringamp;emailreporter2=1amp;bugidtype=includeamp;bug_id=amp;changedin=amp;votes=amp;chfieldfrom=amp;chfieldto=Nowamp;chfieldvalue=amp;product=Commonsamp;component=HttpClientamp;target_milestone=3.0+Beta+1amp;short_desc=amp;short_desc_type=allwordssubstramp;long_desc=amp;long_desc_type=allwordssubstramp;bug_file_loc=amp;bug_file_loc_type=allwordssubstramp;keywords=amp;keywords_type=anywordsamp;field0-0-0=noopamp;type0-0-0=noopamp;value0-0-0=amp;cmdtype=doitamp;newqueryname=amp;order=Reuse+same+sort+as+last+time;here/a.
  /p
   /section
   
  
  
  
  No   revision
  No   revision
  1.35.2.19 +3 -3  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.35.2.18
  retrieving revision 1.35.2.19
  diff -u -r1.35.2.18 -r1.35.2.19
  --- project.xml   28 Dec 2004 17:11:59 -  1.35.2.18
  +++ project.xml   31 Dec 2004 10:31:04 -  1.35.2.19
  @@ -95,14 +95,14 @@
   mailingList
 nameHttpClient Developer List/name
 subscribe[EMAIL PROTECTED]/subscribe
  -  unsubscribe[EMAIL PROTECTED] /unsubscribe
  -  
archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=281/archive
  +  unsubscribe[EMAIL PROTECTED]/unsubscribe
  +  
archivehttp://mail-archives.apache.org/eyebrowse/SummarizeList?listId=281/archive
   /mailingList
   mailingList
 nameHttpClient User List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=280/archive
  +  
archivehttp://mail-archives.apache.org/eyebrowse/SummarizeList?listId=280/archive
   /mailingList
 /mailingLists
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth DigestScheme.java

2004-12-30 Thread oglueck
oglueck 2004/12/30 03:01:27

  Modified:httpclient/src/java/org/apache/commons/httpclient/auth
DigestScheme.java
  Log:
  added missing log guard
  
  Revision  ChangesPath
  1.22  +6 -4  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
  
  Index: DigestScheme.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/DigestScheme.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DigestScheme.java 13 May 2004 04:02:00 -  1.21
  +++ DigestScheme.java 30 Dec 2004 11:01:27 -  1.22
  @@ -406,7 +406,9 @@
   tmp2.append(md5a2);
   serverDigestValue = tmp2.toString();
   } else {
  -LOG.debug(Using qop method  + qop);
  +if (LOG.isDebugEnabled()) {
  +LOG.debug(Using qop method  + qop);
  +}
   String qopOption = getQopVariantString();
   StringBuffer tmp2 = new StringBuffer(md5a1.length() + 
nonce.length()
   + NC.length() + cnonce.length() + qopOption.length() + 
md5a2.length() + 5);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2004-12-29 Thread oglueck
oglueck 2004/12/29 03:06:42

  Modified:httpclient project.xml
  Log:
  fixed site directory
  
  Revision  ChangesPath
  1.54  +1 -1  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- project.xml   28 Dec 2004 17:11:57 -  1.53
  +++ project.xml   29 Dec 2004 11:06:42 -  1.54
  @@ -26,7 +26,7 @@
 
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?query_format=advancedshort_desc_type=allwordssubstrshort_desc=product=HttpClientcomponent=Commons+HttpClientlong_desc_type=allwordssubstrlong_desc=bug_file_loc_type=allwordssubstrbug_file_loc=keywords_type=anywordskeywords=bug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailassigned_to1=1emailtype1=substringemail1=emailreporter2=1emailtype2=substringemail2=bugidtype=includebug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitorder=Importancefield0-0-0=nooptype0-0-0=noopvalue0-0-0=]]/issueTrackingUrl
   
 siteAddressjakarta.apache.org/siteAddress
  -  siteDirectory/www/jakarta.apache.org/commons/httpclient//siteDirectory
  +  
siteDirectory/www/jakarta.apache.org/commons/httpclient/3.0//siteDirectory
 
distributionDirectory/www/jakarta.apache.org/builds/jakarta-commons/httpclient/distributionDirectory
 repository
   connectionscm:cvs:pserver:[EMAIL 
PROTECTED]:/home/cvspublic:jakarta-commons/httpclient//connection
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2004-12-28 Thread oglueck
oglueck 2004/12/28 09:11:57

  Modified:httpclient project.xml
  Log:
  Fixed issue tracking URLs
  
  Revision  ChangesPath
  1.53  +1 -1  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- project.xml   20 Nov 2004 21:48:47 -  1.52
  +++ project.xml   28 Dec 2004 17:11:57 -  1.53
  @@ -23,7 +23,7 @@
   
 logo/images/httpclient_logo.png/logo
 urlhttp://jakarta.apache.org/commons/httpclient//url
  -  
issueTrackingUrl![CDATA[email1=emailtype1=substringemailassigned_to1=1email2=emailtype2=substringemailreporter2=1bugidtype=includebug_id=changedin=votes=chfieldfrom=chfieldto=Nowchfieldvalue=product=HttpClientcomponent=Commons+HttpClientshort_desc=short_desc_type=allwordssubstrlong_desc=long_desc_type=allwordssubstrbug_file_loc=bug_file_loc_type=allwordssubstrkeywords=keywords_type=anywordsfield0-0-0=nooptype0-0-0=noopvalue0-0-0=cmdtype=doitorder=%27Importance%27]]/issueTrackingUrl
  +  
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?query_format=advancedshort_desc_type=allwordssubstrshort_desc=product=HttpClientcomponent=Commons+HttpClientlong_desc_type=allwordssubstrlong_desc=bug_file_loc_type=allwordssubstrbug_file_loc=keywords_type=anywordskeywords=bug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailassigned_to1=1emailtype1=substringemail1=emailreporter2=1emailtype2=substringemail2=bugidtype=includebug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitorder=Importancefield0-0-0=nooptype0-0-0=noopvalue0-0-0=]]/issueTrackingUrl
   
 siteAddressjakarta.apache.org/siteAddress
 siteDirectory/www/jakarta.apache.org/commons/httpclient//siteDirectory
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2004-12-28 Thread oglueck
oglueck 2004/12/28 09:11:59

  Modified:httpclient Tag: HTTPCLIENT_2_0_BRANCH project.xml
  Log:
  Fixed issue tracking URLs
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.35.2.18 +1 -1  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.35.2.17
  retrieving revision 1.35.2.18
  diff -u -r1.35.2.17 -r1.35.2.18
  --- project.xml   23 Oct 2004 15:59:22 -  1.35.2.17
  +++ project.xml   28 Dec 2004 17:11:59 -  1.35.2.18
  @@ -23,7 +23,7 @@
   
 logo/images/httpclient_logo.png/logo
 urlhttp://jakarta.apache.org/commons/httpclient//url
  -  
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?bug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemail1=emailtype1=substringemailassigned_to1=1email2=emailtype2=substringemailreporter2=1bugidtype=includebug_id=changedin=votes=chfieldfrom=chfieldto=Nowchfieldvalue=product=HttpClientcomponent=Commons+HttpClientshort_desc=short_desc_type=allwordssubstrlong_desc=long_desc_type=allwordssubstrbug_file_loc=bug_file_loc_type=allwordssubstrkeywords=keywords_type=anywordsfield0-0-0=nooptype0-0-0=noopvalue0-0-0=cmdtype=doitorder=%27Importance%27]]/issueTrackingUrl
  +  
issueTrackingUrl![CDATA[http://issues.apache.org/bugzilla/buglist.cgi?short_desc_type=allwordssubstrproduct=HttpClientcomponent=Commons+HttpClientversion=2.0+Finallong_desc_type=allwordssubstrbug_file_loc_type=allwordssubstrkeywords_type=anywordsbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDemailtype1=substringemailtype2=substringbugidtype=includeorder=Importancefield0-0-0=nooptype0-0-0=noopquery_format=advancedshort_desc=long_desc=bug_file_loc=keywords=emailassigned_to1=1email1=emailreporter2=1email2=bug_id=votes=chfieldfrom=chfieldto=Nowchfieldvalue=cmdtype=doitvalue0-0-0=]]/issueTrackingUrl
   
 siteAddressjakarta.apache.org/siteAddress
 siteDirectory/www/jakarta.apache.org/commons/httpclient//siteDirectory
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestPostMethod.java

2004-12-10 Thread oglueck
oglueck 2004/12/10 08:23:39

  Modified:httpclient/src/test/org/apache/commons/httpclient
TestPostMethod.java
  Log:
  added test
  
  Revision  ChangesPath
  1.4   +8 -4  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestPostMethod.java
  
  Index: TestPostMethod.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestPostMethod.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestPostMethod.java   1 Nov 2004 02:21:15 -   1.3
  +++ TestPostMethod.java   10 Dec 2004 16:23:39 -  1.4
  @@ -94,6 +94,10 @@
   assertEquals(name=valuename1=value1name2=value2hasSpace=a+b+c+d,
   getRequestAsString(post.getRequestEntity()));
   
  +post.setRequestBody(new NameValuePair[]{ new 
NameValuePair(escaping, ,[EMAIL PROTECTED]()=?:;}{[]$) });
  +
assertEquals(escaping=%2C.-%F6%E4%FC%21%2B%40%23*%26%28%29%3D%3F%3A%3B%7D%7B%5B%5D%24,
  +getRequestAsString(post.getRequestEntity()));
  +
   }
   
   public void testPostSetRequestBody() throws Exception {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2004-10-01 Thread oglueck
oglueck 2004/10/01 02:38:16

  Modified:httpclient project.xml
  Log:
  added branch, license information
  added personal information
  cleaned build information
  
  Revision  ChangesPath
  1.50  +25 -10jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- project.xml   19 Sep 2004 19:38:13 -  1.49
  +++ project.xml   1 Oct 2004 09:38:16 -   1.50
  @@ -90,6 +90,12 @@
 tagHTTPCLIENT_2_0_ALPHA1/tag
   /version
 /versions
  +  
  +  branches
  +branch
  +  tagHTTPCLIENT_2_0_BRANCH/tag
  +/branch
  +  /branches
   
 mailingLists
   mailingList
  @@ -150,6 +156,10 @@
 roles
   roleJava Developer/role
 /roles
  +  urlhttp://www.odi.ch//url
  +  !-- don't include this until http://jira.codehaus.org/browse/MPXDOC-121 is 
resolved
  +  timezone1/timezone
  +  --
   /developer
   developer
 nameSung-Gu/name
  @@ -252,6 +262,14 @@
   /contributor
 /contributors
   
  +  licenses
  +license
  +  nameApache License/name
  +  urlhttp://www.apache.org/licenses/LICENSE-2.0/url
  +  distributionrepo/distribution
  +/license
  +  /licenses
  +
 dependencies
   dependency
 idjunit/id
  @@ -270,20 +288,17 @@
   /dependency
 /dependencies
   
  -build
  +  build
   nagEmailAddress[EMAIL PROTECTED]/nagEmailAddress
   sourceDirectorysrc/java/sourceDirectory
   unitTestSourceDirectorysrc/test/unitTestSourceDirectory
  -integrationUnitTestSourceDirectory/
   aspectSourceDirectory/
  -
  -unitTest
  -includes
  -include**/TestNoHost.java/include
  -/includes
  -/unitTest
  - jars/jars
  -/build
  +unitTest
  +  includes
  +include**/TestNoHost.java/include
  +  /includes
  +/unitTest
  +  /build
   
 reports
reportmaven-changelog-plugin/report
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpsURL.java HttpURL.java

2004-09-30 Thread oglueck
oglueck 2004/09/30 10:26:27

  Modified:httpclient/src/test/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH TestURI.java
   httpclient/src/java/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH HttpsURL.java HttpURL.java
  Log:
  Fixed escaping problem in userinfo:
   * Added test cases.
   * Changed the contract of all HttpURL and HttpsURL constructors accepting a 
userinfo field to expect the userinfo in URL escaped form.
   * Removed some code duplication.
  
  PR: 28728
  Reviewed by: Michael Becke
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.4.2.7   +19 -9 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestURI.java
  
  Index: TestURI.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestURI.java,v
  retrieving revision 1.4.2.6
  retrieving revision 1.4.2.7
  diff -u -r1.4.2.6 -r1.4.2.7
  --- TestURI.java  14 May 2004 09:47:36 -  1.4.2.6
  +++ TestURI.java  30 Sep 2004 17:26:27 -  1.4.2.7
  @@ -188,11 +188,16 @@
   assertEquals(http://localhost/;, url.toString());
   assertEquals(user:[EMAIL PROTECTED], url.getAuthority());
   
  -url = new HttpURL(user, pass#, localhost, 8080, /);
  +url = new HttpURL(user#@, pass#@, localhost, 8080, /);
   assertEquals(http://localhost:8080/;, url.toString());
  -assertEquals(user:pass#, url.getUserinfo());
  -assertEquals(user:pass%23, url.getEscapedUserinfo());
  +assertEquals(user#@:pass#@, url.getUserinfo());
  +assertEquals(user%23%40:pass%23%40, url.getEscapedUserinfo());
   
  +url = new HttpURL(user%23%40:pass%23%40, localhost, 8080, /);
  +assertEquals(http://localhost:8080/;, url.toString());
  +assertEquals(user#@:pass#@, url.getUserinfo());
  +assertEquals(user%23%40:pass%23%40, url.getEscapedUserinfo());
  +
   url = new HttpURL(localhost, 8080, /);
   assertEquals(http://localhost:8080/;, url.toString());
   url.setRawUserinfo(user.toCharArray(), password.toCharArray());
  @@ -207,10 +212,15 @@
   assertEquals(https://localhost/;, url.toString());
   assertEquals(user:[EMAIL PROTECTED], url.getAuthority());
   
  -url = new HttpsURL(user, pass#, localhost, 8080, /);
  +url = new HttpsURL(user#@, pass#@, localhost, 8080, /);
  +assertEquals(https://localhost:8080/;, url.toString());
  +assertEquals(user#@:pass#@, url.getUserinfo());
  +assertEquals(user%23%40:pass%23%40, url.getEscapedUserinfo());
  +
  +url = new HttpsURL(user%23%40:pass%23%40, localhost, 8080, /);
   assertEquals(https://localhost:8080/;, url.toString());
  -assertEquals(user:pass#, url.getUserinfo());
  -assertEquals(user:pass%23, url.getEscapedUserinfo());
  +assertEquals(user#@:pass#@, url.getUserinfo());
  +assertEquals(user%23%40:pass%23%40, url.getEscapedUserinfo());
   
   url = new HttpsURL(localhost, 8080, /);
   assertEquals(https://localhost:8080/;, url.toString());
  
  
  
  No   revision
  No   revision
  1.6.2.4   +45 -30
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java
  
  Index: HttpsURL.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java,v
  retrieving revision 1.6.2.3
  retrieving revision 1.6.2.4
  diff -u -r1.6.2.3 -r1.6.2.4
  --- HttpsURL.java 14 May 2004 09:47:36 -  1.6.2.3
  +++ HttpsURL.java 30 Sep 2004 17:26:27 -  1.6.2.4
  @@ -122,7 +122,6 @@
*/
   public HttpsURL(String host, int port, String path) throws URIException {
   this(null, host, port, path, null, null);
  -checkValid();
   }
   
   
  @@ -140,7 +139,6 @@
   throws URIException {
   
   this(null, host, port, path, query, null);
  -checkValid();
   }
   
   
  @@ -156,10 +154,7 @@
   public HttpsURL(String user, String password, String host)
   throws URIException {
   
  -this((user == null) ? null : user 
  -+ ((password == null) ?  : ':' +  password),
  -host, -1, null, null, null);
  -checkValid();
  +this(user, password, host, -1, null, null, null);
   }
   
   
  @@ -176,10 +171,7 @@
   public HttpsURL(String user, String password, String host, int port)
   throws URIException {
   
  -this((user == null) ? null : user 
  -+ ((password == null) ?  : ':' +  password),
  -host, port, null, null, null);
  -checkValid

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestURI.java

2004-09-30 Thread oglueck
oglueck 2004/09/30 10:26:41

  Modified:httpclient/src/java/org/apache/commons/httpclient
HttpsURL.java HttpURL.java
   httpclient/src/test/org/apache/commons/httpclient
TestURI.java
  Log:
  Fixed escaping problem in userinfo:
   * Added test cases.
   * Changed the contract of all HttpURL and HttpsURL constructors accepting a 
userinfo field to expect the userinfo in URL escaped form.
   * Removed some code duplication.
  
  PR: 28728
  Reviewed by: Michael Becke
  
  Revision  ChangesPath
  1.11  +45 -30
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java
  
  Index: HttpsURL.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- HttpsURL.java 14 May 2004 09:47:34 -  1.10
  +++ HttpsURL.java 30 Sep 2004 17:26:41 -  1.11
  @@ -120,7 +120,6 @@
*/
   public HttpsURL(String host, int port, String path) throws URIException {
   this(null, host, port, path, null, null);
  -checkValid();
   }
   
   
  @@ -138,7 +137,6 @@
   throws URIException {
   
   this(null, host, port, path, query, null);
  -checkValid();
   }
   
   
  @@ -154,10 +152,7 @@
   public HttpsURL(String user, String password, String host)
   throws URIException {
   
  -this((user == null) ? null : user 
  -+ ((password == null) ?  : ':' +  password),
  -host, -1, null, null, null);
  -checkValid();
  +this(user, password, host, -1, null, null, null);
   }
   
   
  @@ -174,10 +169,7 @@
   public HttpsURL(String user, String password, String host, int port)
   throws URIException {
   
  -this((user == null) ? null : user 
  -+ ((password == null) ?  : ':' +  password),
  -host, port, null, null, null);
  -checkValid();
  +this(user, password, host, port, null, null, null);
   }
   
   
  @@ -195,10 +187,7 @@
   public HttpsURL(String user, String password, String host, int port,
   String path) throws URIException {
   
  -this((user == null) ? null : user 
  -+ ((password == null) ?  : ':' +  password),
  -host, port, path, null, null);
  -checkValid();
  +this(user, password, host, port, path, null, null);
   }
   
   
  @@ -217,10 +206,7 @@
   public HttpsURL(String user, String password, String host, int port,
   String path, String query) throws URIException {
   
  -this((user == null) ? null : user 
  -+ ((password == null) ?  : ':' + password),
  -host, port, path, query, null);
  -checkValid();
  +this(user, password, host, port, path, query, null);
   }
   
   
  @@ -238,14 +224,17 @@
   throws URIException {
   
   this(null, host, -1, path, query, fragment);
  -checkValid();
   }
   
   
   /**
* Construct a HTTPS URL from given components.
*
  - * @param userinfo the userinfo string
  + * Note: The codeuserinfo/code format is normally
  + * codelt;usernamegt;:lt;passwordgt;/code where
  + * username and password must both be URL escaped.
  + *  
  + * @param userinfo the userinfo string whose parts are URL escaped
* @param host the host string
* @param path the path string
* @param query the query string
  @@ -257,14 +246,17 @@
   String fragment) throws URIException {
   
   this(userinfo, host, -1, path, query, fragment);
  -checkValid();
   }
   
   
   /**
* Construct a HTTPS URL from given components.
*
  - * @param userinfo the userinfo string
  + * Note: The codeuserinfo/code format is normally
  + * codelt;usernamegt;:lt;passwordgt;/code where
  + * username and password must both be URL escaped.
  + *  
  + * @param userinfo the userinfo string whose parts are URL escaped
* @param host the host string
* @param port the port number
* @param path the path string
  @@ -275,14 +267,17 @@
   throws URIException {
   
   this(userinfo, host, port, path, null, null);
  -checkValid();
   }
   
   
   /**
* Construct a HTTPS URL from given components.
*
  - * @param userinfo the userinfo string
  + * Note: The codeuserinfo/code format is normally
  + * codelt;usernamegt;:lt;passwordgt;/code where
  + * username and password must both be URL escaped.
  + *  
  + * @param userinfo the userinfo string whose parts are URL escaped
* @param host the host string
* @param port the port

cvs commit: jakarta-commons/httpclient/xdocs preference-api.xml

2004-09-22 Thread oglueck
oglueck 2004/09/22 10:23:33

  Modified:httpclient/xdocs preference-api.xml
  Log:
  added documentation of new parameter
  
  Revision  ChangesPath
  1.3   +13 -1 jakarta-commons/httpclient/xdocs/preference-api.xml
  
  Index: preference-api.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/preference-api.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- preference-api.xml16 Sep 2004 06:24:43 -  1.2
  +++ preference-api.xml22 Sep 2004 17:23:33 -  1.3
  @@ -381,6 +381,18 @@
  /p
 /td
   /tr
  +tr
  +  tdphttp.method.response.buffer.warnlimit/p/td
  +  tdpInteger/p/td
  +  tdpThe maximum buffered response size (in bytes) that triggers no 
warning. Buffered
  + responses exceeding this size will trigger a warning in the log. 
If not set, the
  + limit is 1 MB.
  +  /p
  +  /td
  +  td
  +pcodelt;undefinedgt;/code/p
  +  /td
  +/tr
 /table
  p
Whenever a parameter is left undefined (no value is explicitly set 
anywhere in 
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestMethodsExternalHost.java

2004-09-17 Thread oglueck
oglueck 2004/09/17 00:43:28

  Modified:httpclient/src/test/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH TestMethodsExternalHost.java
  Log:
  Cleaned up some code and deprecation warnings.
  Do nut bugger Sun with our testing, but use ASF servers. Sun's one resulted in a 
failed test case anyway.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.9.2.2   +9 -9  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java
  
  Index: TestMethodsExternalHost.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java,v
  retrieving revision 1.9.2.1
  retrieving revision 1.9.2.2
  diff -u -r1.9.2.1 -r1.9.2.2
  --- TestMethodsExternalHost.java  22 Feb 2004 18:21:16 -  1.9.2.1
  +++ TestMethodsExternalHost.java  17 Sep 2004 07:43:27 -  1.9.2.2
  @@ -54,10 +54,10 @@
   
   // -- Constants
   
  -private static final String externalHost = java.sun.com;
  +private static final String externalHost = jakarta.apache.org;
   private static final int externalPort = 80;
   private static final String externalPath = /index.html;
  -private static final String externalUri = http://java.sun.com/index.html;;
  +private static final String externalUri = http://+ externalHost + 
externalPath;
   private final String PROXY_HOST = 
System.getProperty(httpclient.test.proxyHost);
   private final String PROXY_PORT = 
System.getProperty(httpclient.test.proxyPort);
   private final String PROXY_USER = 
System.getProperty(httpclient.test.proxyUser);
  @@ -88,7 +88,7 @@
   if (PROXY_HOST != null) {
   if (PROXY_USER != null) {
   HttpState state = client.getState();
  -state.setProxyCredentials(null, new UsernamePasswordCredentials(
  +state.setProxyCredentials(null, PROXY_HOST, new 
UsernamePasswordCredentials(
   PROXY_USER, PROXY_PASS));
   }
   client.getHostConfiguration().setProxy(PROXY_HOST, 
Integer.parseInt(PROXY_PORT));
  @@ -142,7 +142,7 @@
   fail(Unable to execute method :  + t.toString());
   }
   
  -method.recycle();
  +method = new GetMethod(externalUri);
   method.setPath(externalPath);
   executeMethod();
   
  @@ -200,7 +200,7 @@
   
   // this file should not exist
   method = new 
GetMethod(http://www.pc.ibm.com/us/accessories/monitors/p_allmodelos.html;);
  -int statusCode = client.executeMethod(method);
  +client.executeMethod(method);
   
   assertEquals(404, method.getStatusCode());
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpMethodBase.java

2004-09-17 Thread oglueck
oglueck 2004/09/17 00:51:41

  Modified:httpclient/src/java/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH HttpMethodBase.java
  Log:
  add API Doc about buffering
  add a warning if the buffered content length is unknown or  1 MB
  optimization of buffer allocation
  PR: 31246, 30388
  Reviewed by: Oleg Kalnichevski
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.159.2.32 +29 -7 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
  
  Index: HttpMethodBase.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
  retrieving revision 1.159.2.31
  retrieving revision 1.159.2.32
  diff -u -r1.159.2.31 -r1.159.2.32
  --- HttpMethodBase.java   19 Aug 2004 21:38:12 -  1.159.2.31
  +++ HttpMethodBase.java   17 Sep 2004 07:51:40 -  1.159.2.32
  @@ -223,6 +223,12 @@
   /** Number of milliseconds to wait for 100-contunue response. */
   private static final int RESPONSE_WAIT_TIME_MS = 3000;
   
  +/** Maximum buffered response size (in bytes) that triggers no warning. */
  +private static final int BUFFER_WARN_TRIGGER_LIMIT = 1024*1024; //1 MB
  +
  +/** Default initial size of the response buffer if content length is unknown. */
  +private static final int DEFAULT_INITIAL_BUFFER_SIZE = 4*1024; // 4 kB
  +
   // --- Constructors
   
   /**
  @@ -669,7 +675,12 @@
   
   /**
* Returns the response body of the HTTP method, if any, as an array of bytes.
  - * If response body is not available or cannot be read, returns ttnull/tt
  + * If response body is not available or cannot be read, returns ttnull/tt.
  + * 
  + * Note: This will cause the entire response body to be buffered in memory. A
  + * malicious server may easily exhaust all the VM memory. It is strongly
  + * recommended, to use getResponseAsStream if the content length of the response
  + * is unknown or resonably large.
* 
* @return The response body.
*/
  @@ -678,8 +689,14 @@
   try {
   InputStream instream = getResponseBodyAsStream();
   if (instream != null) {
  +int contentLength = getResponseContentLength();
  +if ((contentLength == -1) || (contentLength  
BUFFER_WARN_TRIGGER_LIMIT)) {
  +LOG.warn(Going to buffer response body of large or unknown 
size. 
  ++Using getResponseAsStream instead is 
recommended.);
  +}
   LOG.debug(Buffering response body);
  -ByteArrayOutputStream outstream = new ByteArrayOutputStream();
  +ByteArrayOutputStream outstream = new ByteArrayOutputStream(
  +contentLength  0 ? contentLength : 
DEFAULT_INITIAL_BUFFER_SIZE);
   byte[] buffer = new byte[4096];
   int len;
   while ((len = instream.read(buffer))  0) {
  @@ -723,7 +740,12 @@
* If response body is not available or cannot be read, returns ttnull/tt
* The string conversion on the data is done using the character encoding 
specified
* in ttContent-Type/tt header.
  - *
  + * 
  + * Note: This will cause the entire response body to be buffered in memory. A
  + * malicious server may easily exhaust all the VM memory. It is strongly
  + * recommended, to use getResponseAsStream if the content length of the response
  + * is unknown or resonably large.
  + * 
* @return The response body.
*/
   public String getResponseBodyAsString() {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestMethodsExternalHost.java

2004-09-17 Thread oglueck
oglueck 2004/09/17 00:57:49

  Modified:httpclient/src/test/org/apache/commons/httpclient
TestMethodsExternalHost.java
  Log:
  Do nut bugger Sun with our testing, but use ASF servers. Sun's one resulted in a 
failed test case anyway.
  
  Revision  ChangesPath
  1.15  +7 -7  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java
  
  Index: TestMethodsExternalHost.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestMethodsExternalHost.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TestMethodsExternalHost.java  13 Jun 2004 20:22:19 -  1.14
  +++ TestMethodsExternalHost.java  17 Sep 2004 07:57:49 -  1.15
  @@ -56,10 +56,10 @@
   
   // -- Constants
   
  -private static final String externalHost = java.sun.com;
  +private static final String externalHost = jakarta.apache.org;
   private static final int externalPort = 80;
   private static final String externalPath = /index.html;
  -private static final String externalUri = http://java.sun.com/index.html;;
  +private static final String externalUri = http://+ externalHost + 
externalPath;
   private final String PROXY_HOST = 
System.getProperty(httpclient.test.proxyHost);
   private final String PROXY_PORT = 
System.getProperty(httpclient.test.proxyPort);
   private final String PROXY_USER = 
System.getProperty(httpclient.test.proxyUser);
  @@ -200,7 +200,7 @@
   
   // this file should not exist
   method = new 
GetMethod(http://www.pc.ibm.com/us/accessories/monitors/p_allmodelos.html;);
  -int statusCode = client.executeMethod(method);
  +client.executeMethod(method);
   
   assertEquals(404, method.getStatusCode());
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/params HttpMethodParams.java

2004-09-17 Thread oglueck
oglueck 2004/09/17 01:00:51

  Modified:httpclient/src/java/org/apache/commons/httpclient
HttpMethodBase.java
   httpclient/src/java/org/apache/commons/httpclient/params
HttpMethodParams.java
  Log:
  add API Doc about buffering
  add a warning if the buffered content length is unknown or  1 MB
  add config parameter for the above warning trigger limit
  optimization of buffer allocation
  PR: 31246, 30388
  Reviewed by: Oleg Kalnichevski
  
  Revision  ChangesPath
  1.215 +29 -6 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
  
  Index: HttpMethodBase.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
  retrieving revision 1.214
  retrieving revision 1.215
  diff -u -r1.214 -r1.215
  --- HttpMethodBase.java   16 Sep 2004 06:46:30 -  1.214
  +++ HttpMethodBase.java   17 Sep 2004 08:00:51 -  1.215
  @@ -181,6 +181,9 @@
   
   /** Actual cookie policy */
   private CookieSpec cookiespec = null;
  +
  +/** Default initial size of the response buffer if content length is unknown. */
  +private static final int DEFAULT_INITIAL_BUFFER_SIZE = 4*1024; // 4 kB
   
   // --- Constructors
   
  @@ -667,6 +670,11 @@
* Returns the response body of the HTTP method, if any, as an array of bytes.
* If response body is not available or cannot be read, returns ttnull/tt
* 
  + * Note: This will cause the entire response body to be buffered in memory. A
  + * malicious server may easily exhaust all the VM memory. It is strongly
  + * recommended, to use getResponseAsStream if the content length of the response
  + * is unknown or resonably large.
  + *  
* @return The response body.
* 
* @throws IOException If an I/O (transport) problem occurs while obtaining the 
  @@ -676,8 +684,18 @@
   if (this.responseBody == null) {
   InputStream instream = getResponseBodyAsStream();
   if (instream != null) {
  +long contentLength = getResponseContentLength();
  +if (contentLength  Integer.MAX_VALUE) { //guard below cast from 
overflow
  +throw new IOException(Content too large to be buffered: + 
contentLength + bytes);
  +}
  +int limit = 
getParams().getIntParameter(HttpMethodParams.BUFFER_WARN_TRIGGER_LIMIT, 1024*1024);
  +if ((contentLength == -1) || (contentLength  limit)) {
  +LOG.warn(Going to buffer response body of large or unknown 
size. 
  ++Using getResponseAsStream instead is recommended.);
  +}
   LOG.debug(Buffering response body);
  -ByteArrayOutputStream outstream = new ByteArrayOutputStream();
  +ByteArrayOutputStream outstream = new ByteArrayOutputStream(
  +contentLength  0 ? (int) contentLength : 
DEFAULT_INITIAL_BUFFER_SIZE);
   byte[] buffer = new byte[4096];
   int len;
   while ((len = instream.read(buffer))  0) {
  @@ -717,7 +735,12 @@
* If response body is not available or cannot be read, returns ttnull/tt
* The string conversion on the data is done using the character encoding 
specified
* in ttContent-Type/tt header.
  - *
  + * 
  + * Note: This will cause the entire response body to be buffered in memory. A
  + * malicious server may easily exhaust all the VM memory. It is strongly
  + * recommended, to use getResponseAsStream if the content length of the response
  + * is unknown or resonably large.
  + * 
* @return The response body.
* 
* @throws IOException If an I/O (transport) problem occurs while obtaining the 
  
  
  
  1.15  +13 -4 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/params/HttpMethodParams.java
  
  Index: HttpMethodParams.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/params/HttpMethodParams.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- HttpMethodParams.java 14 Sep 2004 20:11:32 -  1.14
  +++ HttpMethodParams.java 17 Sep 2004 08:00:51 -  1.15
  @@ -249,6 +249,15 @@
   public static final String RETRY_HANDLER = http.method.retry-handler;
   
   /**
  + * Sets the maximum buffered response size (in bytes) that triggers no warning. 
Buffered
  + * responses exceeding this size will trigger a warning in the log.
  + * p
  + * This parameter

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpsURL.java HttpURL.java

2004-01-29 Thread oglueck
oglueck 2004/01/29 10:33:32

  Modified:httpclient/src/test/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH TestURI.java
   httpclient/src/java/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH HttpsURL.java HttpURL.java
  Log:
  fixed: getScheme() and getPort() were returning wrong defaults for HttpsURL
  added: testcase
  
  PR: 26328
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.4.2.2   +13 -3 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestURI.java
  
  Index: TestURI.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestURI.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- TestURI.java  23 Sep 2003 13:04:14 -  1.4.2.1
  +++ TestURI.java  29 Jan 2004 18:33:32 -  1.4.2.2
  @@ -112,6 +112,16 @@
   
   }
   
  +public void testUrl() throws URIException {
  +URI url = new HttpURL(http://jakarta.apache.org;);
  +assertEquals(80, url.getPort());
  +assertEquals(http, url.getScheme());
  +
  +url = new HttpsURL(https://jakarta.apache.org;);
  +assertEquals(443, url.getPort());
  +assertEquals(https, url.getScheme());
  +}
  +
   /**
* Tests the URI(URI, String) constructor.  This tests URIs ability to
* resolve relative URIs.
  
  
  
  No   revision
  No   revision
  1.6.2.1   +34 -3 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java
  
  Index: HttpsURL.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- HttpsURL.java 13 Feb 2003 05:08:18 -  1.6
  +++ HttpsURL.java 29 Jan 2004 18:33:32 -  1.6.2.1
  @@ -440,6 +440,37 @@
*/
   static final long serialVersionUID = 887844277028676648L;
   
  +// - The scheme
  +
  +/**
  + * Get the scheme.  You can get the scheme explicitly.
  + *
  + * @return the scheme
  + */
  +public char[] getRawScheme() {
  +return (_scheme == null) ? null : HttpsURL.DEFAULT_SCHEME;
  +}
  +
  +
  +/**
  + * Get the scheme.  You can get the scheme explicitly.
  + *
  + * @return the scheme null if empty or undefined
  + */
  +public String getScheme() {
  +return (_scheme == null) ? null : new String(HttpsURL.DEFAULT_SCHEME);
  +}
  +
  +// --- The port
  +
  +/**
  + * Get the port number.
  + * @return the port number
  + */
  +public int getPort() {
  +return (_port == -1) ? HttpsURL.DEFAULT_PORT : _port;
  +}
  +
   //  Utility
   
   /**
  
  
  
  1.12.2.1  +6 -6  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpURL.java
  
  Index: HttpURL.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpURL.java,v
  retrieving revision 1.12
  retrieving revision 1.12.2.1
  diff -u -r1.12 -r1.12.2.1
  --- HttpURL.java  4 Apr 2003 02:37:02 -   1.12
  +++ HttpURL.java  29 Jan 2004 18:33:32 -  1.12.2.1
  @@ -444,7 +444,7 @@
* @return the scheme
*/
   public char[] getRawScheme() {
  -return (_scheme == null) ? null : DEFAULT_SCHEME;
  +return (_scheme == null) ? null : HttpURL.DEFAULT_SCHEME;
   }
   
   
  @@ -454,7 +454,7 @@
* @return the scheme null if empty or undefined
*/
   public String getScheme() {
  -return (_scheme == null) ? null : new String(DEFAULT_SCHEME);
  +return (_scheme == null) ? null : new String(HttpURL.DEFAULT_SCHEME);
   }
   
   // --- The port
  @@ -464,7 +464,7 @@
* @return the port number
*/
   public int getPort() {
  -return (_port == -1) ? DEFAULT_PORT : _port;
  +return (_port == -1) ? HttpURL.DEFAULT_PORT : _port;
   }
   
   // --- The userinfo
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestURI.java

2004-01-29 Thread oglueck
oglueck 2004/01/29 10:39:34

  Modified:httpclient/src/java/org/apache/commons/httpclient
HttpsURL.java HttpURL.java
   httpclient/src/test/org/apache/commons/httpclient
TestURI.java
  Log:
  fixed: getScheme() and getPort() were returning wrong defaults for HttpsURL
  added: testcase
  
  PR: 26328
  
  Revision  ChangesPath
  1.7   +34 -3 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java
  
  Index: HttpsURL.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpsURL.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HttpsURL.java 13 Feb 2003 05:08:18 -  1.6
  +++ HttpsURL.java 29 Jan 2004 18:39:34 -  1.7
  @@ -440,6 +440,37 @@
*/
   static final long serialVersionUID = 887844277028676648L;
   
  +// - The scheme
  +
  +/**
  + * Get the scheme.  You can get the scheme explicitly.
  + *
  + * @return the scheme
  + */
  +public char[] getRawScheme() {
  +return (_scheme == null) ? null : HttpsURL.DEFAULT_SCHEME;
  +}
  +
  +
  +/**
  + * Get the scheme.  You can get the scheme explicitly.
  + *
  + * @return the scheme null if empty or undefined
  + */
  +public String getScheme() {
  +return (_scheme == null) ? null : new String(HttpsURL.DEFAULT_SCHEME);
  +}
  +
  +// --- The port
  +
  +/**
  + * Get the port number.
  + * @return the port number
  + */
  +public int getPort() {
  +return (_port == -1) ? HttpsURL.DEFAULT_PORT : _port;
  +}
  +
   //  Utility
   
   /**
  
  
  
  1.13  +6 -6  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpURL.java
  
  Index: HttpURL.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpURL.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HttpURL.java  4 Apr 2003 02:37:02 -   1.12
  +++ HttpURL.java  29 Jan 2004 18:39:34 -  1.13
  @@ -444,7 +444,7 @@
* @return the scheme
*/
   public char[] getRawScheme() {
  -return (_scheme == null) ? null : DEFAULT_SCHEME;
  +return (_scheme == null) ? null : HttpURL.DEFAULT_SCHEME;
   }
   
   
  @@ -454,7 +454,7 @@
* @return the scheme null if empty or undefined
*/
   public String getScheme() {
  -return (_scheme == null) ? null : new String(DEFAULT_SCHEME);
  +return (_scheme == null) ? null : new String(HttpURL.DEFAULT_SCHEME);
   }
   
   // --- The port
  @@ -464,7 +464,7 @@
* @return the port number
*/
   public int getPort() {
  -return (_port == -1) ? DEFAULT_PORT : _port;
  +return (_port == -1) ? HttpURL.DEFAULT_PORT : _port;
   }
   
   // --- The userinfo
  
  
  
  1.7   +13 -3 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestURI.java
  
  Index: TestURI.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestURI.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestURI.java  23 Sep 2003 13:08:42 -  1.6
  +++ TestURI.java  29 Jan 2004 18:39:34 -  1.7
  @@ -112,6 +112,16 @@
   
   }
   
  +public void testUrl() throws URIException {
  +URI url = new HttpURL(http://jakarta.apache.org;);
  +assertEquals(80, url.getPort());
  +assertEquals(http, url.getScheme());
  +
  +url = new HttpsURL(https://jakarta.apache.org;);
  +assertEquals(443, url.getPort());
  +assertEquals(https, url.getScheme());
  +}
  +
   /**
* Tests the URI(URI, String) constructor.  This tests URIs ability to
* resolve relative URIs.
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestProxy.java

2003-12-11 Thread oglueck
oglueck 2003/12/11 01:19:19

  Modified:httpclient/src/test/org/apache/commons/httpclient/server
TransparentProxyRequestHandler.java
ProxyAuthRequestHandler.java SimpleProxy.java
SimpleHttpServerConnection.java
   httpclient/src/test/org/apache/commons/httpclient
TestProxy.java
  Log:
  code formatting, fixed TABs
  
  Revision  ChangesPath
  1.3   +51 -48
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java
  
  Index: TransparentProxyRequestHandler.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/TransparentProxyRequestHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TransparentProxyRequestHandler.java   5 Dec 2003 21:23:14 -   1.2
  +++ TransparentProxyRequestHandler.java   11 Dec 2003 09:19:18 -  1.3
  @@ -77,54 +77,57 @@
   import org.apache.commons.httpclient.URI;
   
   /**
  - * This request handler can handle the CONNECT method. It does
  - * nothing for any other HTTP methods.
  + * This request handler can handle the CONNECT method. It does nothing for any
  + * other HTTP methods.
* 
* @author Ortwin Glueck
*/
   public class TransparentProxyRequestHandler implements HttpRequestHandler {
   
  - /* (non-Javadoc)
  -  * @see 
org.apache.commons.httpclient.server.HttpRequestHandler#processRequest(org.apache.commons.httpclient.server.SimpleHttpServerConnection)
  -  */
  - public boolean processRequest(SimpleHttpServerConnection conn) throws 
IOException {
  - RequestLine line = conn.getRequestLine();
  - String method = line.getMethod();
  - if (!CONNECT.equalsIgnoreCase(method)) return false;
  - URI url = new HttpURL(line.getUri());
  - handshake(conn, url);
  - return true;
  - }
  +/*
  + * (non-Javadoc)
  + * 
  + * @see 
org.apache.commons.httpclient.server.HttpRequestHandler#processRequest(org.apache.commons.httpclient.server.SimpleHttpServerConnection)
  + */
  +public boolean processRequest(SimpleHttpServerConnection conn) throws 
IOException {
  +RequestLine line = conn.getRequestLine();
  +String method = line.getMethod();
  +if (!CONNECT.equalsIgnoreCase(method))
  +return false;
  +URI url = new HttpURL(line.getUri());
  +handshake(conn, url);
  +return true;
  +}
   
  - private void handshake(SimpleHttpServerConnection conn, URI url) throws 
IOException  {
  - Socket targetSocket = new Socket(url.getHost(), url.getPort());
  - InputStream sourceIn = conn.getInputStream();
  - OutputStream sourceOut = conn.getOutputStream();
  - InputStream targetIn = targetSocket.getInputStream();
  - OutputStream targetOut = targetSocket.getOutputStream();
  +private void handshake(SimpleHttpServerConnection conn, URI url) throws 
IOException {
  +Socket targetSocket = new Socket(url.getHost(), url.getPort());
  +InputStream sourceIn = conn.getInputStream();
  +OutputStream sourceOut = conn.getOutputStream();
  +InputStream targetIn = targetSocket.getInputStream();
  +OutputStream targetOut = targetSocket.getOutputStream();
   
  - ResponseWriter out = conn.getWriter();
  - out.println(HTTP/1.1 200 Connection established);
  - out.flush();
  +ResponseWriter out = conn.getWriter();
  +out.println(HTTP/1.1 200 Connection established);
  +out.flush();
   
  - BidiStreamProxy bdsp = new BidiStreamProxy(sourceIn, sourceOut, 
targetIn, targetOut);
  - bdsp.start();
  - try {
  - bdsp.block();
  - } catch (InterruptedException e) {
  - throw new IOException(e.toString());
  - }
  - }
  - 
  - private void sendHeaders(Header[] headers, OutputStream os) throws IOException 
{
  - Writer out;
  - try {
  - out = new OutputStreamWriter(os, 
HttpConstants.HTTP_ELEMENT_CHARSET);
  - } catch (UnsupportedEncodingException e) {
  - throw new RuntimeException(e.toString());
  - }
  - for (int i=0; iheaders.length; i++) {
  - out.write(headers[i].toExternalForm());
  - }
  - }
  +BidiStreamProxy bdsp = new BidiStreamProxy(sourceIn, sourceOut, targetIn, 
targetOut);
  +bdsp.start();
  +try {
  +bdsp.block();
  +} catch (InterruptedException e) {
  +throw new IOException(e.toString

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient Header.java StatusLine.java

2003-12-05 Thread oglueck
oglueck 2003/12/05 12:18:22

  Modified:httpclient/src/java/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH Header.java StatusLine.java
  Log:
  JavaDoc
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.10.2.2  +9 -5  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Header.java
  
  Index: Header.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Header.java,v
  retrieving revision 1.10.2.1
  retrieving revision 1.10.2.2
  diff -u -r1.10.2.1 -r1.10.2.2
  --- Header.java   1 Nov 2003 21:13:56 -   1.10.2.1
  +++ Header.java   5 Dec 2003 20:18:22 -   1.10.2.2
  @@ -94,7 +94,11 @@
   // - Public Methods
   
   /**
  - * Returns a [EMAIL PROTECTED] String} representation of the header.
  + * Returns a [EMAIL PROTECTED] String} representation of the header in the form:
  + * pre
  + * Name: valueCRLF
  + * /pre
  + * The string is terminated by CRLF.
*
* @return stringHEAD
*/
  
  
  
  1.9.2.2   +5 -5  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/StatusLine.java
  
  Index: StatusLine.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/StatusLine.java,v
  retrieving revision 1.9.2.1
  retrieving revision 1.9.2.2
  diff -u -r1.9.2.1 -r1.9.2.2
  --- StatusLine.java   19 Oct 2003 18:49:56 -  1.9.2.1
  +++ StatusLine.java   5 Dec 2003 20:18:22 -   1.9.2.2
  @@ -199,7 +199,7 @@
   }
   
   /**
  - * Return a string representation of this object.
  + * Return the status line as it was set by the constructor.
* @return a string represenation of this object.
*/
   public final String toString() {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server ProxyAuthRequestHandler.java BidiStreamProxy.java SimpleProxy.java StreamProxy.java TransparentProxyRequestHandler.java ProxyRequestHandler.java

2003-12-05 Thread oglueck
oglueck 2003/12/05 13:02:52

  Added:   httpclient/src/test/org/apache/commons/httpclient/server
Tag: HTTPCLIENT_2_0_BRANCH
ProxyAuthRequestHandler.java BidiStreamProxy.java
SimpleProxy.java StreamProxy.java
TransparentProxyRequestHandler.java
ProxyRequestHandler.java
  Log:
  Added infrastructure to create test cases that involve use of a proxy.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.1   +166 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/ProxyAuthRequestHandler.java
  
  
  
  
  1.1.2.1   +124 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/BidiStreamProxy.java
  
  
  
  
  1.1.2.1   +106 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleProxy.java
  
  
  
  
  1.1.2.1   +142 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/StreamProxy.java
  
  
  
  
  1.1.2.1   +130 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/TransparentProxyRequestHandler.java
  
  
  
  
  1.1.2.1   +143 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/ProxyRequestHandler.java
  
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestProxy.java TestLocalHost.java

2003-12-05 Thread oglueck
oglueck 2003/12/05 13:04:03

  Modified:httpclient/src/test/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH TestLocalHost.java
  Added:   httpclient/src/test/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH TestProxy.java
  Log:
  Added basic proxy tests. Feel free to add more sophisticated stuff.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.8.2.1   +5 -4  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestLocalHost.java
  
  Index: TestLocalHost.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestLocalHost.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- TestLocalHost.java5 Mar 2003 04:02:56 -   1.8
  +++ TestLocalHost.java5 Dec 2003 21:04:03 -   1.8.2.1
  @@ -87,6 +87,7 @@
   suite.addTest(TestTraceMethodLocal.suite());
   suite.addTest(TestHttpConnectionManager.suite());
   suite.addTest(TestWebapp.suite());
  +suite.addTest(TestProxy.suite());
   return suite;
   }
   
  
  
  
  No   revision
  
  Index: TestLocalHost.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestLocalHost.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- TestLocalHost.java5 Mar 2003 04:02:56 -   1.8
  +++ TestLocalHost.java5 Dec 2003 21:04:03 -   1.8.2.1
  @@ -87,6 +87,7 @@
   suite.addTest(TestTraceMethodLocal.suite());
   suite.addTest(TestHttpConnectionManager.suite());
   suite.addTest(TestWebapp.suite());
  +suite.addTest(TestProxy.suite());
   return suite;
   }
   
  
  
  
  No   revision
  
  Index: TestLocalHost.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestLocalHost.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- TestLocalHost.java5 Mar 2003 04:02:56 -   1.8
  +++ TestLocalHost.java5 Dec 2003 21:04:03 -   1.8.2.1
  @@ -87,6 +87,7 @@
   suite.addTest(TestTraceMethodLocal.suite());
   suite.addTest(TestHttpConnectionManager.suite());
   suite.addTest(TestWebapp.suite());
  +suite.addTest(TestProxy.suite());
   return suite;
   }
   
  
  
  
  1.1.2.1   +127 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/Attic/TestProxy.java
  
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server TransparentProxyRequestHandler.java ErrorResponse.java HttpRequestHandler.java SimpleHttpServerConnection.java HttpRequestHandlerChain.java ResponseWriter.java BidiStreamProxy.java GenericResponse.java StreamProxy.java SimpleProxy.java ProxyRequestHandler.java SimpleHttpServer.java ProxyAuthRequestHandler.java RequestLine.java

2003-12-05 Thread oglueck
oglueck 2003/12/05 13:23:15

  Modified:httpclient/src/test/org/apache/commons/httpclient
TestNoHost.java TestWebapp.java
  Added:   httpclient/src/test/org/apache/commons/httpclient
TestProxy.java TestBadContentLength.java
   httpclient/src/test/org/apache/commons/httpclient/server
TransparentProxyRequestHandler.java
ErrorResponse.java HttpRequestHandler.java
SimpleHttpServerConnection.java
HttpRequestHandlerChain.java ResponseWriter.java
BidiStreamProxy.java GenericResponse.java
StreamProxy.java SimpleProxy.java
ProxyRequestHandler.java SimpleHttpServer.java
ProxyAuthRequestHandler.java RequestLine.java
  Log:
  Infrastructure for small local servers for testing.
  Port to HEAD from 2.0 branch.
  
  Submitted by: Christian Kohlschütter
  Reviewed by:  Ortwin Glück
  
  Revision  ChangesPath
  1.27  +5 -4  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestNoHost.java
  
  Index: TestNoHost.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestNoHost.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- TestNoHost.java   19 Oct 2003 18:46:03 -  1.26
  +++ TestNoHost.java   5 Dec 2003 21:23:14 -   1.27
  @@ -108,6 +108,7 @@
   suite.addTest(TestExceptions.suite());
   suite.addTest(TestHttpVersion.suite());
   suite.addTest(TestHttpParser.suite());
  +//TODO enable when ready: suite.addTest(TestBadContentLength.suite());
   return suite;
   }
   
  
  
  
  1.8   +5 -4  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebapp.java
  
  Index: TestWebapp.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestWebapp.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestWebapp.java   12 Feb 2003 12:30:44 -  1.7
  +++ TestWebapp.java   5 Dec 2003 21:23:14 -   1.8
  @@ -102,6 +102,7 @@
   suite.addTest(TestWebappPostMethod.suite());
   suite.addTest(TestWebappMultiPostMethod.suite());
   suite.addTest(TestWebappNoncompliant.suite());
  +suite.addTest(TestProxy.suite());
   return suite;
   }
   
  
  
  
  1.2   +130 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestProxy.java
  
  
  
  
  1.1  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestBadContentLength.java
  
  Index: TestBadContentLength.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestBadContentLength.java,v
 1.1 2003/12/05 21:23:14 oglueck Exp $
   * $Revision: 1.1 $
   * $Date: 2003/12/05 21:23:14 $
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server RequestLine.java

2003-11-24 Thread oglueck
oglueck 2003/11/24 12:39:26

  Modified:httpclient/src/test/org/apache/commons/httpclient/server
Tag: HTTPCLIENT_2_0_BRANCH RequestLine.java
  Log:
  made immutable
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.2   +4 -15 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/RequestLine.java
  
  Index: RequestLine.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/RequestLine.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- RequestLine.java  18 Nov 2003 12:26:38 -  1.1.2.1
  +++ RequestLine.java  24 Nov 2003 20:39:26 -  1.1.2.2
  @@ -68,6 +68,7 @@
   
   /**
* Defines a HTTP request-line, consisting of method name, URI and protocol.
  + * Instances of this class are immutable.
* 
* @author Christian Kohlschuetter
*/
  @@ -107,18 +108,6 @@
   return uri;
   }
   
  -public void setMethod(String string) {
  -method = string;
  -}
  -
  -public void setProtocol(String string) {
  -protocol = string;
  -}
  -
  -public void setUri(String string) {
  -uri = string;
  -}
  -
   public String toString() {
   StringBuffer sb = new StringBuffer();
   if(method != null) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server ResponseWriter.java SimpleHttpServerConnection.java GenericResponse.java HttpRequestHandler.java SimpleHttpServer.java HttpRequestHandlerChain.java

2003-11-24 Thread oglueck
oglueck 2003/11/24 12:41:11

  Modified:httpclient/src/test/org/apache/commons/httpclient/server
Tag: HTTPCLIENT_2_0_BRANCH ResponseWriter.java
SimpleHttpServerConnection.java
GenericResponse.java HttpRequestHandler.java
SimpleHttpServer.java HttpRequestHandlerChain.java
  Log:
  refactored code to be more OO and flexible enough for our needs
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.2   +3 -57 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/ResponseWriter.java
  
  Index: ResponseWriter.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/ResponseWriter.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- ResponseWriter.java   18 Nov 2003 12:26:39 -  1.1.2.1
  +++ ResponseWriter.java   24 Nov 2003 20:41:11 -  1.1.2.2
  @@ -78,7 +78,6 @@
   public class ResponseWriter extends FilterWriter {
   public static final String CRLF = \r\n;
   public static final String ISO_8859_1 = ISO-8859-1;
  -private boolean modified = false;
   private OutputStream outStream;
   private String encoding;
   
  @@ -100,7 +99,6 @@
   
   public void close() throws IOException {
   if(out != null) {
  -modified = true;
   super.close();
   out = null;
   }
  @@ -118,69 +116,17 @@
   
   public void write(byte b) throws IOException {
   super.flush();
  -modified = true;
   outStream.write((int)b);
   }
   public void write(byte[] b) throws IOException {
   super.flush();
  -modified = true;
   outStream.write(b);
   }
   public void write(byte[] b, int off, int len) throws IOException {
   super.flush();
  -modified = true;
   outStream.write(b,off,len);
   }
   
  -/* (non-Javadoc)
  - * @see java.io.Writer#write(char[], int, int)
  - */
  -public void write(char[] cbuf, int off, int len) throws IOException {
  -modified = true;
  -super.write(cbuf, off, len);
  -}
  -
  -/* (non-Javadoc)
  - * @see java.io.Writer#write(int)
  - */
  -public void write(int c) throws IOException {
  -modified = true;
  -super.write(c);
  -}
  -
  -/* (non-Javadoc)
  - * @see java.io.Writer#write(java.lang.String, int, int)
  - */
  -public void write(String str, int off, int len) throws IOException {
  -modified = true;
  -super.write(str, off, len);
  -}
  -
  -/* (non-Javadoc)
  - * @see java.io.Writer#write(char[])
  - */
  -public void write(char[] cbuf) throws IOException {
  -modified = true;
  -super.write(cbuf);
  -}
  -
  -/* (non-Javadoc)
  - * @see java.io.Writer#write(java.lang.String)
  - */
  -public void write(String str) throws IOException {
  -modified = true;
  -super.write(str);
  -}
  -
  -/**
  - * Checks if this PrintWriter has been called
  - * 
  - * @return  true/false
  - */
  -public boolean isModified() {
  -return modified;
  -}
  -
   public void print(String s) throws IOException {
   if (s == null) {
   s = null;
  
  
  
  1.1.2.3   +34 -18
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServerConnection.java
  
  Index: SimpleHttpServerConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServerConnection.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- SimpleHttpServerConnection.java   19 Nov 2003 00:23:30 -  1.1.2.2
  +++ SimpleHttpServerConnection.java   24 Nov 2003 20:41:11 -  1.1.2.3
  @@ -65,6 +65,8 @@
   
   import java.io.IOException;
   import java.io.InputStream;
  +import java.io.OutputStream;
  +import java.io.UnsupportedEncodingException;
   import java.net.Socket;
   import java.net.SocketException;
   
  @@ -86,18 +88,21 @@
   private SimpleHttpServer server;
   private Socket socket;
   private InputStream in;
  -private ResponseWriter out;
  +private OutputStream out;
   
   private int requestNo = 0;
   
   private boolean keepAlive = false;
   
  + private RequestLine requestLine;
  +
  + private Header[] headers;
  +
   public SimpleHttpServerConnection(SimpleHttpServer server, Socket socket) 
throws IOException {
   this.server = server;
   this.socket = socket

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server HttpRequestHandlerChain.java

2003-11-24 Thread oglueck
oglueck 2003/11/24 15:13:22

  Modified:httpclient/src/test/org/apache/commons/httpclient/server
Tag: HTTPCLIENT_2_0_BRANCH
HttpRequestHandlerChain.java
  Log:
  Making this class thread-safe as it is accessed from different threads.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.3   +8 -8  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/HttpRequestHandlerChain.java
  
  Index: HttpRequestHandlerChain.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/HttpRequestHandlerChain.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- HttpRequestHandlerChain.java  24 Nov 2003 20:41:11 -  1.1.2.2
  +++ HttpRequestHandlerChain.java  24 Nov 2003 23:13:22 -  1.1.2.3
  @@ -84,22 +84,22 @@
   public HttpRequestHandlerChain() {
   }
   
  -public void clear() {
  +public synchronized void clear() {
   subhandlers.clear();
   }
  -public void prependHandler(HttpRequestHandler handler) {
  +public synchronized void prependHandler(HttpRequestHandler handler) {
   subhandlers.add(0,handler);
   }
  -public void appendHandler(HttpRequestHandler handler) {
  +public synchronized void appendHandler(HttpRequestHandler handler) {
   subhandlers.add(handler);
   }
   
  -public boolean processRequest(SimpleHttpServerConnection conn)  throws 
IOException {
  +public synchronized boolean processRequest(SimpleHttpServerConnection conn)  
throws IOException {
   
   for(Iterator it=subhandlers.iterator();it.hasNext();) {
   HttpRequestHandler h = (HttpRequestHandler)it.next();
   boolean stop = h.processRequest(conn);
  -if(stop) {
  +if (stop) {
   return true;
   }
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server SimpleHttpServer.java

2003-11-24 Thread oglueck
oglueck 2003/11/24 15:14:33

  Modified:httpclient/src/test/org/apache/commons/httpclient/server
Tag: HTTPCLIENT_2_0_BRANCH SimpleHttpServer.java
  Log:
  Added support for systems with more than one network interface.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.4   +12 -6 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServer.java
  
  Index: SimpleHttpServer.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServer.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- SimpleHttpServer.java 24 Nov 2003 20:41:11 -  1.1.2.3
  +++ SimpleHttpServer.java 24 Nov 2003 23:14:33 -  1.1.2.4
  @@ -119,13 +119,21 @@
   }
   
   /**
  - * Returns the TCP port on which this HTTP server instance is bound to.
  + * Returns the TCP port that this HTTP server instance is bound to.
*
* @return  TCP port, or -1 if not running
*/
   public int getLocalPort() {
   return server.getLocalPort();
   }
  +
  +/**
  + * Returns the IP address that this HTTP server instance is bound to.
  + * @return String representation of the IP address or codenull/code if not 
running
  + */
  +public String getLocalAddress() {
  + return server.getInetAddress().getHostAddress();
  +}
   
   /**
* Checks if this HTTP server instance is running.
  @@ -202,8 +210,6 @@
   conn.connectionClose();
   
ErrorResponse.getInstance().getResponse(HttpStatus.SC_SERVICE_UNAVAILABLE).processRequest(conn);
   }
  -
  -conn.getWriter().flush();
   }
   
   public void run() {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server SimpleHttpServerConnection.java

2003-11-24 Thread oglueck
oglueck 2003/11/24 15:16:42

  Modified:httpclient/src/test/org/apache/commons/httpclient/server
Tag: HTTPCLIENT_2_0_BRANCH
SimpleHttpServerConnection.java
  Log:
  We do housekeeping on our internal objects ourselves.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.4   +4 -3  
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServerConnection.java
  
  Index: SimpleHttpServerConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServerConnection.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- SimpleHttpServerConnection.java   24 Nov 2003 20:41:11 -  1.1.2.3
  +++ SimpleHttpServerConnection.java   24 Nov 2003 23:16:42 -  1.1.2.4
  @@ -196,6 +196,7 @@
   return; 
   }
   server.processRequest(this);
  +out.flush();
   }
   
   public Header[] getHeaders() {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server - New directory

2003-11-18 Thread oglueck
oglueck 2003/11/18 04:22:57

  jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server - New 
directory

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server GenericResponse.java HttpRequestHandler.java SimpleHttpServer.java HttpRequestHandlerChain.java RequestLine.java ErrorResponse.java SimpleHttpServerConnection.java ResponseWriter.java

2003-11-18 Thread oglueck
oglueck 2003/11/18 04:26:39

  Added:   httpclient/src/test/org/apache/commons/httpclient/server
Tag: HTTPCLIENT_2_0_BRANCH GenericResponse.java
HttpRequestHandler.java SimpleHttpServer.java
HttpRequestHandlerChain.java RequestLine.java
ErrorResponse.java SimpleHttpServerConnection.java
ResponseWriter.java
  Log:
  Instrumentation for server based tests.
  
  Submitted by: Christian Kohlschütter
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.1.2.1   +222 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/GenericResponse.java
  
  
  
  
  1.1.2.1   +96 -0 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/HttpRequestHandler.java
  
  
  
  
  1.1.2.1   +243 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServer.java
  
  
  
  
  1.1.2.1   +114 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/HttpRequestHandlerChain.java
  
  
  
  
  1.1.2.1   +137 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/RequestLine.java
  
  
  
  
  1.1.2.1   +111 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/ErrorResponse.java
  
  
  
  
  1.1.2.1   +196 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServerConnection.java
  
  
  
  
  1.1.2.1   +209 -0
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/ResponseWriter.java
  
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol Protocol.java

2003-11-10 Thread oglueck
oglueck 2003/11/10 06:33:13

  Modified:httpclient API_CHANGES_2_1.txt
   httpclient/src/java/org/apache/commons/httpclient/protocol
Protocol.java
  Log:
  re-include old constructor signature for
  backwards API compatibility
  
  Revision  ChangesPath
  1.5   +1 -1  jakarta-commons/httpclient/API_CHANGES_2_1.txt
  
  Index: API_CHANGES_2_1.txt
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/API_CHANGES_2_1.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- API_CHANGES_2_1.txt   7 Nov 2003 07:34:34 -   1.4
  +++ API_CHANGES_2_1.txt   10 Nov 2003 14:33:13 -  1.5
  @@ -32,4 +32,4 @@
   - createDigest(String, String)
   - createDigestHeader(String, String)
   
  -* There is only one Protocol constructor for both secure and insecure socket 
factories.
  +* Deprecated extra Protocol constructor
  
  
  
  1.7   +20 -4 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol/Protocol.java
  
  Index: Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol/Protocol.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Protocol.java 7 Nov 2003 07:34:34 -   1.6
  +++ Protocol.java 10 Nov 2003 14:33:13 -  1.7
  @@ -194,7 +194,7 @@
   private boolean secure;
 
   /**
  - * Constructs a new Protocol. If the created protocol is secure depends on
  + * Constructs a new Protocol. Whether the created protocol is secure depends on
* the class of codefactory/code.
* 
* @param scheme the scheme (e.g. http, https)
  @@ -219,6 +219,22 @@
   this.defaultPort = defaultPort;
   this.secure = (factory instanceof SecureProtocolSocketFactory);
   }
  +
  +/**
  + * Constructs a new Protocol. Whether the created protocol is secure depends on
  + * the class of codefactory/code.
  + *
  + * @param scheme the scheme (e.g. http, https)
  + * @param factory the factory for creating sockets for communication using
  + * this protocol
  + * @param defaultPort the port this protocol defaults to
  + * @deprecated Use the constructor that uses ProtocolSocketFactory, this 
version of
  + * the constructor is only kept for backwards API compatibility.
  + */
  +public Protocol(String scheme, 
  +SecureProtocolSocketFactory factory, int defaultPort) {
  +this(scheme, (ProtocolSocketFactory) factory, defaultPort);   
  +}
   
   /**
* Returns the defaultPort.
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol Protocol.java

2003-11-07 Thread oglueck
oglueck 2003/11/06 23:34:34

  Modified:httpclient API_CHANGES_2_1.txt
   httpclient/src/java/org/apache/commons/httpclient/protocol
Protocol.java
  Log:
  fixed design error: uniform Protocol constructor for all factories
  
  Revision  ChangesPath
  1.4   +2 -0  jakarta-commons/httpclient/API_CHANGES_2_1.txt
  
  Index: API_CHANGES_2_1.txt
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/API_CHANGES_2_1.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- API_CHANGES_2_1.txt   18 Sep 2003 13:56:21 -  1.3
  +++ API_CHANGES_2_1.txt   7 Nov 2003 07:34:34 -   1.4
  @@ -31,3 +31,5 @@
   state of DigestScheme:
   - createDigest(String, String)
   - createDigestHeader(String, String)
  +
  +* There is only one Protocol constructor for both secure and insecure socket 
factories.
  
  
  
  1.6   +6 -32 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol/Protocol.java
  
  Index: Protocol.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol/Protocol.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Protocol.java 31 Jan 2003 00:33:36 -  1.5
  +++ Protocol.java 7 Nov 2003 07:34:34 -   1.6
  @@ -194,7 +194,8 @@
   private boolean secure;
 
   /**
  - * Constructs a new Protocol.  The created protcol is insecure.
  + * Constructs a new Protocol. If the created protocol is secure depends on
  + * the class of codefactory/code.
* 
* @param scheme the scheme (e.g. http, https)
* @param factory the factory for creating sockets for communication using
  @@ -216,36 +217,9 @@
   this.scheme = scheme;
   this.socketFactory = factory;
   this.defaultPort = defaultPort;
  -this.secure = false;
  +this.secure = (factory instanceof SecureProtocolSocketFactory);
   }
   
  -/**
  - * Constructs a new Protocol.  The created protcol is secure.
  - *
  - * @param scheme the scheme (e.g. http, https)
  - * @param factory the factory for creating sockets for communication using
  - * this protocol
  - * @param defaultPort the port this protocol defaults to
  - */
  -public Protocol(String scheme, 
  -SecureProtocolSocketFactory factory, int defaultPort) {
  -
  -if (scheme == null) {
  -throw new IllegalArgumentException(scheme is null);
  -}
  -if (factory == null) {
  -throw new IllegalArgumentException(socketFactory is null);
  -}
  -if (defaultPort = 0) {
  -throw new IllegalArgumentException(port is invalid:  + defaultPort);
  -}
  -
  -this.scheme = scheme;
  -this.socketFactory = factory;
  -this.defaultPort = defaultPort;
  -this.secure = true;
  -}
  -
   /**
* Returns the defaultPort.
* @return int
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2003-11-06 Thread oglueck
oglueck 2003/11/06 01:36:57

  Modified:httpclient Tag: HTTPCLIENT_2_0_BRANCH project.xml
  Log:
  fix encoding and escaping of some characters
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.35.2.6  +3 -3  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.35.2.5
  retrieving revision 1.35.2.6
  diff -u -r1.35.2.5 -r1.35.2.6
  --- project.xml   16 Oct 2003 13:31:35 -  1.35.2.5
  +++ project.xml   6 Nov 2003 09:36:57 -   1.35.2.6
  @@ -23,7 +23,7 @@
   
 logo/images/httpclient_logo.png/logo
 urlhttp://jakarta.apache.org/commons/httpclient//url
  -  
issueTrackingUrl![CDATA[http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMEDamp;bug_status=NEWamp;bug_status=ASSIGNEDamp;bug_status=REOPENEDamp;component=HttpClient]]/issueTrackingUrl
  +  
issueTrackingUrl![CDATA[http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMEDbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDcomponent=HttpClient]]/issueTrackingUrl
   
 siteAddressjakarta.apache.org/siteAddress
 siteDirectory/www/jakarta.apache.org/commons/httpclient//siteDirectory
  @@ -122,7 +122,7 @@
 /roles
   /developer
   developer
  -  nameOrtwin Glück/name
  +  nameOrtwin Glück/name
 idoglueck/id
 email[EMAIL PROTECTED]/email
 organizationNose Applied Intelligence AG/organization
  @@ -178,7 +178,7 @@
   
 contributors
   contributor
  -  nameArmando Antï¿œn/name
  +  nameArmando Anton/name
 email[EMAIL PROTECTED]/email
   /contributor
   contributor
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestAuthenticator.java

2003-09-18 Thread oglueck
oglueck 2003/09/18 06:56:22

  Modified:httpclient API_CHANGES_2_1.txt release_notes.txt
   httpclient/src/java/org/apache/commons/httpclient/auth
DigestScheme.java
   httpclient/src/test/org/apache/commons/httpclient
TestAuthenticator.java
  Added:   httpclient/src/java/org/apache/commons/httpclient
HttpClientError.java
  Log:
  Reworked DigestScheme
  - The qop Parameter is parsed correctly and not just ignored
  - Missing qop is handled correctly
  - DigestScheme is now prepared to handle the auth-int qop option
(even though an implementation is not possible with the current design)
  - The public interface of DigestScheme is narrowed (as it is not needed by the tests 
any more)
  - The test cases check the actual result rather than checking for equality after 
another run through the same logic. 
 Note: This is not simple for requests that require the client to generate a 
cnonce. Thos cases are still TODO.
  - DigestScheme requires a nonce in every challange now
(according to RFC 2617) test cases changed accordingly
  
  Introducing HttpClientError
  
  Reviewed by: Oleg Kalnichevski
  
  Revision  ChangesPath
  1.3   +9 -0  jakarta-commons/httpclient/API_CHANGES_2_1.txt
  
  Index: API_CHANGES_2_1.txt
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/API_CHANGES_2_1.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- API_CHANGES_2_1.txt   5 Jul 2003 22:59:15 -   1.2
  +++ API_CHANGES_2_1.txt   18 Sep 2003 13:56:21 -  1.3
  @@ -22,3 +22,12 @@
   
   * NTLM classes moved to org.apache.commons.httpclient.auth package amd made private
   
  +* DigestSheme:
  +the following public methods were removed, as they were only public for testing
  +- authenticate(UsernamePasswordCredentials, Map)
  +- createDigest(String, String, Map)
  +- createDigestHeader(String, Map, String)
  +the following public methods were made private, as they now depend on or mutate 
the
  +state of DigestScheme:
  +- createDigest(String, String)
  +- createDigestHeader(String, String)
  
  
  
  1.14  +4 -0  jakarta-commons/httpclient/release_notes.txt
  
  Index: release_notes.txt
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/release_notes.txt,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- release_notes.txt 1 Aug 2003 23:20:09 -   1.13
  +++ release_notes.txt 18 Sep 2003 13:56:21 -  1.14
  @@ -1,5 +1,9 @@
   Changes on the CVS trunk:
   
  + * added support for MD5-sess Digest authentication scheme
  + 
  + * improved compliance to RFC 2617
  + 
* 10791 - Improved HTTP Version configuration and tracking.
   
* 21880 - Content-Length  Transfer-Encoding request headers formerly set by 
abstract 
  
  
  
  1.1  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClientError.java
  
  Index: HttpClientError.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClientError.java,v
 1.1 2003/09/18 13:56:21 oglueck Exp $
   * $Revision: 1.1 $
   * $Date: 2003/09/18 13:56:21 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Commons, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth DigestScheme.java

2003-09-11 Thread oglueck
oglueck 2003/09/11 02:04:35

  Modified:httpclient/src/test/org/apache/commons/httpclient Tag:
HTTPCLIENT_2_0_BRANCH TestAuthenticator.java
   httpclient/src/java/org/apache/commons/httpclient/auth Tag:
HTTPCLIENT_2_0_BRANCH DigestScheme.java
  Log:
  Adding support for digest auth MD5-sess
  
  PR: 22926
  Submitted by: Dustin Sallings
  Reviewed by:  Ortwin Glück, Oleg Kalnichevski, Michael Becke
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.25.2.3  +37 -5 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestAuthenticator.java
  
  Index: TestAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestAuthenticator.java,v
  retrieving revision 1.25.2.2
  retrieving revision 1.25.2.3
  diff -u -r1.25.2.2 -r1.25.2.3
  --- TestAuthenticator.java8 Sep 2003 01:49:15 -   1.25.2.2
  +++ TestAuthenticator.java11 Sep 2003 09:04:34 -  1.25.2.3
  @@ -411,7 +411,39 @@
   checkAuthorization(cred2, method.getName(), 
method.getRequestHeader(Authorization).getValue());
   }
   }
  -
  +
  +/** 
  + * Test digest authentication using the MD5-sess algorithm.
  + */
  +public void testDigestAuthenticationMD5Sess() throws Exception {
  +// Example using Digest auth with MD5-sess
  +
  +String realm=realm;
  +String username=username;
  +String password=password;
  +String nonce=e273f1776275974f1a120d8b92c5b3cb;
  +
  +String challenge=Digest realm=\ + realm + \, 
  ++ nonce + \ + nonce + \, 
  ++ opaque=\SomeString\, 
  ++ stale=false, 
  ++ algorithm=MD5-sess, 
  ++ qop=\auth\;
  +
  +HttpState state = new HttpState();
  +UsernamePasswordCredentials cred =
  +new UsernamePasswordCredentials(username, password);
  +state.setCredentials(realm, null, cred);
  +AuthScheme authscheme = new DigestScheme(challenge);
  +HttpMethod method =
  +new SimpleHttpMethod(new Header(WWW-Authenticate, challenge));
  +assertTrue(HttpAuthenticator.authenticate(
  +authscheme, method, null, state));
  +assertTrue(null != method.getRequestHeader(Authorization));
  +checkAuthorization(cred, method.getName(),
  +method.getRequestHeader(Authorization).getValue());
  +}
  +
   // - Test Methods for NTLM Authentication
   
   public void testNTLMAuthenticationWithNoCreds() {
  
  
  
  No   revision
  No   revision
  1.4.2.3   +33 -9 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
  
  Index: DigestScheme.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/DigestScheme.java,v
  retrieving revision 1.4.2.2
  retrieving revision 1.4.2.3
  diff -u -r1.4.2.2 -r1.4.2.3
  --- DigestScheme.java 8 Sep 2003 01:49:15 -   1.4.2.2
  +++ DigestScheme.java 11 Sep 2003 09:04:35 -  1.4.2.3
  @@ -234,6 +234,12 @@
   String cnonce = (String) params.get(cnonce);
   String qop = (String) params.get(qop);
   String method = (String) params.get(methodname);
  +String algorithm = (String) params.get(algorithm);
  +
  +// If an algorithm is not specified, default to MD5.
  +if(algorithm == null) {
  +algorithm=MD5;
  +}
   
   if (qop != null) {
   qop = auth;
  @@ -250,16 +256,35 @@
   }
   
   // Calculating digest according to rfc 2617
  +
  +String a1 = null;
  +if(algorithm.equals(MD5)) {
  +// unq(username-value) : unq(realm-value) : passwd
  +a1 = uname + : + realm + : + pwd;
  +} else if(algorithm.equals(MD5-sess)) {
  +// H( unq(username-value) : unq(realm-value) : passwd )
  +//  : unq(nonce-value)
  +//  : unq(cnonce-value)
  +
  +String tmp=encode(md5Helper.digest(HttpConstants.getBytes(
  +uname + : + realm + : + pwd)));
  +
  +a1 = tmp + : + nonce + : + cnonce;
  +} else {
  +LOG.warn(Unhandled algorithm  + algorithm +  requested);
  +a1 = uname + : + realm + : + pwd;
  +}
  +String md5a1 = encode(md5Helper.digest(HttpConstants.getBytes(a1)));
  +String serverDigestValue;
  +
   String a2 = method + : + uri;
   String md5a2 = encode(md5Helper.digest(HttpConstants.getBytes(a2)));
  -String digestValue = uname + : + realm + : + pwd;
  -String md5a1

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestAuthenticator.java

2003-09-11 Thread oglueck
oglueck 2003/09/11 02:09:42

  Modified:httpclient/src/java/org/apache/commons/httpclient/auth
DigestScheme.java
   httpclient/src/test/org/apache/commons/httpclient
TestAuthenticator.java
  Log:
  Adding support for digest auth MD5-sess

  PR: 22926
  Submitted by: Dustin Sallings
  Reviewed by:  Ortwin Glück, Oleg Kalnichevski, Michael Becke
  
  Revision  ChangesPath
  1.8   +33 -9 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/DigestScheme.java
  
  Index: DigestScheme.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/auth/DigestScheme.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DigestScheme.java 8 Sep 2003 02:00:03 -   1.7
  +++ DigestScheme.java 11 Sep 2003 09:09:42 -  1.8
  @@ -236,6 +236,12 @@
   String cnonce = (String) params.get(cnonce);
   String qop = (String) params.get(qop);
   String method = (String) params.get(methodname);
  +String algorithm = (String) params.get(algorithm);
  +
  +// If an algorithm is not specified, default to MD5.
  +if(algorithm == null) {
  +algorithm=MD5;
  +}
   
   if (qop != null) {
   qop = auth;
  @@ -252,16 +258,35 @@
   }
   
   // Calculating digest according to rfc 2617
  +
  +String a1 = null;
  +if(algorithm.equals(MD5)) {
  +// unq(username-value) : unq(realm-value) : passwd
  +a1 = uname + : + realm + : + pwd;
  +} else if(algorithm.equals(MD5-sess)) {
  +// H( unq(username-value) : unq(realm-value) : passwd )
  +//  : unq(nonce-value)
  +//  : unq(cnonce-value)
  +
  +String tmp=encode(md5Helper.digest(HttpConstants.getBytes(
  +uname + : + realm + : + pwd)));
  +
  +a1 = tmp + : + nonce + : + cnonce;
  +} else {
  +LOG.warn(Unhandled algorithm  + algorithm +  requested);
  +a1 = uname + : + realm + : + pwd;
  +}
  +String md5a1 = encode(md5Helper.digest(HttpConstants.getBytes(a1)));
  +String serverDigestValue;
  +
   String a2 = method + : + uri;
   String md5a2 = encode(md5Helper.digest(HttpConstants.getBytes(a2)));
  -String digestValue = uname + : + realm + : + pwd;
  -String md5a1 
  -= encode(md5Helper.digest(HttpConstants.getBytes(digestValue)));
  -String serverDigestValue;
   
   if (qop == null) {
  +LOG.debug(Using null qop method);
   serverDigestValue = md5a1 + : + nonce + : + md5a2;
   } else {
  +LOG.debug(Using qop method  + qop);
   serverDigestValue = md5a1 + : + nonce + : + nc + : + cnonce
   + : + qop + : + md5a2;
   }
  @@ -299,12 +324,11 @@
   String opaque = (String) params.get(opaque);
   String response = digest;
   String qop = (String) params.get(qop);
  +String algorithm = (String) params.get(algorithm);
   
   if (qop != null) {
   qop = auth; //we only support auth
   }
  -
  -String algorithm = MD5; //we only support MD5
   
   sb.append(username=\ + uname + \)
 .append(, realm=\ + realm + \)
  
  
  
  1.30  +37 -5 
jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestAuthenticator.java
  
  Index: TestAuthenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestAuthenticator.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- TestAuthenticator.java8 Sep 2003 02:00:03 -   1.29
  +++ TestAuthenticator.java11 Sep 2003 09:09:42 -  1.30
  @@ -412,7 +412,39 @@
   checkAuthorization(cred2, method.getName(), 
method.getRequestHeader(Authorization).getValue());
   }
   }
  -
  +
  +/** 
  + * Test digest authentication using the MD5-sess algorithm.
  + */
  +public void testDigestAuthenticationMD5Sess() throws Exception {
  +// Example using Digest auth with MD5-sess
  +
  +String realm=realm;
  +String username=username;
  +String password=password;
  +String nonce=e273f1776275974f1a120d8b92c5b3cb;
  +
  +String challenge=Digest realm=\ + realm + \, 
  ++ nonce + \ + nonce + \, 
  ++ opaque=\SomeString\, 
  ++ stale=false, 
  ++ algorithm=MD5-sess, 
  ++ qop=\auth\;
  +
  +HttpState state = new HttpState();
  +UsernamePasswordCredentials cred

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient Wire.java

2003-08-27 Thread oglueck
oglueck 2003/08/27 07:08:16

  Modified:httpclient/src/java/org/apache/commons/httpclient Wire.java
  Log:
  fixed typo, reported by Andreas Probst
  
  Revision  ChangesPath
  1.5   +5 -5  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Wire.java
  
  Index: Wire.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Wire.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Wire.java 6 Apr 2003 22:31:53 -   1.4
  +++ Wire.java 27 Aug 2003 14:08:16 -  1.5
  @@ -186,7 +186,7 @@
   public static final void output(final String s)
 throws IOException {
   if (s == null) {
  -throw new IllegalArgumentException(Output may noy be null); 
  +throw new IllegalArgumentException(Output may not be null); 
   }
   output(s.getBytes());
   }
  @@ -194,7 +194,7 @@
   public static final void input(final String s)
 throws IOException {
   if (s == null) {
  -throw new IllegalArgumentException(Input may noy be null); 
  +throw new IllegalArgumentException(Input may not be null); 
   }
   input(s.getBytes());
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 00:36:15

  Modified:httpclient project.xml
  Log:
  fixed broken eyebrowse link
  
  Revision  ChangesPath
  1.38  +3 -3  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- project.xml   31 Jul 2003 21:22:14 -  1.37
  +++ project.xml   21 Aug 2003 07:36:15 -  1.38
  @@ -71,19 +71,19 @@
 nameHttpClient Mailing List/name
 subscribe [EMAIL PROTECTED] /subscribe
 unsubscribe [EMAIL PROTECTED] /unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=128/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=128/archive
   /mailingList
   mailingList
 nameCommons Developer List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=15/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=15/archive
   /mailingList
   mailingList
 nameCommons User List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=105/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=105/archive
   /mailingList
 /mailingLists
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient project.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 00:34:31

  Modified:httpclient Tag: HTTPCLIENT_2_0_BRANCH project.xml
  Log:
  fixed broken eyebrowse link
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.35.2.2  +3 -3  jakarta-commons/httpclient/project.xml
  
  Index: project.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/project.xml,v
  retrieving revision 1.35.2.1
  retrieving revision 1.35.2.2
  diff -u -r1.35.2.1 -r1.35.2.2
  --- project.xml   26 Jul 2003 14:25:41 -  1.35.2.1
  +++ project.xml   21 Aug 2003 07:34:31 -  1.35.2.2
  @@ -71,19 +71,19 @@
 nameHttpClient Mailing List/name
 subscribe [EMAIL PROTECTED] /subscribe
 unsubscribe [EMAIL PROTECTED] /unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=128/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=128/archive
   /mailingList
   mailingList
 nameCommons Developer List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=15/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=15/archive
   /mailingList
   mailingList
 nameCommons User List/name
 subscribe[EMAIL PROTECTED]/subscribe
 unsubscribe[EMAIL PROTECTED]/unsubscribe
  -  
archivehttp://archives.apache.org/eyebrowse/SummarizeList?listId=105/archive
  +  archivehttp://nagoya.apache.org/eyebrowse/SummarizeList?listId=105/archive
   /mailingList
 /mailingLists
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/xdocs/methods get.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 09:08:54

  Modified:httpclient/xdocs userguide.xml downloads.xml sslguide.xml
news.xml navigation.xml authentication.xml
methods.xml threading.xml
   httpclient/xdocs/stylesheets project.xml
   httpclient/xdocs/methods get.xml
  Log:
  fixed broken CVS link
  
  Revision  ChangesPath
  1.2   +2 -2  jakarta-commons/httpclient/xdocs/userguide.xml
  
  Index: userguide.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/userguide.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- userguide.xml 10 Mar 2003 04:08:06 -  1.1
  +++ userguide.xml 21 Aug 2003 16:08:54 -  1.2
  @@ -50,7 +50,7 @@
 that are provided by HttpClient and how to use them./td
   /tr
   tr
  -  tda 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/;Sample 
Code/a/td
  +  tda 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/;Sample
 Code/a/td
 tdThis is a link to the sample code for using HttpClient that is
 stored in the CVS repository and is available in source releases
 of HttpClient./td
  
  
  
  1.22  +2 -2  jakarta-commons/httpclient/xdocs/downloads.xml
  
  Index: downloads.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/downloads.xml,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- downloads.xml 1 Aug 2003 23:20:09 -   1.21
  +++ downloads.xml 21 Aug 2003 16:08:54 -  1.22
  @@ -31,7 +31,7 @@
  /p
  p
The CVS repository for emHttpClient/em can be
  - a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/;browsed online/a.
  + a 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/;browsed 
online/a.
  /p
  p
The best way to get emHttpClient/em, is to checkout the souce from our 
public 
  
  
  
  1.3   +2 -2  jakarta-commons/httpclient/xdocs/sslguide.xml
  
  Index: sslguide.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/sslguide.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sslguide.xml  12 Jun 2003 22:24:21 -  1.2
  +++ sslguide.xml  21 Aug 2003 16:08:54 -  1.3
  @@ -174,7 +174,7 @@
   ul
   
   li
  - a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java?rev=HEAD;
  
  + a 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java?rev=HEAD;
  
 EasySSLProtocolSocketFactory/a can be used to create SSL connections 
that allow the target 
 server to authenticate with a self-signed certificate.
   /li
  
  
  
  1.24  +2 -2  jakarta-commons/httpclient/xdocs/news.xml
  
  Index: news.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/news.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- news.xml  1 Aug 2003 23:20:09 -   1.23
  +++ news.xml  21 Aug 2003 16:08:54 -  1.24
  @@ -132,7 +132,7 @@
   has been accepted by the
   a href=http://jakarta.apache.org/commons;Jakarta Commons/a
   team and the source has been moved into the
  -a href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/;CVS 
repository/a.
  +a href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/;CVS 
repository/a.
 /p
   /section
   
  
  
  
  1.9   +2 -2  jakarta-commons/httpclient/xdocs/navigation.xml
  
  Index: navigation.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/navigation.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- navigation.xml12 Jun 2003 03:31:50 -  1.8
  +++ navigation.xml21 Aug 2003 16:08:54 -  1.9
  @@ -23,7 +23,7 @@
   item name=Cross Host Redirects href=/redirects.html/
   item name=Logging Guide href=/logging.html/
   item name=Methods href=/methods.html/
  -item name=Sample Code 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples//
  +item name=Sample Code 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples//
   item name=SSL Guide href=/sslguide.html

cvs commit: jakarta-commons/httpclient/xdocs navigation.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 09:04:32

  Modified:httpclient/xdocs Tag: HTTPCLIENT_2_0_BRANCH navigation.xml
  Log:
  fixed broken CVS link
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.8.2.1   +2 -2  jakarta-commons/httpclient/xdocs/navigation.xml
  
  Index: navigation.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/navigation.xml,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- navigation.xml12 Jun 2003 03:31:50 -  1.8
  +++ navigation.xml21 Aug 2003 16:04:32 -  1.8.2.1
  @@ -23,7 +23,7 @@
   item name=Cross Host Redirects href=/redirects.html/
   item name=Logging Guide href=/logging.html/
   item name=Methods href=/methods.html/
  -item name=Sample Code 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples//
  +item name=Sample Code 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples//
   item name=SSL Guide href=/sslguide.html/
   item name=Threading href=/threading.html/
   item name=Trouble Shooting href=/troubleshooting.html/
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/xdocs/stylesheets project.xml

2003-08-21 Thread oglueck
oglueck 2003/08/21 09:07:31

  Modified:httpclient/xdocs Tag: HTTPCLIENT_2_0_BRANCH news.xml
userguide.xml sslguide.xml methods.xml
downloads.xml threading.xml authentication.xml
   httpclient/xdocs/methods Tag: HTTPCLIENT_2_0_BRANCH get.xml
   httpclient/xdocs/stylesheets Tag: HTTPCLIENT_2_0_BRANCH
project.xml
  Log:
  fixed broken CVS link
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.20.2.4  +2 -2  jakarta-commons/httpclient/xdocs/news.xml
  
  Index: news.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/news.xml,v
  retrieving revision 1.20.2.3
  retrieving revision 1.20.2.4
  diff -u -r1.20.2.3 -r1.20.2.4
  --- news.xml  1 Aug 2003 03:22:00 -   1.20.2.3
  +++ news.xml  21 Aug 2003 16:07:31 -  1.20.2.4
  @@ -132,7 +132,7 @@
   has been accepted by the
   a href=http://jakarta.apache.org/commons;Jakarta Commons/a
   team and the source has been moved into the
  -a href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/;CVS 
repository/a.
  +a href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/;CVS 
repository/a.
 /p
   /section
   
  
  
  
  1.1.2.1   +2 -2  jakarta-commons/httpclient/xdocs/userguide.xml
  
  Index: userguide.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/userguide.xml,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- userguide.xml 10 Mar 2003 04:08:06 -  1.1
  +++ userguide.xml 21 Aug 2003 16:07:31 -  1.1.2.1
  @@ -50,7 +50,7 @@
 that are provided by HttpClient and how to use them./td
   /tr
   tr
  -  tda 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/;Sample 
Code/a/td
  +  tda 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/;Sample
 Code/a/td
 tdThis is a link to the sample code for using HttpClient that is
 stored in the CVS repository and is available in source releases
 of HttpClient./td
  
  
  
  1.2.2.1   +3 -3  jakarta-commons/httpclient/xdocs/sslguide.xml
  
  Index: sslguide.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/sslguide.xml,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- sslguide.xml  12 Jun 2003 22:24:21 -  1.2
  +++ sslguide.xml  21 Aug 2003 16:07:31 -  1.2.2.1
  @@ -174,13 +174,13 @@
   ul
   
   li
  - a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java?rev=HEAD;
  
  + a 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/EasySSLProtocolSocketFactory.java?rev=HEAD;
  
 EasySSLProtocolSocketFactory/a can be used to create SSL connections 
that allow the target 
 server to authenticate with a self-signed certificate.
   /li
   
   li
  - a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/StrictSSLProtocolSocketFactory.java?rev=HEAD;
  
  + a 
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/contrib/org/apache/commons/httpclient/contrib/ssl/StrictSSLProtocolSocketFactory.java?rev=HEAD;
  
 StrictSSLProtocolSocketFactory/a can be used to create SSL connections 
that can optionally perform host name verification in order to help preventing 
man-in-the-middle type of attacks. 
   /li
   
  
  
  
  1.3.2.1   +2 -2  jakarta-commons/httpclient/xdocs/methods.xml
  
  Index: methods.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/methods.xml,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- methods.xml   11 Mar 2003 08:03:12 -  1.3
  +++ methods.xml   21 Aug 2003 16:07:31 -  1.3.2.1
  @@ -20,7 +20,7 @@
 pThe examples on the following pages are not complete and are only used
 to highlight the important features that are unique to each method.  For
 complete examples, please refer to the a
  -  
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/;sample
  +  
href=http://cvs.apache.org/viewcvs.cgi/jakarta-commons/httpclient/src/examples/;sample
 code/a./p
   /section
   
  
  
  
  1.19.2.3  +2 -2  jakarta-commons/httpclient/xdocs

cvs commit: jakarta-commons/httpclient/xdocs authentication.xml

2003-08-14 Thread oglueck
oglueck 2003/08/08 00:59:53

  Modified:httpclient/xdocs authentication.xml
  Log:
  adding a troubleshooting section
  
  Revision  ChangesPath
  1.6   +10 -3 jakarta-commons/httpclient/xdocs/authentication.xml
  
  Index: authentication.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/authentication.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- authentication.xml21 Jun 2003 08:25:47 -  1.5
  +++ authentication.xml8 Aug 2003 07:59:53 -   1.6
  @@ -151,8 +151,15 @@
 of basic authentication available in the   
 a 
href=http://cvs.apache.org/viewcvs/jakarta-commons/httpclient/src/examples/;example 
directory/a in CVS.
 /p
  - /section
  -
  +  /section
  +  
  +  section name=Troubleshooting
  +  pSome authentication schemes may use cryptographic algorithms. It is 
recommended to include the
  + a href=http://java.sun.com/products/jce/; target=_blankJava 
Cryptography Extension/a in
  + your runtime environment prior to JDK 1.4.
  +
  +  /p
  +  /section
 /body
   
   /document
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/xdocs cookies.xml charencodings.xml

2003-07-21 Thread oglueck
oglueck 2003/07/21 06:05:04

  Modified:httpclient/xdocs cookies.xml charencodings.xml
  Log:
  added documentation about cookies and encoding
  
  Revision  ChangesPath
  1.3   +13 -1 jakarta-commons/httpclient/xdocs/cookies.xml
  
  Index: cookies.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/cookies.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- cookies.xml   3 Jun 2003 21:26:35 -   1.2
  +++ cookies.xml   21 Jul 2003 13:05:03 -  1.3
  @@ -131,5 +131,17 @@
 non-compliant servers.  In these cases, switching to the compatibility
 cookie specification usually solves the problem./p
   /section
  +
  +section name=Encoding Issues
  +  pSince cookies are transfered as HTTP Headers they are confined to
  +  the ttUS-ASCII/tt character set. Other characters will be lost or
  +  mangeled. Cookies are typically set and read by the same server, so
  +  a custom scheme for escaping non-ASCII characters can be used, for
  +  instance the well-established URL encoding scheme. If cookies are
  +  used to transfer data between server and client both parties must
  +  agree on the escaping scheme used in a custom way. The HttpClient
  +  cookie implementation provides no special means to handle non-ASCII
  +  characters nor does it issue warnings./p
  +/section
 /body
   /document
  
  
  
  1.3   +5 -2  jakarta-commons/httpclient/xdocs/charencodings.xml
  
  Index: charencodings.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/charencodings.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- charencodings.xml 11 Mar 2003 08:03:12 -  1.2
  +++ charencodings.xml 21 Jul 2003 13:05:03 -  1.3
  @@ -25,7 +25,10 @@
   It is not possible to use non ttUS-ASCII/tt characters in the header of 
a
   request or response.  Generally this is not an issue however, because the
   HTTP headers are designed to facilite the transfer of data rather than to
  -actually transfer the data itself.
  +actually transfer the data itself./p
  +  pOne exception however are cookies. Since cookies are transfered as HTTP 
Headers
  +they are confined to the ttUS-ASCII/tt character set. See the Cookie 
Guide
  +for more information.
 /p
   /section
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/xdocs cookies.xml charencodings.xml

2003-07-21 Thread oglueck
oglueck 2003/07/21 06:07:35

  Modified:httpclient/xdocs Tag: HTTPCLIENT_2_0_BRANCH cookies.xml
charencodings.xml
  Log:
  added documentation about cookies and encoding
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.2.2.1   +13 -1 jakarta-commons/httpclient/xdocs/cookies.xml
  
  Index: cookies.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/cookies.xml,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- cookies.xml   3 Jun 2003 21:26:35 -   1.2
  +++ cookies.xml   21 Jul 2003 13:07:33 -  1.2.2.1
  @@ -131,5 +131,17 @@
 non-compliant servers.  In these cases, switching to the compatibility
 cookie specification usually solves the problem./p
   /section
  +
  +section name=Encoding Issues
  +  pSince cookies are transfered as HTTP Headers they are confined to
  +  the ttUS-ASCII/tt character set. Other characters will be lost or
  +  mangeled. Cookies are typically set and read by the same server, so
  +  a custom scheme for escaping non-ASCII characters can be used, for
  +  instance the well-established URL encoding scheme. If cookies are
  +  used to transfer data between server and client both parties must
  +  agree on the escaping scheme used in a custom way. The HttpClient
  +  cookie implementation provides no special means to handle non-ASCII
  +  characters nor does it issue warnings./p
  +/section
 /body
   /document
  
  
  
  1.2.2.1   +5 -2  jakarta-commons/httpclient/xdocs/charencodings.xml
  
  Index: charencodings.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/charencodings.xml,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- charencodings.xml 11 Mar 2003 08:03:12 -  1.2
  +++ charencodings.xml 21 Jul 2003 13:07:34 -  1.2.2.1
  @@ -25,7 +25,10 @@
   It is not possible to use non ttUS-ASCII/tt characters in the header of 
a
   request or response.  Generally this is not an issue however, because the
   HTTP headers are designed to facilite the transfer of data rather than to
  -actually transfer the data itself.
  +actually transfer the data itself./p
  +  pOne exception however are cookies. Since cookies are transfered as HTTP 
Headers
  +they are confined to the ttUS-ASCII/tt character set. See the Cookie 
Guide
  +for more information.
 /p
   /section
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/xdocs logging.xml

2003-06-25 Thread oglueck
oglueck 2003/06/25 02:45:00

  Modified:httpclient/xdocs logging.xml
  Log:
  reduce log detail for most common use
  
  Revision  ChangesPath
  1.11  +2 -2  jakarta-commons/httpclient/xdocs/logging.xml
  
  Index: logging.xml
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/xdocs/logging.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- logging.xml   16 Mar 2003 11:26:12 -  1.10
  +++ logging.xml   25 Jun 2003 09:45:00 -  1.11
  @@ -57,7 +57,7 @@
System.setProperty(org.apache.commons.logging.Log, 
org.apache.commons.logging.impl.SimpleLog);br /

System.setProperty(org.apache.commons.logging.simplelog.showdatetime, true);br /

System.setProperty(org.apache.commons.logging.simplelog.log.httpclient.wire, 
debug);br /
  - 
System.setProperty(org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient,
 trace);br /
  + 
System.setProperty(org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient,
 debug);br /
   /blockquote
/p
 /section
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpClient.java

2003-02-25 Thread oglueck
oglueck 2003/02/25 01:13:56

  Modified:httpclient/src/java/org/apache/commons/httpclient
HttpClient.java
  Log:
  backing out my erronous patch
  
  Revision  ChangesPath
  1.71  +13 -8 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java
  
  Index: HttpClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- HttpClient.java   24 Feb 2003 19:12:06 -  1.70
  +++ HttpClient.java   25 Feb 2003 09:13:55 -  1.71
  @@ -552,6 +552,11 @@
   );
   
   try {
  +// Catch all possible exceptions to make sure to release the 
  +// connection, as although the user may call 
  +// Method-releaseConnection(), the method doesn't know about the
  +// connection until HttpMethod.execute() is called.
  +
   method.setStrictMode(strictMode);
   
   if (!connection.isOpen()) {
  @@ -562,12 +567,12 @@
   method = new ConnectMethod(method);
   }
   }
  -} finally {
  -// make sure to release the 
  -// connection, as although the user may call 
  -// Method-releaseConnection(), the method doesn't know about the
  -// connection until HttpMethod.execute() is called.
  +} catch (IOException e) {
  +connection.releaseConnection();
  +throw e;
  +} catch (RuntimeException e) {
   connection.releaseConnection();
  +throw e;
   }
   
   return method.execute(state, connection);
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: jakarta-commons/httpclient/src/examples ClientApp.java CookieDemoApp.java CustomHttpConnection.java MultipartFileUploadApp.java PostXML.java TrivialApp.java

2003-02-13 Thread oglueck
oglueck 2003/02/13 01:14:43

  Modified:httpclient/src/examples ClientApp.java CookieDemoApp.java
CustomHttpConnection.java
MultipartFileUploadApp.java PostXML.java
TrivialApp.java
  Log:
  fixed tabbing (no tabs)
  
  Revision  ChangesPath
  1.10  +119 -119  jakarta-commons/httpclient/src/examples/ClientApp.java
  
  Index: ClientApp.java
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/src/examples/ClientApp.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ClientApp.java23 Jan 2003 22:47:42 -  1.9
  +++ ClientApp.java13 Feb 2003 09:14:43 -  1.10
  @@ -72,88 +72,88 @@
   import javax.swing.text.html.*;
   
   /**
  - * 
  + *
* This is a Swing application that demonstrates
* how to use the Jakarta HttpClient API.
  - * 
  + *
* @author Sean C. Sullivan
* @author Ortwin Glück
*/
   public class ClientApp {
   
   public static void main(String[] args) {
  - HttpClientMainFrame f = new HttpClientMainFrame();
  - f.setTitle(HttpClient demo application);
  - f.setSize(700, 500);
  - f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  - f.setVisible(true);
  - }
  +HttpClientMainFrame f = new HttpClientMainFrame();
  +f.setTitle(HttpClient demo application);
  +f.setSize(700, 500);
  +f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  +f.setVisible(true);
  +}
   
   public static class HttpClientMainFrame extends javax.swing.JFrame {
  - private HttpClientPanel m_panel;
  +private HttpClientPanel m_panel;
   
   public HttpClientMainFrame() {
  - m_panel = new HttpClientPanel();
  - this.getContentPane().add(m_panel);
  - }
  - }
  +m_panel = new HttpClientPanel();
  +this.getContentPane().add(m_panel);
  +}
  +}
   
   public static class HttpClientPanel extends JPanel {
  - private static final String strTenSpaces =   ;
  - private static final String strFortySpaces =
  - strTenSpaces + strTenSpaces + strTenSpaces + strTenSpaces;
  - private static final String strEightySpaces =
  - strFortySpaces + strFortySpaces;
  +private static final String strTenSpaces =   ;
  +private static final String strFortySpaces =
  +strTenSpaces + strTenSpaces + strTenSpaces + strTenSpaces;
  +private static final String strEightySpaces =
  +strFortySpaces + strFortySpaces;
   
   public HttpClientPanel() {
  - final JPanel panInput = new JPanel();
  - panInput.setLayout(new FlowLayout());
  +final JPanel panInput = new JPanel();
  +panInput.setLayout(new FlowLayout());
   
  - final JPanel panDisplay = new JPanel();
  - panDisplay.setLayout(new BorderLayout());
  +final JPanel panDisplay = new JPanel();
  +panDisplay.setLayout(new BorderLayout());
   
   String[] aURLs = {
  - http://www.apache.org/;,
  - http://www.google.com/;,
  - http://www.opensource.org/;,
  - http://www.anybrowser.org/;,
  - http://jakarta.apache.org/;,
  +http://www.apache.org/;,
  +http://www.google.com/;,
  +http://www.opensource.org/;,
  +http://www.anybrowser.org/;,
  +http://jakarta.apache.org/;,
   http://www.w3.org/;
   };
   
  - final JComboBox cmbURL = new JComboBox(aURLs);
  - cmbURL.setToolTipText(Enter a URL);
  - cmbURL.setPrototypeDisplayValue(strEightySpaces);
  - cmbURL.setEditable(true);
  - cmbURL.setSelectedIndex(0);
  -
  - final JTextArea taTextResponse = new JTextArea();
  - taTextResponse.setEditable(false);
  - taTextResponse.setCaretPosition(0);
  +final JComboBox cmbURL = new JComboBox(aURLs);
  +cmbURL.setToolTipText(Enter a URL);
  +cmbURL.setPrototypeDisplayValue(strEightySpaces);
  +cmbURL.setEditable(true);
  +cmbURL.setSelectedIndex(0);
  +
  +final JTextArea taTextResponse = new JTextArea();
  +taTextResponse.setEditable(false);
  +taTextResponse.setCaretPosition(0);
   
  - final

cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestHttpConnectionManager.java

2003-01-21 Thread oglueck
oglueck 2003/01/21 01:47:26

  Modified:httpclient/src/java/org/apache/commons/httpclient
HostConfiguration.java HttpConnection.java
HttpConnectionManager.java
MultiThreadedHttpConnectionManager.java
SimpleHttpConnectionManager.java
   httpclient/src/java/org/apache/commons/httpclient/protocol
Protocol.java
   httpclient/src/test/org/apache/commons/httpclient
TestHttpConnectionManager.java
  Log:
  connection pool now includes protocol
  
  Contributed by: Oleg Kalnichevski and Michael Becke
  
  Revision  ChangesPath
  1.6   +48 -13
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HostConfiguration.java
  
  Index: HostConfiguration.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HostConfiguration.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- HostConfiguration.java16 Jan 2003 13:28:39 -  1.5
  +++ HostConfiguration.java21 Jan 2003 09:47:26 -  1.6
  @@ -300,24 +300,59 @@
   /**
* @see java.lang.Object#equals(java.lang.Object)
*/
  -public boolean equals(Object o) {
  +public synchronized boolean equals(Object o) {
   
   if ( o instanceof HostConfiguration ) {
   
  +// shortcut if we're comparing with ourselves
  +if ( o == this ) return true;
  +
   HostConfiguration config = (HostConfiguration)o;
   
  -return (
  -proxyPort == config.getProxyPort()
  - ( 
  -proxyHost == null 
  -? config.getProxyHost() == null 
  -: proxyHost.equals( config.getProxyHost() )
  -)
  - getHostURL().equals( config.getHostURL() ) 
  -);
  +if ( hostSet ) {
  +if ( 
  +!host.equalsIgnoreCase( config.getHost() )
  +|| port != config.getPort()
  +|| !protocol.equals( config.getProtocol() )
  +) {
  +// either host, port or protocol don't match
  +return false;
  +}
  +} else if ( config.isHostSet() ) {
  +return false;
  +}
  +if ( proxyHost != null ) {
  +if ( 
  +!proxyHost.equalsIgnoreCase( config.getProxyHost() )
  +|| proxyPort != config.getProxyPort()
  +) {
  +// either proxyHost or proxyPort don't match
  +return false;
  +}
  +} else if ( config.getProxyHost() != null ) {
  +return false;
  +}
  +
  +// everything matches
  +return true;
   
   } else {
   return false;
  +}
  +
  +}
  +
  +/**
  + * @see java.lang.Object#hashCode()
  + */
  +public int hashCode() {
  +
  +if ( host != null ) {
  +return host.hashCode();
  +} else if ( proxyHost != null ) {
  +return proxyHost.hashCode();   
  +} else {
  +return super.hashCode();
   }
   
   }
  
  
  
  1.33  +19 -4 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
  
  Index: HttpConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- HttpConnection.java   19 Jan 2003 15:05:15 -  1.32
  +++ HttpConnection.java   21 Jan 2003 09:47:26 -  1.33
  @@ -156,6 +156,21 @@
   );
   }
   
  +/**
  + * Creates a new HttpConnection.
  + * 
  + * @param hostConfiguration the host/proxy/protocol to use
  + */
  +public HttpConnection( HostConfiguration hostConfiguration ) {
  +this(
  +hostConfiguration.getProxyHost(),
  +hostConfiguration.getProxyPort(),
  +hostConfiguration.getHost(),
  +hostConfiguration.getPort(),
  +hostConfiguration.getProtocol()
  +);
  +}
  +
   public HttpConnection(
   String proxyHost, 
   int proxyPort, 
  
  
  
  1.13  +5 -7  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnectionManager.java
  
  Index: HttpConnectionManager.java

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpConnection.java

2003-01-19 Thread oglueck
oglueck 2003/01/19 07:05:15

  Modified:httpclient/src/java/org/apache/commons/httpclient
HttpConnection.java
  Log:
  disable Nagles Algorithm
  
  Requested by: Juergen Pill
  Patch by: Oleg Kalnichevski
  bloody Sunday
  
  Revision  ChangesPath
  1.32  +14 -4 
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
  
  Index: HttpConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- HttpConnection.java   16 Jan 2003 13:28:39 -  1.31
  +++ HttpConnection.java   19 Jan 2003 15:05:15 -  1.32
  @@ -456,6 +456,16 @@
   }
   
   }
  +
  +/*
  +Nagling has been broadly implemented across networks, 
  +including the Internet, and is generally performed by default 
  +- although it is sometimes considered to be undesirable in 
  +highly interactive environments, such as some client/server 
  +situations. In such cases, nagling may be turned off through 
  +use of the TCP_NODELAY sockets option. */
  +
  +_socket.setTcpNoDelay(true);
   _socket.setSoTimeout(_so_timeout);
   _input = _socket.getInputStream();
   _output = _socket.getOutputStream();
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient SimpleHttpConnection.java TestAuthenticator.java TestBase64.java TestStreams.java TestWebappMethods.java TestWebappRedirect.java

2003-01-16 Thread oglueck
oglueck 2003/01/16 02:53:09

  Modified:httpclient/src/examples PostXML.java
   httpclient/src/java/org/apache/commons/httpclient
Authenticator.java ChunkedInputStream.java
ChunkedOutputStream.java HttpConnection.java
HttpMethodBase.java NTLM.java
RequestOutputStream.java WireLogInputStream.java
   httpclient/src/java/org/apache/commons/httpclient/methods
PostMethod.java PutMethod.java
   httpclient/src/java/org/apache/commons/httpclient/methods/multipart
FilePart.java Part.java StringPart.java
   httpclient/src/java/org/apache/commons/httpclient/util
Base64.java URIUtil.java
   httpclient/src/test/org/apache/commons/httpclient
SimpleHttpConnection.java TestAuthenticator.java
TestBase64.java TestStreams.java
TestWebappMethods.java TestWebappRedirect.java
  Added:   httpclient/src/java/org/apache/commons/httpclient
HttpConstants.java
  Log:
  fixed undefined encodings all over httpclient
  makes httpclient code platform independent
  
  Contributed by: Oleg Kalnichevski
  Reviewed by: Ortwin Glück
  
  Revision  ChangesPath
  1.5   +4 -8  jakarta-commons/httpclient/src/examples/PostXML.java
  
  Index: PostXML.java
  ===
  RCS file: /home/cvs/jakarta-commons/httpclient/src/examples/PostXML.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PostXML.java  17 Dec 2002 01:28:32 -  1.4
  +++ PostXML.java  16 Jan 2003 10:53:07 -  1.5
  @@ -130,11 +130,7 @@

System.out.println(iResultCode =  + iResultCode);
   
  - byte[] yaResponse = post.getResponseBody();
  - 
  - System.out.println(Server response:);
  - 
  - System.out.println( new String(yaResponse) );
  + System.out.println(Server response: + post.getResponseBodyAsString() 
);
   
   post.releaseConnection();
}
  
  
  
  1.36  +16 -20
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Authenticator.java
  
  Index: Authenticator.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Authenticator.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- Authenticator.java3 Dec 2002 15:20:31 -   1.35
  +++ Authenticator.java16 Jan 2003 10:53:08 -  1.36
  @@ -206,9 +206,9 @@
   
   // Calculating digest according to rfc 2617
   String a2 = method + : + uri;
  -String md5a2 = encode(md5Helper.digest(a2.getBytes()));
  +String md5a2 = encode(md5Helper.digest(HttpConstants.getBytes(a2)));
   String digestValue = uname + : + realm + : + pwd;
  -String md5a1 = encode(md5Helper.digest(digestValue.getBytes()));
  +String md5a1 = 
encode(md5Helper.digest(HttpConstants.getBytes(digestValue)));
   String serverDigestValue;
   
   if (qop == null) {
  @@ -219,7 +219,7 @@
   }
   
   String serverDigest =
  -encode(md5Helper.digest(serverDigestValue.getBytes()));
  +encode(md5Helper.digest(HttpConstants.getBytes(serverDigestValue)));
   
   return serverDigest;
   }
  @@ -285,7 +285,7 @@
   String authString = credentials.getUserName() + : +
   credentials.getPassword();
   
  -return Basic  + new String(Base64.encode(authString.getBytes()));
  +return Basic  + 
HttpConstants.getString(Base64.encode(HttpConstants.getBytes(authString)));
   }
   
   
  @@ -387,18 +387,14 @@
   throw new HttpException(No credentials available for NTLM 
   + authentication.);
   } else {
  -try {
  -NTLM ntlm = new NTLM();
  -String response = NTLM  + ntlm.getResponseFor(challenge,
  -credentials.getUserName(), credentials.getPassword(),
  -credentials.getHost(), credentials.getDomain());
  -if (log.isDebugEnabled()) {
  -log.debug(Replying to challenge with:  + response);
  -}
  -return new Header(responseHeader, response);
  -} catch (java.io.UnsupportedEncodingException e) {
  -throw new HttpException(NTLM requires ASCII support.);
  +NTLM ntlm = new NTLM();
  +String response = NTLM  + ntlm.getResponseFor(challenge,
  +credentials.getUserName(), credentials.getPassword

cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol - New directory

2003-01-16 Thread oglueck
oglueck 2003/01/16 03:05:19

  jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol - New 
directory

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/protocol DefaultProtocolSocketFactory.java Protocol.java ProtocolSocketFactory.java SSLProtocolSocketFactory.java SecureProtocolSocketFactory.java

2003-01-16 Thread oglueck
oglueck 2003/01/16 05:28:40

  Modified:httpclient/src/java/org/apache/commons/httpclient
HostConfiguration.java HttpClient.java
HttpConnection.java HttpConstants.java
MultiThreadedHttpConnectionManager.java
SimpleHttpConnectionManager.java
  Added:   httpclient/src/java/org/apache/commons/httpclient/protocol
DefaultProtocolSocketFactory.java Protocol.java
ProtocolSocketFactory.java
SSLProtocolSocketFactory.java
SecureProtocolSocketFactory.java
  Removed: httpclient/src/java/org/apache/commons/httpclient
Protocol.java
  Log:
  - HttpClient has now only two compile-time dependencies on Java 1.4
org.apache.commons.httpclient.NTML.java
org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.java
  - HttpClient should again be runnable on Java 1.2.2
  - All protocol related classes moved to org.apache.commons.httpclient.protocol 
package
  - all references to java.lang.RuntimeException.RuntimeException(java.lang.Throwable) 
removed
  
  Revision  ChangesPath
  1.5   +5 -3  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HostConfiguration.java
  
  Index: HostConfiguration.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HostConfiguration.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HostConfiguration.java17 Dec 2002 01:36:41 -  1.4
  +++ HostConfiguration.java16 Jan 2003 13:28:39 -  1.5
  @@ -61,6 +61,8 @@
*/
   package org.apache.commons.httpclient;
   
  +import org.apache.commons.httpclient.protocol.Protocol;
  +
   
   /**
*
  
  
  
  1.66  +5 -4  
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java
  
  Index: HttpClient.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- HttpClient.java   19 Dec 2002 10:23:34 -  1.65
  +++ HttpClient.java   16 Jan 2003 13:28:39 -  1.66
  @@ -65,6 +65,7 @@
   import java.io.IOException;
   import java.net.URL;
   
  +import org.apache.commons.httpclient.protocol.Protocol;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  
  
  
  1.31  +15 -13
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
  
  Index: HttpConnection.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- HttpConnection.java   16 Jan 2003 10:53:08 -  1.30
  +++ HttpConnection.java   16 Jan 2003 13:28:39 -  1.31
  @@ -62,10 +62,6 @@
   
   package org.apache.commons.httpclient;
   
  -import org.apache.commons.httpclient.util.TimeoutController;
  -import org.apache.commons.logging.Log;
  -import org.apache.commons.logging.LogFactory;
  -
   import java.io.IOException;
   import java.io.InputStream;
   import java.io.OutputStream;
  @@ -73,8 +69,13 @@
   import java.net.Socket;
   import java.net.SocketException;
   
  -import javax.net.SocketFactory;
  -import javax.net.ssl.SSLSocketFactory;
  +import org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory;
  +import org.apache.commons.httpclient.protocol.Protocol;
  +import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
  +import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
  +import org.apache.commons.httpclient.util.TimeoutController;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   
   
   
  @@ -435,10 +436,10 @@
   
   _usingSecureSocket = isSecure()  !isProxied();
   
  -final SocketFactory socketFactory = (
  +final ProtocolSocketFactory socketFactory = (
   isSecure()  !isProxied()
   ? _protocol.getSocketFactory()
  -: SocketFactory.getDefault()
  +: new DefaultProtocolSocketFactory()
   );
   
   if (connect_timeout == 0) {
  @@ -496,7 +497,8 @@
   throw new IllegalStateException(Already using a secure socket);
   }
   
  -SSLSocketFactory socketFactory = 
(SSLSocketFactory)_protocol.getSocketFactory();
  +SecureProtocolSocketFactory socketFactory

cvs commit: jakarta-commons/httpclient/src/examples BasicAuthenticatonExample.java

2003-01-16 Thread oglueck
oglueck 2003/01/16 05:31:26

  Added:   httpclient/src/examples BasicAuthenticatonExample.java
  Log:
  contributed by Michael Becke
  
  Revision  ChangesPath
  1.1  
jakarta-commons/httpclient/src/examples/BasicAuthenticatonExample.java
  
  Index: BasicAuthenticatonExample.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-commons/httpclient/src/examples/BasicAuthenticatonExample.java,v 1.1 
2003/01/16 13:31:26 oglueck Exp $
   * $Revision: 1.1 $
   * $Date: 2003/01/16 13:31:26 $
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:
   *   This product includes software developed by the
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, HttpClient, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * 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/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
   import org.apache.commons.httpclient.HttpClient;
  import org.apache.commons.httpclient.UsernamePasswordCredentials;
  import org.apache.commons.httpclient.methods.GetMethod;
  
  /**
   * A simple example that uses HttpClient to perform a GET using Basic
   * Authentication. Can be run standalone without parameters.
   *
   * You need to have JSSE on your classpath and set the System property
   * java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
   *
   * So a typical call would look like:
   * javaw -classpath 
commons-httpclient.jar;jsse.jar;jcert.jar;jce.jar;jnet.jar;log4j-1.2.4.jar;commons-logging.jar
   *  -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol 
BasicAuthenticatonExample
   *
   * @author Michael Becke
   */
  public class BasicAuthenticatonExample {
  
  /**
   * Constructor for BasicAuthenticatonExample.
   */
  public BasicAuthenticatonExample() {
  }
  
  public static void main(String[] args) throws Exception {
  HttpClient client = new HttpClient();
  
  // pass our credentials to HttpClient, they will only be used for
  // authenticating to servers with realm realm, to authenticate agains
  // an arbitrary realm change this to null.
  client.getState().setCredentials(
  realm,
  new UsernamePasswordCredentials(username, password)
  );
  
  // create a GET method that reads a file over HTTPS, we're assuming
  // that this file requires basic authentication using the realm above.
  GetMethod

cvs commit: jakarta-commons/httpclient/src/examples BasicAuthenticatonExample.java

2003-01-16 Thread oglueck
oglueck 2003/01/16 06:37:06

  Modified:httpclient/src/examples BasicAuthenticatonExample.java
  Log:
  no message
  
  Revision  ChangesPath
  1.2   +4 -9  
jakarta-commons/httpclient/src/examples/BasicAuthenticatonExample.java
  
  Index: BasicAuthenticatonExample.java
  ===
  RCS file: 
/home/cvs/jakarta-commons/httpclient/src/examples/BasicAuthenticatonExample.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasicAuthenticatonExample.java16 Jan 2003 13:31:26 -  1.1
  +++ BasicAuthenticatonExample.java16 Jan 2003 14:37:06 -  1.2
  @@ -67,12 +67,7 @@
* A simple example that uses HttpClient to perform a GET using Basic
* Authentication. Can be run standalone without parameters.
*
  - * You need to have JSSE on your classpath and set the System property
  - * java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
  - *
  - * So a typical call would look like:
  - * javaw -classpath 
commons-httpclient.jar;jsse.jar;jcert.jar;jce.jar;jnet.jar;log4j-1.2.4.jar;commons-logging.jar
  - *  -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol 
BasicAuthenticatonExample
  + * You need to have JSSE on your classpath for JDK prior to 1.4
*
* @author Michael Becke
*/
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




  1   2   >