Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>org.simpleframework</groupId>
<artifactId>simple</artifactId>
<packaging>pom</packaging>
<version>6.0.1</version>
<version>6.0.2</version>
<name>Simple</name>
<modules>
<module>simple-common</module>
Expand Down
2 changes: 1 addition & 1 deletion simple/simple-common/build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build.version=6.0.1
build.version=6.0.2
build.name=simple-common
build.description=Simple Common
6 changes: 3 additions & 3 deletions simple/simple-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>org.simpleframework</groupId>
<artifactId>simple-common</artifactId>
<packaging>jar</packaging>
<version>6.0.1</version>
<version>6.0.2</version>
<name>Simple Common</name>
<url>http://www.simpleframework.org</url>
<description>Simple is a high performance asynchronous HTTP framework for Java</description>
Expand Down Expand Up @@ -65,8 +65,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions simple/simple-common/script/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,14 @@ public String encode(String charset) throws IOException {
*/
private String convert(InputStream source, String charset, int count) throws IOException {
byte[] buffer = new byte[count];
int left = count;

while(left > 0) {
int size = source.read(buffer, 0, left);
int read;
for(int offset = 0; offset < count; offset+=read) {
read = source.read(buffer, offset, count-offset);

if(size == -1) {
if(read <= -1) {
throw new BufferException("Could not read buffer");
}
left -= count;
}
return new String(buffer, charset);
}
Expand Down Expand Up @@ -530,10 +529,10 @@ public Range(InputStream source, long length) {
*/
@Override
public int read() throws IOException {
if(length-- > 0) {
if(length >= 1) {
length--;
return in.read();
}
if(length <= 0) {
} else {
close();
}
return -1;
Expand Down
2 changes: 1 addition & 1 deletion simple/simple-http/build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build.version=6.0.1
build.version=6.0.2
build.name=simple-http
build.description=Simple HTTP
10 changes: 5 additions & 5 deletions simple/simple-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>org.simpleframework</groupId>
<artifactId>simple-http</artifactId>
<packaging>jar</packaging>
<version>6.0.1</version>
<version>6.0.2</version>
<name>Simple HTTP</name>
<url>http://www.simpleframework.org</url>
<description>Simple is a high performance asynchronous HTTP framework for Java</description>
Expand Down Expand Up @@ -40,12 +40,12 @@
<dependency>
<groupId>org.simpleframework</groupId>
<artifactId>simple-common</artifactId>
<version>6.0.1</version>
<version>6.0.2</version>
</dependency>
<dependency>
<groupId>org.simpleframework</groupId>
<artifactId>simple-transport</artifactId>
<version>6.0.1</version>
<version>6.0.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -75,8 +75,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions simple/simple-http/script/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class RequestCollector implements Collector {
* an internal buffer to store the consumed body.
*
* @param allocator this is the allocator used to buffer data
* @param tracker this is the tracker used to create sessions
* @param channel this is the channel used to read the data
*/
public RequestCollector(Allocator allocator, Channel channel) {
Expand Down
2 changes: 1 addition & 1 deletion simple/simple-transport/build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
build.version=6.0.1
build.version=6.0.2
build.name=simple-transport
build.description=Simple Transport
8 changes: 4 additions & 4 deletions simple/simple-transport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>org.simpleframework</groupId>
<artifactId>simple-transport</artifactId>
<packaging>jar</packaging>
<version>6.0.1</version>
<version>6.0.2</version>
<name>Simple Transport</name>
<url>http://www.simpleframework.org</url>
<description>Simple is a high performance asynchronous HTTP framework for Java</description>
Expand Down Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>org.simpleframework</groupId>
<artifactId>simple-common</artifactId>
<version>6.0.1</version>
<version>6.0.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -70,8 +70,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions simple/simple-transport/script/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,22 +431,16 @@ private void execute() throws IOException {
* @return this returns true when the message has been read
*/
public boolean receive() throws IOException {
int count = input.capacity();

if(count > 0) {
input.compact();
}
input.compact(); // maximize read buffer
int size = channel.read(input);
input.flip();

if(trace != null) {
trace.trace(READ, size);
}
if(size < 0) {
throw new TransportException("Client closed connection");
}
if(count > 0) {
input.flip();
}
return size > 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public Future<Certificate> challenge() {
* completion of the SSL renegotiation results in the client
* providing their certificate, and execution of the task.
*
* @param completion task to be run on successful challenge
* @param task to be run on successful challenge
*/
public Future<Certificate> challenge(Runnable task) {
try {
Expand All @@ -238,7 +238,7 @@ public Future<Certificate> challenge(Runnable task) {
* completion of the SSL renegotiation results in the client
* providing their certificate, and execution of the task.
*
* @param completion task to be run on successful challenge
* @param task to be run on successful challenge
*/
private void resume(Runnable task) {
try {
Expand Down
Loading