You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/09 20:03:49 UTC
[01/22] httpcomponents-core git commit: HttpCore 4.0.x branch
Repository: httpcomponents-core
Updated Branches:
refs/heads/4.0.x [created] 83e825f88
HttpCore 4.0.x branch
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@751780 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/cbcf8c6c
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/cbcf8c6c
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/cbcf8c6c
Branch: refs/heads/4.0.x
Commit: cbcf8c6c9c44dbde3f0c7d2af0ff1a9af1e073f8
Parents: 151bccd
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Mon Mar 9 18:03:17 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Mon Mar 9 18:03:17 2009 +0000
----------------------------------------------------------------------
----------------------------------------------------------------------
[17/22] httpcomponents-core git commit: Added manifest entries
Posted by ol...@apache.org.
Added manifest entries
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@805935 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/0eb2f628
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/0eb2f628
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/0eb2f628
Branch: refs/heads/4.0.x
Commit: 0eb2f6285ae8eb2586e8df93b8e13ba2b4c194ec
Parents: 04d6ff7
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Wed Aug 19 19:10:54 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Wed Aug 19 19:10:54 2009 +0000
----------------------------------------------------------------------
httpcore-nio/pom.xml | 17 +++++++++++++++++
httpcore/pom.xml | 17 +++++++++++++++++
2 files changed, 34 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/0eb2f628/httpcore-nio/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-nio/pom.xml b/httpcore-nio/pom.xml
index 1c599ba..89651aa 100644
--- a/httpcore-nio/pom.xml
+++ b/httpcore-nio/pom.xml
@@ -107,6 +107,23 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Specification-Title>Apache HttpCore NIO</Specification-Title>
+ <Specification-Version>${pom.version}</Specification-Version>
+ <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
+ <Implementation-Title>Apache HttpCore NIO</Implementation-Title>
+ <Implementation-Version>${pom.version}</Implementation-Version>
+ <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
+ <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+ <url>${pom.url}</url>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/0eb2f628/httpcore/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore/pom.xml b/httpcore/pom.xml
index 733add4..ab794ac 100644
--- a/httpcore/pom.xml
+++ b/httpcore/pom.xml
@@ -102,6 +102,23 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Specification-Title>Apache HttpCore</Specification-Title>
+ <Specification-Version>${pom.version}</Specification-Version>
+ <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
+ <Implementation-Title>Apache HttpCore</Implementation-Title>
+ <Implementation-Version>${pom.version}</Implementation-Version>
+ <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
+ <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+ <url>${pom.url}</url>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
</plugins>
</build>
[03/22] httpcomponents-core git commit: Backported HTTPCORE-193,
HTTPCORE-197 to 4.0.x branch
Posted by ol...@apache.org.
Backported HTTPCORE-193, HTTPCORE-197 to 4.0.x branch
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@777111 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/91ad309e
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/91ad309e
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/91ad309e
Branch: refs/heads/4.0.x
Commit: 91ad309e6c1dddac6be49475f5a00b414bd0d42b
Parents: 9043655
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu May 21 13:22:39 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu May 21 13:22:39 2009 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 14 +++++++++
.../http/impl/nio/codecs/ChunkDecoder.java | 15 ++++++---
.../http/impl/nio/reactor/SSLIOSession.java | 22 +++++++++----
.../http/impl/nio/codecs/TestChunkDecoder.java | 33 ++++++++++++++++++++
4 files changed, 74 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/91ad309e/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 8403df0..88115e1 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,3 +1,17 @@
+Changes since 4.0
+-------------------
+
+* [HTTPCORE-197] Fixed bug causing the non-blocking ChunkDecoder to report some data stream as
+ truncated under special conditions.
+ Contributed by Denis Rogov <denrogov at gmail.com> and Oleg Kalnichevski <olegk at apache.org>
+
+* SSLIOSession#isAppOutputReady and SSLIOSession#isAppInputReady no longer ignore the application
+ event mask causing I/O event notifications for unrequested type of events.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+* [HTTPCORE-193] Fixed problem with SSLIOSession incorrectly handling of end-of-stream condition.
+ Contributed by Asankha C. Perera <asankha at apache.org> and Oleg Kalnichevski <olegk at apache.org>
+
Release 4.0
-------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/91ad309e/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java b/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
index 9958d91..825e655 100644
--- a/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
+++ b/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
@@ -199,11 +199,18 @@ public class ChunkDecoder extends AbstractContentDecoder {
}
int maxLen = this.chunkSize - this.pos;
int len = this.buffer.read(dst, maxLen);
- if (maxLen > 0 && len == 0 && this.endOfStream) {
- throw new MalformedChunkCodingException("Truncated chunk");
+ if (len > 0) {
+ this.pos += len;
+ totalRead += len;
+ } else {
+ if (!this.buffer.hasData() && this.endOfStream) {
+ this.state = COMPLETED;
+ this.completed = true;
+ throw new MalformedChunkCodingException("Truncated chunk "
+ + "( expected size: " + this.chunkSize
+ + "; actual size: " + this.pos + ")");
+ }
}
- this.pos += len;
- totalRead += len;
if (this.pos == this.chunkSize) {
// At the end of the chunk
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/91ad309e/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java b/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
index b4a42a7..35f4f52 100644
--- a/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
+++ b/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
@@ -36,6 +36,7 @@ import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.ByteChannel;
+import java.nio.channels.SelectionKey;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
@@ -72,6 +73,7 @@ public class SSLIOSession implements IOSession, SessionBufferStatus {
private int appEventMask;
private SessionBufferStatus appBufferStatus;
+ private boolean endOfStream;
private volatile int status;
public SSLIOSession(
@@ -163,6 +165,9 @@ public class SSLIOSession implements IOSession, SessionBufferStatus {
if (result.getStatus() == Status.CLOSED) {
this.status = CLOSED;
}
+ if (result.getStatus() == Status.BUFFER_UNDERFLOW && this.endOfStream) {
+ this.status = CLOSED;
+ }
break;
case NEED_TASK:
Runnable r = this.sslEngine.getDelegatedTask();
@@ -246,6 +251,9 @@ public class SSLIOSession implements IOSession, SessionBufferStatus {
if (result.getStatus() == Status.CLOSED) {
this.status = CLOSED;
}
+ if (result.getStatus() == Status.BUFFER_UNDERFLOW && this.endOfStream) {
+ this.status = CLOSED;
+ }
if (result.getStatus() == Status.OK) {
decrypted = true;
}
@@ -256,19 +264,21 @@ public class SSLIOSession implements IOSession, SessionBufferStatus {
public synchronized boolean isAppInputReady() throws IOException {
int bytesRead = receiveEncryptedData();
if (bytesRead == -1) {
- this.status = CLOSED;
+ this.endOfStream = true;
}
doHandshake();
decryptData();
// Some decrypted data is available or at the end of stream
- return this.inPlain.position() > 0 || this.status != ACTIVE;
+ return (this.appEventMask & SelectionKey.OP_READ) > 0
+ && (this.inPlain.position() > 0 || (this.endOfStream && this.status == ACTIVE));
}
/**
* @throws IOException - not thrown currently
*/
public synchronized boolean isAppOutputReady() throws IOException {
- return this.status == ACTIVE
+ return (this.appEventMask & SelectionKey.OP_WRITE) > 0
+ && this.status == ACTIVE
&& this.sslEngine.getHandshakeStatus() == HandshakeStatus.NOT_HANDSHAKING;
}
@@ -324,10 +334,10 @@ public class SSLIOSession implements IOSession, SessionBufferStatus {
this.inPlain.compact();
return n;
} else {
- if (this.status == ACTIVE) {
- return 0;
- } else {
+ if (this.endOfStream) {
return -1;
+ } else {
+ return 0;
}
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/91ad309e/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
index 6301219..dedc9df 100644
--- a/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
+++ b/httpcore-nio/src/test/java/org/apache/http/impl/nio/codecs/TestChunkDecoder.java
@@ -354,6 +354,39 @@ public class TestChunkDecoder extends TestCase {
assertTrue(decoder.isCompleted());
}
+ public void testReadingWitSmallBuffer() throws Exception {
+ String s = "10\r\n1234567890123456\r\n" +
+ "40\r\n12345678901234561234567890123456" +
+ "12345678901234561234567890123456\r\n0\r\n";
+ ReadableByteChannel channel = new ReadableByteChannelMockup(
+ new String[] {s}, "US-ASCII");
+ HttpParams params = new BasicHttpParams();
+
+ SessionInputBuffer inbuf = new SessionInputBufferImpl(1024, 256, params);
+ HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
+ ChunkDecoder decoder = new ChunkDecoder(channel, inbuf, metrics);
+
+ ByteBuffer dst = ByteBuffer.allocate(1024);
+ ByteBuffer tmp = ByteBuffer.allocate(10);
+
+ int bytesRead = 0;
+ while (dst.hasRemaining() && !decoder.isCompleted()) {
+ int i = decoder.read(tmp);
+ if (i > 0) {
+ bytesRead += i;
+ tmp.flip();
+ dst.put(tmp);
+ tmp.compact();
+ }
+ }
+
+ assertEquals(80, bytesRead);
+ assertEquals("12345678901234561234567890123456" +
+ "12345678901234561234567890123456" +
+ "1234567890123456", convert(dst));
+ assertTrue(decoder.isCompleted());
+ }
+
public void testEndOfStreamConditionReadingFooters() throws Exception {
String s = "10\r\n1234567890123456\r\n" +
"5\r\n12345\r\n5\r\n12345\r\n0\r\n";
[20/22] httpcomponents-core git commit: HTTPCORE-228: Fixed NPE in
AsyncNHttpServiceHandler caused by entity enclosing requests if no matching
request handler can be found
Posted by ol...@apache.org.
HTTPCORE-228: Fixed NPE in AsyncNHttpServiceHandler caused by entity enclosing requests if no matching request handler can be found
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@959933 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/c4b80f38
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/c4b80f38
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/c4b80f38
Branch: refs/heads/4.0.x
Commit: c4b80f3830005146a87b387a59ccc3fff62f9c0f
Parents: 6822b0c
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Fri Jul 2 10:07:51 2010 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Fri Jul 2 10:07:51 2010 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 4 ++++
.../nio/protocol/AsyncNHttpServiceHandler.java | 22 ++++++++++----------
2 files changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/c4b80f38/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 5a00c20..c40a741 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,5 +1,9 @@
Changes since 4.0.1
+* [HTTPCORE-228] Fixed NPE in AsyncNHttpServiceHandler caused by entity enclosing requests
+ if no matching request handler can be found.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
* [HTTPCORE-222] Fixed OSGi Import-Package
Contributed by Willem Jiang <willem.jiang at gmail.com>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/c4b80f38/httpcore-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
index cf84174..37ff4a3 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/protocol/AsyncNHttpServiceHandler.java
@@ -177,7 +177,8 @@ public class AsyncNHttpServiceHandler extends NHttpHandlerBase
try {
if (request instanceof HttpEntityEnclosingRequest) {
- if (((HttpEntityEnclosingRequest) request).expectContinue()) {
+ HttpEntityEnclosingRequest entityRequest = (HttpEntityEnclosingRequest) request;
+ if (entityRequest.expectContinue()) {
response = this.responseFactory.newHttpResponse(
ver, HttpStatus.SC_CONTINUE, context);
response.setParams(
@@ -207,20 +208,19 @@ public class AsyncNHttpServiceHandler extends NHttpHandlerBase
}
}
// Request content is expected.
- HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity();
+ ConsumingNHttpEntity consumingEntity = null;
// Lookup request handler for this request
if (requestHandler != null) {
- ConsumingNHttpEntity consumingEntity = requestHandler.entityRequest(
- (HttpEntityEnclosingRequest) request, context);
- if (consumingEntity == null) {
- consumingEntity = new ConsumingNHttpEntityTemplate(
- entity,
- new SkipContentListener(this.allocator));
- }
- ((HttpEntityEnclosingRequest) request).setEntity(consumingEntity);
- connState.setConsumingEntity(consumingEntity);
+ consumingEntity = requestHandler.entityRequest(entityRequest, context);
+ }
+ if (consumingEntity == null) {
+ consumingEntity = new ConsumingNHttpEntityTemplate(
+ entityRequest.getEntity(),
+ new SkipContentListener(this.allocator));
}
+ entityRequest.setEntity(consumingEntity);
+ connState.setConsumingEntity(consumingEntity);
} else {
// No request content is expected.
[21/22] httpcomponents-core git commit: HTTPCORE-229:
AbstractSessionInputBuffer#readLine(CharArrayBuffer) returns incorrect number
of characters read by the method when using non-standard HTTP element charset
Posted by ol...@apache.org.
HTTPCORE-229: AbstractSessionInputBuffer#readLine(CharArrayBuffer) returns incorrect number of characters read by the method when using non-standard HTTP element charset
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@963847 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/6f6d945a
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/6f6d945a
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/6f6d945a
Branch: refs/heads/4.0.x
Commit: 6f6d945a0502d4a571214def758f0253747933ab
Parents: c4b80f3
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Tue Jul 13 20:01:21 2010 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Tue Jul 13 20:01:21 2010 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 4 ++++
.../org/apache/http/impl/io/AbstractSessionInputBuffer.java | 2 ++
.../src/test/java/org/apache/http/impl/TestSessionBuffers.java | 5 ++++-
3 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/6f6d945a/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index c40a741..fd2c2e1 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,5 +1,9 @@
Changes since 4.0.1
+* [HTTPCORE-229] AbstractSessionInputBuffer#readLine(CharArrayBuffer) returns incorrect
+ number of characters read by the method when using non-standard HTTP element charset.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
* [HTTPCORE-228] Fixed NPE in AsyncNHttpServiceHandler caused by entity enclosing requests
if no matching request handler can be found.
Contributed by Oleg Kalnichevski <olegk at apache.org>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/6f6d945a/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java b/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java
index 8672a56..7415b54 100644
--- a/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java
+++ b/httpcore/src/main/java/org/apache/http/impl/io/AbstractSessionInputBuffer.java
@@ -283,6 +283,7 @@ public abstract class AbstractSessionInputBuffer implements SessionInputBuffer {
// This is VERY memory inefficient, BUT since non-ASCII charsets are
// NOT meant to be used anyway, there's no point optimizing it
String s = new String(this.linebuffer.buffer(), 0, l, this.charset);
+ l = s.length();
charbuffer.append(s);
}
return l;
@@ -305,6 +306,7 @@ public abstract class AbstractSessionInputBuffer implements SessionInputBuffer {
// NOT meant to be used anyway, there's no point optimizing it
String s = new String(this.buffer, off, len, this.charset);
charbuffer.append(s);
+ len = s.length();
}
return len;
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/6f6d945a/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java
----------------------------------------------------------------------
diff --git a/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java b/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java
index e658e4f..9fb3685 100644
--- a/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java
+++ b/httpcore/src/test/java/org/apache/http/impl/TestSessionBuffers.java
@@ -468,7 +468,10 @@ public class TestSessionBuffers extends TestCase {
HttpProtocolParams.setHttpElementCharset(params, HTTP.ISO_8859_1);
for (int i = 0; i < 10; i++) {
- assertEquals(s1, inbuffer.readLine());
+ CharArrayBuffer buf = new CharArrayBuffer(64);
+ int len = inbuffer.readLine(buf);
+ assertEquals(len, SWISS_GERMAN_HELLO.length);
+ assertEquals(s1, buf.toString());
}
assertNull(inbuffer.readLine());
assertNull(inbuffer.readLine());
[18/22] httpcomponents-core git commit: HTTPCORE-207:
SocketHttp*Connection classes can leak sockets if the connection is
half-closed Contributed by David Koski
Posted by ol...@apache.org.
HTTPCORE-207: SocketHttp*Connection classes can leak sockets if the connection is half-closed
Contributed by David Koski <david_koski at mac.com>
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@818592 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/e9e665d3
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/e9e665d3
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/e9e665d3
Branch: refs/heads/4.0.x
Commit: e9e665d3bf1a734b8235d2165e075df726736cf1
Parents: 0eb2f62
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Sep 24 19:06:31 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Sep 24 19:06:31 2009 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 3 +++
.../http/impl/SocketHttpClientConnection.java | 24 +++++++++++--------
.../http/impl/SocketHttpServerConnection.java | 25 ++++++++++++--------
3 files changed, 32 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/e9e665d3/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 61b0823..3a3b116 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,5 +1,8 @@
Changes since 4.0.1
+* [HTTPCORE-207] SocketHttp*Connection classes can leak sockets if the connection is half-closed
+ Contributed by David Koski <david_koski at mac.com>
+
* [HTTPCORE-201] OSGi Export-Package to specify release version
Contributed by Oleg Kalnichevski <olegk at apache.org>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/e9e665d3/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java b/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java
index f2ddb06..3b968cf 100644
--- a/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java
+++ b/httpcore/src/main/java/org/apache/http/impl/SocketHttpClientConnection.java
@@ -245,20 +245,24 @@ public class SocketHttpClientConnection
return;
}
this.open = false;
- doFlush();
+ Socket sock = this.socket;
try {
+ doFlush();
try {
- this.socket.shutdownOutput();
- } catch (IOException ignore) {
+ try {
+ sock.shutdownOutput();
+ } catch (IOException ignore) {
+ }
+ try {
+ sock.shutdownInput();
+ } catch (IOException ignore) {
+ }
+ } catch (UnsupportedOperationException ignore) {
+ // if one isn't supported, the other one isn't either
}
- try {
- this.socket.shutdownInput();
- } catch (IOException ignore) {
- }
- } catch (UnsupportedOperationException ignore) {
- // if one isn't supported, the other one isn't either
+ } finally {
+ sock.close();
}
- this.socket.close();
}
}
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/e9e665d3/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java b/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java
index 437bd00..5d006c8 100644
--- a/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java
+++ b/httpcore/src/main/java/org/apache/http/impl/SocketHttpServerConnection.java
@@ -262,20 +262,25 @@ public class SocketHttpServerConnection extends
return;
}
this.open = false;
- doFlush();
+ this.open = false;
+ Socket sock = this.socket;
try {
+ doFlush();
try {
- this.socket.shutdownOutput();
- } catch (IOException ignore) {
- }
- try {
- this.socket.shutdownInput();
- } catch (IOException ignore) {
+ try {
+ sock.shutdownOutput();
+ } catch (IOException ignore) {
+ }
+ try {
+ sock.shutdownInput();
+ } catch (IOException ignore) {
+ }
+ } catch (UnsupportedOperationException ignore) {
+ // if one isn't supported, the other one isn't either
}
- } catch (UnsupportedOperationException ignore) {
- // if one isn't supported, the other one isn't either
+ } finally {
+ sock.close();
}
- this.socket.close();
}
}
[09/22] httpcomponents-core git commit: Updated latest release
version on the download page
Posted by ol...@apache.org.
Updated latest release version on the download page
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@784364 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/f978167d
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/f978167d
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/f978167d
Branch: refs/heads/4.0.x
Commit: f978167debf2d25cccdbbdab97bc61092ed7edb7
Parents: 9f91403
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Sat Jun 13 10:39:35 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Jun 13 10:39:35 2009 +0000
----------------------------------------------------------------------
src/site/apt/download.apt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/f978167d/src/site/apt/download.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/download.apt b/src/site/apt/download.apt
index 23e52d4c..3fe11f9 100644
--- a/src/site/apt/download.apt
+++ b/src/site/apt/download.apt
@@ -36,7 +36,7 @@ HttpCore Downloads
The latest release available for download:
- {{{http://hc.apache.org/downloads.cgi}4.0}} -
+ {{{http://hc.apache.org/downloads.cgi}4.0.1}} -
{{{http://www.apache.org/dist/httpcomponents/httpcore/RELEASE_NOTES.txt}Release Notes}} -
{{{http://www.apache.org/licenses/LICENSE-2.0.html}License}}
@@ -52,7 +52,7 @@ Dependency management with Maven
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
- <version>4.0</version>
+ <version>4.0.1</version>
<scope>compile</scope>
</dependency>
-------------------------
@@ -63,7 +63,7 @@ Dependency management with Maven
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
- <version>4.0</version>
+ <version>4.0.1</version>
<scope>compile</scope>
</dependency>
-------------------------
[07/22] httpcomponents-core git commit: Javadoc fix
Posted by ol...@apache.org.
Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@782093 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/3461e3ef
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/3461e3ef
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/3461e3ef
Branch: refs/heads/4.0.x
Commit: 3461e3ef3716b62de1719f8c746341b9c6935361
Parents: e7313b3
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Fri Jun 5 18:31:53 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Fri Jun 5 18:31:53 2009 +0000
----------------------------------------------------------------------
.../main/java/org/apache/http/nio/util/ExpandableBuffer.java | 5 +++--
.../main/java/org/apache/http/nio/util/SharedInputBuffer.java | 4 +++-
.../main/java/org/apache/http/nio/util/SharedOutputBuffer.java | 4 +++-
.../main/java/org/apache/http/nio/util/SimpleInputBuffer.java | 5 +++--
.../main/java/org/apache/http/nio/util/SimpleOutputBuffer.java | 5 +++--
5 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/3461e3ef/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java
index c54134b..d30e9ea 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/ExpandableBuffer.java
@@ -37,8 +37,9 @@ import java.nio.ByteBuffer;
* A buffer that expand its capacity on demand using {@link ByteBufferAllocator}
* interface. Internally, this class is backed by an instance of
* {@link ByteBuffer}.
- *
- *
+ * <p>
+ * This class is not thread safe.
+ *
* @version $Revision$
*
* @since 4.0
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/3461e3ef/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
index e3ffeec..5b7225e 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
@@ -39,7 +39,9 @@ import org.apache.http.nio.IOControl;
/**
* Implementation of the {@link ContentInputBuffer} interface that can be
* shared by multiple threads, usually the I/O dispatch of an I/O reactor and
- * a worker thread. This class is thread safe.
+ * a worker thread.
+ * <p>
+ * {@link ContentInputBuffer} implemented by this class is thread safe.
*
* @since 4.0
*/
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/3461e3ef/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
index e19fa0c..2bbb12d 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
@@ -39,7 +39,9 @@ import org.apache.http.nio.IOControl;
/**
* Implementation of the {@link ContentOutputBuffer} interface that can be
* shared by multiple threads, usually the I/O dispatch of an I/O reactor and
- * a worker thread. This class is thread safe.
+ * a worker thread.
+ * <p>
+ * {@link ContentOutputBuffer} implemented by this class is thread safe.
*
* @since 4.0
*/
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/3461e3ef/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
index 650c861..eb8cded 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
@@ -35,8 +35,9 @@ import java.io.IOException;
import org.apache.http.nio.ContentDecoder;
/**
- * Simple implementation of the {@link ContentInputBuffer} interface. This class
- * is not threading safe.
+ * Basic implementation of the {@link ContentInputBuffer} interface.
+ * <p>
+ * {@link ContentInputBuffer} implemented by this class is not thread safe.
*
* @since 4.0
*/
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/3461e3ef/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
index 5eea83b..9ca3abb 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
@@ -35,8 +35,9 @@ import java.io.IOException;
import org.apache.http.nio.ContentEncoder;
/**
- * Simple implementation of the {@link ContentOutputBuffer} interface.
- * This class is not threading safe.
+ * Basic implementation of the {@link ContentOutputBuffer} interface.
+ * <p>
+ * {@link ContentOutputBuffer} implemented by this class is not thread safe.
*
* @since 4.0
*/
[16/22] httpcomponents-core git commit: HTTPCORE-202: Expect header
value sent as '100-Continue' and not '100-continue'
Posted by ol...@apache.org.
HTTPCORE-202: Expect header value sent as '100-Continue' and not '100-continue'
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@803998 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/04d6ff75
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/04d6ff75
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/04d6ff75
Branch: refs/heads/4.0.x
Commit: 04d6ff7548c54c650e8ccbd7d973aea611fc1f83
Parents: 0d2b1ad
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Aug 13 19:25:07 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Aug 13 19:25:07 2009 +0000
----------------------------------------------------------------------
httpcore/src/main/java/org/apache/http/protocol/HTTP.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/04d6ff75/httpcore/src/main/java/org/apache/http/protocol/HTTP.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/protocol/HTTP.java b/httpcore/src/main/java/org/apache/http/protocol/HTTP.java
index d745244..8e467a5 100644
--- a/httpcore/src/main/java/org/apache/http/protocol/HTTP.java
+++ b/httpcore/src/main/java/org/apache/http/protocol/HTTP.java
@@ -59,7 +59,7 @@ public final class HTTP {
public static final String SERVER_HEADER = "Server";
/** HTTP expectations */
- public static final String EXPECT_CONTINUE = "100-Continue";
+ public static final String EXPECT_CONTINUE = "100-continue";
/** HTTP connection control */
public static final String CONN_CLOSE = "Close";
[19/22] httpcomponents-core git commit: HTTPCORE-222: Fixed
Import-Package in the OSGi META-INF Contributed by Willem Jiang
Posted by ol...@apache.org.
HTTPCORE-222: Fixed Import-Package in the OSGi META-INF
Contributed by Willem Jiang <willem.jiang at gmail.com>
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@925173 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/6822b0c3
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/6822b0c3
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/6822b0c3
Branch: refs/heads/4.0.x
Commit: 6822b0c3f88241d3e2487169beb52cad82afc204
Parents: e9e665d
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Fri Mar 19 10:40:00 2010 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Fri Mar 19 10:40:00 2010 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 3 +++
httpcore-osgi/pom.xml | 1 +
2 files changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/6822b0c3/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 3a3b116..5a00c20 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,5 +1,8 @@
Changes since 4.0.1
+* [HTTPCORE-222] Fixed OSGi Import-Package
+ Contributed by Willem Jiang <willem.jiang at gmail.com>
+
* [HTTPCORE-207] SocketHttp*Connection classes can leak sockets if the connection is half-closed
Contributed by David Koski <david_koski at mac.com>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/6822b0c3/httpcore-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-osgi/pom.xml b/httpcore-osgi/pom.xml
index 482f446..0fe75c9 100644
--- a/httpcore-osgi/pom.xml
+++ b/httpcore-osgi/pom.xml
@@ -84,6 +84,7 @@
<instructions>
<Bundle-Name>Apache ${pom.name}</Bundle-Name>
<Bundle-SymbolicName>${pom.groupId}.httpcore</Bundle-SymbolicName>
+ <Import-Package>!org.apache.http*,*</Import-Package>
<_exportcontents>org.apache.http.*;version=${project.version}</_exportcontents>
<Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
</instructions>
[06/22] httpcomponents-core git commit: Javadoc fix
Posted by ol...@apache.org.
Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@781814 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/e7313b3c
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/e7313b3c
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/e7313b3c
Branch: refs/heads/4.0.x
Commit: e7313b3c5e361fbc81939c2bd5ae5931dc50a853
Parents: 5f9ab8e
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Jun 4 18:07:42 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Jun 4 18:07:42 2009 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/http/nio/util/SharedInputBuffer.java | 2 +-
.../src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/e7313b3c/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
index 1488183..e3ffeec 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
@@ -39,7 +39,7 @@ import org.apache.http.nio.IOControl;
/**
* Implementation of the {@link ContentInputBuffer} interface that can be
* shared by multiple threads, usually the I/O dispatch of an I/O reactor and
- * a worker tread. This class is not threading safe.
+ * a worker thread. This class is thread safe.
*
* @since 4.0
*/
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/e7313b3c/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
index 165b23a..e19fa0c 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
@@ -39,7 +39,7 @@ import org.apache.http.nio.IOControl;
/**
* Implementation of the {@link ContentOutputBuffer} interface that can be
* shared by multiple threads, usually the I/O dispatch of an I/O reactor and
- * a worker tread. This class is not threading safe.
+ * a worker thread. This class is thread safe.
*
* @since 4.0
*/
[04/22] httpcomponents-core git commit: Backported HTTPCORE-196 to
4.0.x branch
Posted by ol...@apache.org.
Backported HTTPCORE-196 to 4.0.x branch
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@777118 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/4e87e341
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/4e87e341
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/4e87e341
Branch: refs/heads/4.0.x
Commit: 4e87e341af5a6d0034eee7ecc79f90f4122c4190
Parents: 91ad309
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu May 21 13:58:05 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu May 21 13:58:05 2009 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 4 ++++
.../org/apache/http/impl/nio/reactor/SSLIOSession.java | 11 +++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/4e87e341/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index 88115e1..d68e822 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,6 +1,10 @@
Changes since 4.0
-------------------
+* [HTTPCORE-196] SSLIOSession now unwraps encrypted data more aggressively eliminating long
+ pauses when receiving data over non-blocking connections.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
* [HTTPCORE-197] Fixed bug causing the non-blocking ChunkDecoder to report some data stream as
truncated under special conditions.
Contributed by Denis Rogov <denrogov at gmail.com> and Oleg Kalnichevski <olegk at apache.org>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/4e87e341/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java b/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
index 35f4f52..beae5cb 100644
--- a/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
+++ b/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
@@ -244,17 +244,20 @@ public class SSLIOSession implements IOSession, SessionBufferStatus {
private boolean decryptData() throws SSLException {
boolean decrypted = false;
- if (this.inEncrypted.position() > 0) {
+ SSLEngineResult.Status opStatus = Status.OK;
+ while (this.inEncrypted.position() > 0 && opStatus == Status.OK) {
this.inEncrypted.flip();
SSLEngineResult result = this.sslEngine.unwrap(this.inEncrypted, this.inPlain);
this.inEncrypted.compact();
- if (result.getStatus() == Status.CLOSED) {
+
+ opStatus = result.getStatus();
+ if (opStatus == Status.CLOSED) {
this.status = CLOSED;
}
- if (result.getStatus() == Status.BUFFER_UNDERFLOW && this.endOfStream) {
+ if (opStatus == Status.BUFFER_UNDERFLOW && this.endOfStream) {
this.status = CLOSED;
}
- if (result.getStatus() == Status.OK) {
+ if (opStatus == Status.OK) {
decrypted = true;
}
}
[05/22] httpcomponents-core git commit: HTTPCORE-198: CONNECT request
includes Host header for HTTP 1.1 connections
Posted by ol...@apache.org.
HTTPCORE-198: CONNECT request includes Host header for HTTP 1.1 connections
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@781114 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/5f9ab8e2
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/5f9ab8e2
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/5f9ab8e2
Branch: refs/heads/4.0.x
Commit: 5f9ab8e229c57d46cc27c7414f7316e8ccedc1b5
Parents: 4e87e34
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Tue Jun 2 18:23:51 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Tue Jun 2 18:23:51 2009 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 3 +++
.../apache/http/protocol/RequestTargetHost.java | 4 ++--
.../http/protocol/TestStandardInterceptors.java | 23 ++++++++++++++++++++
3 files changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/5f9ab8e2/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index d68e822..c52abc5 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,6 +1,9 @@
Changes since 4.0
-------------------
+* [HTTPCORE-198] CONNECT request includes Host header for HTTP 1.1 connections.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
* [HTTPCORE-196] SSLIOSession now unwraps encrypted data more aggressively eliminating long
pauses when receiving data over non-blocking connections.
Contributed by Oleg Kalnichevski <olegk at apache.org>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/5f9ab8e2/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java b/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java
index d853f1f..4383da6 100644
--- a/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java
+++ b/httpcore/src/main/java/org/apache/http/protocol/RequestTargetHost.java
@@ -68,8 +68,9 @@ public class RequestTargetHost implements HttpRequestInterceptor {
throw new IllegalArgumentException("HTTP context may not be null");
}
+ ProtocolVersion ver = request.getRequestLine().getProtocolVersion();
String method = request.getRequestLine().getMethod();
- if (method.equalsIgnoreCase("CONNECT")) {
+ if (method.equalsIgnoreCase("CONNECT") && ver.lessEquals(HttpVersion.HTTP_1_0)) {
return;
}
@@ -89,7 +90,6 @@ public class RequestTargetHost implements HttpRequestInterceptor {
}
}
if (targethost == null) {
- ProtocolVersion ver = request.getRequestLine().getProtocolVersion();
if (ver.lessEquals(HttpVersion.HTTP_1_0)) {
return;
} else {
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/5f9ab8e2/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
----------------------------------------------------------------------
diff --git a/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java b/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
index 609b8e2..1592b29 100644
--- a/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
+++ b/httpcore/src/test/java/org/apache/http/protocol/TestStandardInterceptors.java
@@ -399,6 +399,29 @@ public class TestStandardInterceptors extends TestCase {
}
}
+ public void testRequestTargetHostConnectHttp11() throws Exception {
+ HttpContext context = new BasicHttpContext(null);
+ HttpHost host = new HttpHost("somehost", 8080, "http");
+ context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, host);
+ BasicHttpRequest request = new BasicHttpRequest("CONNECT", "/");
+ RequestTargetHost interceptor = new RequestTargetHost();
+ interceptor.process(request, context);
+ Header header = request.getFirstHeader(HTTP.TARGET_HOST);
+ assertNotNull(header);
+ assertEquals("somehost:8080", header.getValue());
+ }
+
+ public void testRequestTargetHostConnectHttp10() throws Exception {
+ HttpContext context = new BasicHttpContext(null);
+ HttpHost host = new HttpHost("somehost", 8080, "http");
+ context.setAttribute(ExecutionContext.HTTP_TARGET_HOST, host);
+ BasicHttpRequest request = new BasicHttpRequest("CONNECT", "/", HttpVersion.HTTP_1_0);
+ RequestTargetHost interceptor = new RequestTargetHost();
+ interceptor.process(request, context);
+ Header header = request.getFirstHeader(HTTP.TARGET_HOST);
+ assertNull(header);
+ }
+
public void testRequestUserAgentGenerated() throws Exception {
HttpContext context = new BasicHttpContext(null);
BasicHttpRequest request = new BasicHttpRequest("GET", "/");
[22/22] httpcomponents-core git commit: HTTPCORE-231: Fixed incorrect
handling of HTTP entities by non-blocking LengthDelimitedDecoder when the
Content-Length value is larger than Integer.MAX_VALUE
Posted by ol...@apache.org.
HTTPCORE-231: Fixed incorrect handling of HTTP entities by non-blocking LengthDelimitedDecoder when the Content-Length value is larger than Integer.MAX_VALUE
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@995230 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/83e825f8
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/83e825f8
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/83e825f8
Branch: refs/heads/4.0.x
Commit: 83e825f882e070cd004273702b1170d48afe2d82
Parents: 6f6d945
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Wed Sep 8 19:50:51 2010 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Wed Sep 8 19:50:51 2010 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 4 ++++
.../impl/nio/codecs/LengthDelimitedDecoder.java | 16 ++++++++--------
2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/83e825f8/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index fd2c2e1..cab6e20 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,5 +1,9 @@
Changes since 4.0.1
+* [HTTPCORE-231] Fixed incorrect handling of HTTP entities by non-blocking LengthDelimitedDecoder
+ when the Content-Length value is larger than Integer.MAX_VALUE.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
* [HTTPCORE-229] AbstractSessionInputBuffer#readLine(CharArrayBuffer) returns incorrect
number of characters read by the method when using non-standard HTTP element charset.
Contributed by Oleg Kalnichevski <olegk at apache.org>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/83e825f8/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java b/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
index c73fa96..2d916cb 100644
--- a/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
+++ b/httpcore-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
@@ -82,16 +82,16 @@ public class LengthDelimitedDecoder extends AbstractContentDecoder
if (this.completed) {
return -1;
}
- int lenRemaining = (int) (this.contentLength - this.len);
+ int chunk = (int) Math.min((this.contentLength - this.len), Integer.MAX_VALUE);
int bytesRead;
if (this.buffer.hasData()) {
- int maxLen = Math.min(lenRemaining, this.buffer.length());
+ int maxLen = Math.min(chunk, this.buffer.length());
bytesRead = this.buffer.read(dst, maxLen);
} else {
- if (dst.remaining() > lenRemaining) {
+ if (dst.remaining() > chunk) {
int oldLimit = dst.limit();
- int newLimit = oldLimit - (dst.remaining() - lenRemaining);
+ int newLimit = oldLimit - (dst.remaining() - chunk);
dst.limit(newLimit);
bytesRead = this.channel.read(dst);
dst.limit(oldLimit);
@@ -125,16 +125,16 @@ public class LengthDelimitedDecoder extends AbstractContentDecoder
return -1;
}
- int lenRemaining = (int) (this.contentLength - this.len);
+ int chunk = (int) Math.min((this.contentLength - this.len), Integer.MAX_VALUE);
long bytesRead;
if (this.buffer.hasData()) {
- int maxLen = Math.min(lenRemaining, this.buffer.length());
+ int maxLen = Math.min(chunk, this.buffer.length());
dst.position(position);
bytesRead = this.buffer.read(dst, maxLen);
} else {
- if (count > lenRemaining) {
- count = lenRemaining;
+ if (count > chunk) {
+ count = chunk;
}
if (this.channel.isOpen()) {
if(dst.size() < position)
[13/22] httpcomponents-core git commit: [maven-release-plugin]
prepare release 4.0.1
Posted by ol...@apache.org.
[maven-release-plugin] prepare release 4.0.1
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@786183 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/7ba1f602
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/7ba1f602
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/7ba1f602
Branch: refs/heads/4.0.x
Commit: 7ba1f6024b8c8aadaf85e9f39d0f3a4b180ca5ce
Parents: 9442b6a
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Jun 18 17:52:53 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Jun 18 17:52:53 2009 +0000
----------------------------------------------------------------------
httpcore-nio/pom.xml | 2 +-
httpcore-osgi/pom.xml | 2 +-
httpcore/pom.xml | 2 +-
pom.xml | 8 ++++----
4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/7ba1f602/httpcore-nio/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-nio/pom.xml b/httpcore-nio/pom.xml
index de70566..e493aea 100644
--- a/httpcore-nio/pom.xml
+++ b/httpcore-nio/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.0.1</version>
</parent>
<artifactId>httpcore-nio</artifactId>
<name>HttpCore NIO</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/7ba1f602/httpcore-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-osgi/pom.xml b/httpcore-osgi/pom.xml
index 6be4490..b0f1343 100644
--- a/httpcore-osgi/pom.xml
+++ b/httpcore-osgi/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.0.1</version>
</parent>
<artifactId>httpcore-osgi</artifactId>
<name>HttpCore OSGi bundle</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/7ba1f602/httpcore/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore/pom.xml b/httpcore/pom.xml
index 93623a7..0855b3a 100644
--- a/httpcore/pom.xml
+++ b/httpcore/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.0.1</version>
</parent>
<artifactId>httpcore</artifactId>
<name>HttpCore</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/7ba1f602/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 820ea8c..29f2d7c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
<name>HttpComponents Core</name>
- <version>4.0.1-SNAPSHOT</version>
+ <version>4.0.1</version>
<description>Core components to build HTTP enabled services</description>
<url>http://hc.apache.org/httpcomponents-core/</url>
<inceptionYear>2005</inceptionYear>
@@ -64,9 +64,9 @@
</issueManagement>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk</developerConnection>
- <url>http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1</developerConnection>
+ <url>http://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1</url>
</scm>
<modules>
[08/22] httpcomponents-core git commit: Javadoc fix
Posted by ol...@apache.org.
Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@782232 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/9f914033
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/9f914033
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/9f914033
Branch: refs/heads/4.0.x
Commit: 9f914033ae01e58c029f78525e14b0a1445ee1e5
Parents: 3461e3e
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Sat Jun 6 11:36:04 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Jun 6 11:36:04 2009 +0000
----------------------------------------------------------------------
.../src/main/java/org/apache/http/nio/util/SharedInputBuffer.java | 3 ++-
.../main/java/org/apache/http/nio/util/SharedOutputBuffer.java | 3 ++-
.../src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java | 2 +-
.../main/java/org/apache/http/nio/util/SimpleOutputBuffer.java | 2 +-
4 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9f914033/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
index 5b7225e..48d841c 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedInputBuffer.java
@@ -41,7 +41,8 @@ import org.apache.http.nio.IOControl;
* shared by multiple threads, usually the I/O dispatch of an I/O reactor and
* a worker thread.
* <p>
- * {@link ContentInputBuffer} implemented by this class is thread safe.
+ * Please note this class is thread safe only when used though
+ * the {@link ContentInputBuffer} interface.
*
* @since 4.0
*/
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9f914033/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
index 2bbb12d..d278042 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SharedOutputBuffer.java
@@ -41,7 +41,8 @@ import org.apache.http.nio.IOControl;
* shared by multiple threads, usually the I/O dispatch of an I/O reactor and
* a worker thread.
* <p>
- * {@link ContentOutputBuffer} implemented by this class is thread safe.
+ * Please note this class is thread safe only when used though
+ * the {@link ContentOutputBuffer} interface.
*
* @since 4.0
*/
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9f914033/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
index eb8cded..fb63869 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleInputBuffer.java
@@ -37,7 +37,7 @@ import org.apache.http.nio.ContentDecoder;
/**
* Basic implementation of the {@link ContentInputBuffer} interface.
* <p>
- * {@link ContentInputBuffer} implemented by this class is not thread safe.
+ * This class is not thread safe.
*
* @since 4.0
*/
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9f914033/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java b/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
index 9ca3abb..ff0169c 100644
--- a/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
+++ b/httpcore-nio/src/main/java/org/apache/http/nio/util/SimpleOutputBuffer.java
@@ -37,7 +37,7 @@ import org.apache.http.nio.ContentEncoder;
/**
* Basic implementation of the {@link ContentOutputBuffer} interface.
* <p>
- * {@link ContentOutputBuffer} implemented by this class is not thread safe.
+ * This class is not thread safe.
*
* @since 4.0
*/
[12/22] httpcomponents-core git commit: Added 4.0.1 release notes
Posted by ol...@apache.org.
Added 4.0.1 release notes
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@784376 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/9442b6a4
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/9442b6a4
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/9442b6a4
Branch: refs/heads/4.0.x
Commit: 9442b6a46369bde5768681b31c1955067688aaf1
Parents: 11ec84a
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Sat Jun 13 11:31:33 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Jun 13 11:31:33 2009 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9442b6a4/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index c52abc5..b71436f 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,6 +1,9 @@
-Changes since 4.0
+Release 4.0.1
-------------------
+This is a patch release addressing a number of issues discovered since the 4.0 release. Users
+of NIO module are advised to upgrade.
+
* [HTTPCORE-198] CONNECT request includes Host header for HTTP 1.1 connections.
Contributed by Oleg Kalnichevski <olegk at apache.org>
[10/22] httpcomponents-core git commit: Downgraded Apache Felix
bundle plugin to version 1.4.3
Posted by ol...@apache.org.
Downgraded Apache Felix bundle plugin to version 1.4.3
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@784372 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/004bc62d
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/004bc62d
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/004bc62d
Branch: refs/heads/4.0.x
Commit: 004bc62d25ae04645a55e00c679f62a170b5a075
Parents: f978167
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Sat Jun 13 11:14:06 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Jun 13 11:14:06 2009 +0000
----------------------------------------------------------------------
httpcore-osgi/pom.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/004bc62d/httpcore-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-osgi/pom.xml b/httpcore-osgi/pom.xml
index 06b1dd0..6be4490 100644
--- a/httpcore-osgi/pom.xml
+++ b/httpcore-osgi/pom.xml
@@ -78,6 +78,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
+ <version>1.4.3</version>
<extensions>true</extensions>
<configuration>
<instructions>
[14/22] httpcomponents-core git commit: upgrade version to
4.0.2-SNAPSHOT
Posted by ol...@apache.org.
upgrade version to 4.0.2-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@786188 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/689ade3c
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/689ade3c
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/689ade3c
Branch: refs/heads/4.0.x
Commit: 689ade3cc2853a4e6f9c44aa4de7b59be3eca580
Parents: 7ba1f60
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Jun 18 18:04:13 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Jun 18 18:04:13 2009 +0000
----------------------------------------------------------------------
httpcore-nio/pom.xml | 2 +-
httpcore-osgi/pom.xml | 2 +-
httpcore/pom.xml | 2 +-
pom.xml | 8 ++++----
4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/689ade3c/httpcore-nio/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-nio/pom.xml b/httpcore-nio/pom.xml
index e493aea..1c599ba 100644
--- a/httpcore-nio/pom.xml
+++ b/httpcore-nio/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.0.1</version>
+ <version>4.0.2-SNAPSHOT</version>
</parent>
<artifactId>httpcore-nio</artifactId>
<name>HttpCore NIO</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/689ade3c/httpcore-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-osgi/pom.xml b/httpcore-osgi/pom.xml
index b0f1343..26053dd 100644
--- a/httpcore-osgi/pom.xml
+++ b/httpcore-osgi/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.0.1</version>
+ <version>4.0.2-SNAPSHOT</version>
</parent>
<artifactId>httpcore-osgi</artifactId>
<name>HttpCore OSGi bundle</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/689ade3c/httpcore/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore/pom.xml b/httpcore/pom.xml
index 0855b3a..733add4 100644
--- a/httpcore/pom.xml
+++ b/httpcore/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.0.1</version>
+ <version>4.0.2-SNAPSHOT</version>
</parent>
<artifactId>httpcore</artifactId>
<name>HttpCore</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/689ade3c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 29f2d7c..dbe5d4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
<name>HttpComponents Core</name>
- <version>4.0.1</version>
+ <version>4.0.2-SNAPSHOT</version>
<description>Core components to build HTTP enabled services</description>
<url>http://hc.apache.org/httpcomponents-core/</url>
<inceptionYear>2005</inceptionYear>
@@ -64,9 +64,9 @@
</issueManagement>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1</developerConnection>
- <url>http://svn.apache.org/repos/asf/httpcomponents/httpcore/tags/4.0.1</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x</developerConnection>
+ <url>http://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x</url>
</scm>
<modules>
[11/22] httpcomponents-core git commit: Fixed OSGi bundle assembly
Posted by ol...@apache.org.
Fixed OSGi bundle assembly
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@784375 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/11ec84a9
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/11ec84a9
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/11ec84a9
Branch: refs/heads/4.0.x
Commit: 11ec84a926962db70fafda7159e7508baeccdddd
Parents: 004bc62
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Sat Jun 13 11:30:54 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Sat Jun 13 11:30:54 2009 +0000
----------------------------------------------------------------------
src/main/assembly/osgi-bin.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/11ec84a9/src/main/assembly/osgi-bin.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/osgi-bin.xml b/src/main/assembly/osgi-bin.xml
index 6a113e8..234045a 100644
--- a/src/main/assembly/osgi-bin.xml
+++ b/src/main/assembly/osgi-bin.xml
@@ -35,7 +35,7 @@
</formats>
<fileSets>
<fileSet>
- <directory>module-osgi-bundle/target</directory>
+ <directory>httpcore-osgi/target</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>*.jar</include>
[02/22] httpcomponents-core git commit: Set version to 4.0.1-SNAPSHOT
Posted by ol...@apache.org.
Set version to 4.0.1-SNAPSHOT
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@751781 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/9043655d
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/9043655d
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/9043655d
Branch: refs/heads/4.0.x
Commit: 9043655d1c869c3b9597544f12ebc743de6982db
Parents: cbcf8c6
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Mon Mar 9 18:06:59 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Mon Mar 9 18:06:59 2009 +0000
----------------------------------------------------------------------
httpcore-nio/pom.xml | 2 +-
httpcore-osgi/pom.xml | 2 +-
httpcore/pom.xml | 2 +-
pom.xml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9043655d/httpcore-nio/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-nio/pom.xml b/httpcore-nio/pom.xml
index 940f3c9..de70566 100644
--- a/httpcore-nio/pom.xml
+++ b/httpcore-nio/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.1-SNAPSHOT</version>
+ <version>4.0.1-SNAPSHOT</version>
</parent>
<artifactId>httpcore-nio</artifactId>
<name>HttpCore NIO</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9043655d/httpcore-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-osgi/pom.xml b/httpcore-osgi/pom.xml
index 70feef0..06b1dd0 100644
--- a/httpcore-osgi/pom.xml
+++ b/httpcore-osgi/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.1-SNAPSHOT</version>
+ <version>4.0.1-SNAPSHOT</version>
</parent>
<artifactId>httpcore-osgi</artifactId>
<name>HttpCore OSGi bundle</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9043655d/httpcore/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore/pom.xml b/httpcore/pom.xml
index 9ecef53..93623a7 100644
--- a/httpcore/pom.xml
+++ b/httpcore/pom.xml
@@ -34,7 +34,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
- <version>4.1-SNAPSHOT</version>
+ <version>4.0.1-SNAPSHOT</version>
</parent>
<artifactId>httpcore</artifactId>
<name>HttpCore</name>
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/9043655d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 20773e3..820ea8c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,7 +39,7 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-core</artifactId>
<name>HttpComponents Core</name>
- <version>4.1-SNAPSHOT</version>
+ <version>4.0.1-SNAPSHOT</version>
<description>Core components to build HTTP enabled services</description>
<url>http://hc.apache.org/httpcomponents-core/</url>
<inceptionYear>2005</inceptionYear>
[15/22] httpcomponents-core git commit: HTTPCORE-201: OSGi
Export-Package doesn't specify version
Posted by ol...@apache.org.
HTTPCORE-201: OSGi Export-Package doesn't specify version
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x@801390 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/0d2b1adb
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/0d2b1adb
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/0d2b1adb
Branch: refs/heads/4.0.x
Commit: 0d2b1adb3c2205ad32f086f19bd3d2700dea3016
Parents: 689ade3
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Wed Aug 5 19:54:22 2009 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Wed Aug 5 19:54:22 2009 +0000
----------------------------------------------------------------------
RELEASE_NOTES.txt | 6 ++++++
httpcore-osgi/pom.xml | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/0d2b1adb/RELEASE_NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
index b71436f..61b0823 100644
--- a/RELEASE_NOTES.txt
+++ b/RELEASE_NOTES.txt
@@ -1,3 +1,9 @@
+Changes since 4.0.1
+
+* [HTTPCORE-201] OSGi Export-Package to specify release version
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+
Release 4.0.1
-------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/0d2b1adb/httpcore-osgi/pom.xml
----------------------------------------------------------------------
diff --git a/httpcore-osgi/pom.xml b/httpcore-osgi/pom.xml
index 26053dd..482f446 100644
--- a/httpcore-osgi/pom.xml
+++ b/httpcore-osgi/pom.xml
@@ -84,7 +84,7 @@
<instructions>
<Bundle-Name>Apache ${pom.name}</Bundle-Name>
<Bundle-SymbolicName>${pom.groupId}.httpcore</Bundle-SymbolicName>
- <_exportcontents>org.apache.http.*</_exportcontents>
+ <_exportcontents>org.apache.http.*;version=${project.version}</_exportcontents>
<Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
</instructions>
</configuration>