Fix compile errors caused by last commit
This commit is contained in:
parent
f84a50d3cb
commit
a01f246091
@ -687,29 +687,29 @@ public class HttpPostMultipartRequestDecoder implements InterfaceHttpPostRequest
|
|||||||
currentFieldAttributes.put(attribute.getName(), attribute);
|
currentFieldAttributes.put(attribute.getName(), attribute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (contents[0].equalsIgnoreCase(HttpHeaders.Names.CONTENT_TRANSFER_ENCODING)) {
|
} else if (contents[0].equalsIgnoreCase(HttpHeaders.Names.CONTENT_TRANSFER_ENCODING.toString())) {
|
||||||
Attribute attribute;
|
Attribute attribute;
|
||||||
try {
|
try {
|
||||||
attribute = factory.createAttribute(request, HttpHeaders.Names.CONTENT_TRANSFER_ENCODING,
|
attribute = factory.createAttribute(request, HttpHeaders.Names.CONTENT_TRANSFER_ENCODING.toString(),
|
||||||
cleanString(contents[1]));
|
cleanString(contents[1]));
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
throw new ErrorDataDecoderException(e);
|
throw new ErrorDataDecoderException(e);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new ErrorDataDecoderException(e);
|
throw new ErrorDataDecoderException(e);
|
||||||
}
|
}
|
||||||
currentFieldAttributes.put(HttpHeaders.Names.CONTENT_TRANSFER_ENCODING, attribute);
|
currentFieldAttributes.put(HttpHeaders.Names.CONTENT_TRANSFER_ENCODING.toString(), attribute);
|
||||||
} else if (contents[0].equalsIgnoreCase(HttpHeaders.Names.CONTENT_LENGTH)) {
|
} else if (contents[0].equalsIgnoreCase(HttpHeaders.Names.CONTENT_LENGTH.toString())) {
|
||||||
Attribute attribute;
|
Attribute attribute;
|
||||||
try {
|
try {
|
||||||
attribute = factory.createAttribute(request, HttpHeaders.Names.CONTENT_LENGTH,
|
attribute = factory.createAttribute(request, HttpHeaders.Names.CONTENT_LENGTH.toString(),
|
||||||
cleanString(contents[1]));
|
cleanString(contents[1]));
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
throw new ErrorDataDecoderException(e);
|
throw new ErrorDataDecoderException(e);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new ErrorDataDecoderException(e);
|
throw new ErrorDataDecoderException(e);
|
||||||
}
|
}
|
||||||
currentFieldAttributes.put(HttpHeaders.Names.CONTENT_LENGTH, attribute);
|
currentFieldAttributes.put(HttpHeaders.Names.CONTENT_LENGTH.toString(), attribute);
|
||||||
} else if (contents[0].equalsIgnoreCase(HttpHeaders.Names.CONTENT_TYPE)) {
|
} else if (contents[0].equalsIgnoreCase(HttpHeaders.Names.CONTENT_TYPE.toString())) {
|
||||||
// Take care of possible "multipart/mixed"
|
// Take care of possible "multipart/mixed"
|
||||||
if (contents[1].equalsIgnoreCase(HttpPostBodyUtil.MULTIPART_MIXED)) {
|
if (contents[1].equalsIgnoreCase(HttpPostBodyUtil.MULTIPART_MIXED)) {
|
||||||
if (currentStatus == MultiPartStatus.DISPOSITION) {
|
if (currentStatus == MultiPartStatus.DISPOSITION) {
|
||||||
@ -722,18 +722,18 @@ public class HttpPostMultipartRequestDecoder implements InterfaceHttpPostRequest
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (int i = 1; i < contents.length; i++) {
|
for (int i = 1; i < contents.length; i++) {
|
||||||
if (contents[i].toLowerCase().startsWith(HttpHeaders.Values.CHARSET)) {
|
if (contents[i].toLowerCase().startsWith(HttpHeaders.Values.CHARSET.toString())) {
|
||||||
String[] values = StringUtil.split(contents[i], '=');
|
String[] values = StringUtil.split(contents[i], '=');
|
||||||
Attribute attribute;
|
Attribute attribute;
|
||||||
try {
|
try {
|
||||||
attribute = factory.createAttribute(request, HttpHeaders.Values.CHARSET,
|
attribute = factory.createAttribute(request, HttpHeaders.Values.CHARSET.toString(),
|
||||||
cleanString(values[1]));
|
cleanString(values[1]));
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
throw new ErrorDataDecoderException(e);
|
throw new ErrorDataDecoderException(e);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new ErrorDataDecoderException(e);
|
throw new ErrorDataDecoderException(e);
|
||||||
}
|
}
|
||||||
currentFieldAttributes.put(HttpHeaders.Values.CHARSET, attribute);
|
currentFieldAttributes.put(HttpHeaders.Values.CHARSET.toString(), attribute);
|
||||||
} else {
|
} else {
|
||||||
Attribute attribute;
|
Attribute attribute;
|
||||||
try {
|
try {
|
||||||
@ -790,7 +790,7 @@ public class HttpPostMultipartRequestDecoder implements InterfaceHttpPostRequest
|
|||||||
protected InterfaceHttpData getFileUpload(String delimiter) {
|
protected InterfaceHttpData getFileUpload(String delimiter) {
|
||||||
// eventually restart from existing FileUpload
|
// eventually restart from existing FileUpload
|
||||||
// Now get value according to Content-Type and Charset
|
// Now get value according to Content-Type and Charset
|
||||||
Attribute encoding = currentFieldAttributes.get(HttpHeaders.Names.CONTENT_TRANSFER_ENCODING);
|
Attribute encoding = currentFieldAttributes.get(HttpHeaders.Names.CONTENT_TRANSFER_ENCODING.toString());
|
||||||
Charset localCharset = charset;
|
Charset localCharset = charset;
|
||||||
// Default
|
// Default
|
||||||
TransferEncodingMechanism mechanism = TransferEncodingMechanism.BIT7;
|
TransferEncodingMechanism mechanism = TransferEncodingMechanism.BIT7;
|
||||||
@ -813,7 +813,7 @@ public class HttpPostMultipartRequestDecoder implements InterfaceHttpPostRequest
|
|||||||
throw new ErrorDataDecoderException("TransferEncoding Unknown: " + code);
|
throw new ErrorDataDecoderException("TransferEncoding Unknown: " + code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Attribute charsetAttribute = currentFieldAttributes.get(HttpHeaders.Values.CHARSET);
|
Attribute charsetAttribute = currentFieldAttributes.get(HttpHeaders.Values.CHARSET.toString());
|
||||||
if (charsetAttribute != null) {
|
if (charsetAttribute != null) {
|
||||||
try {
|
try {
|
||||||
localCharset = Charset.forName(charsetAttribute.getValue());
|
localCharset = Charset.forName(charsetAttribute.getValue());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user