This commit is contained in:
@@ -143,7 +143,7 @@ public class HttpRequest extends Request<HttpContext> {
|
|||||||
header.addValue(name, value);
|
header.addValue(name, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
array.reset();
|
array.clear();
|
||||||
if (buffer.hasRemaining()) array.write(buffer, buffer.remaining());
|
if (buffer.hasRemaining()) array.write(buffer, buffer.remaining());
|
||||||
if (this.contentType != null && this.contentType.contains("boundary=")) {
|
if (this.contentType != null && this.contentType.contains("boundary=")) {
|
||||||
this.boundary = true;
|
this.boundary = true;
|
||||||
@@ -321,7 +321,7 @@ public class HttpRequest extends Request<HttpContext> {
|
|||||||
|
|
||||||
this.header.clear();
|
this.header.clear();
|
||||||
this.params.clear();
|
this.params.clear();
|
||||||
this.array.reset();
|
this.array.clear();
|
||||||
super.recycle();
|
super.recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ public final class MultiContext {
|
|||||||
|
|
||||||
private String readLine(boolean bd) throws IOException { // bd : 是否是读取boundary
|
private String readLine(boolean bd) throws IOException { // bd : 是否是读取boundary
|
||||||
byte lasted = '\r';
|
byte lasted = '\r';
|
||||||
buf.reset();
|
buf.clear();
|
||||||
final int bc = this.endboundarray.length;
|
final int bc = this.endboundarray.length;
|
||||||
int c = 0;
|
int c = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public final class ByteArray {
|
|||||||
content = new byte[Math.max(128, size)];
|
content = new byte[Math.max(128, size)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void clear() {
|
||||||
this.count = 0;
|
this.count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ public final class ByteArray {
|
|||||||
|
|
||||||
public String toStringAndReset(final Charset charset) {
|
public String toStringAndReset(final Charset charset) {
|
||||||
String str = toString(0, count, charset);
|
String str = toString(0, count, charset);
|
||||||
reset();
|
clear();
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user