if ((! request.hasContentType())
|| (type.match(request.getContentType()) < 0) )
return;
postParameters = new Hashtable(2);
// Get and decode the request entity:
URLDecoder dec = null;
try {
Reader in = getReader() ;
// Notify the client that we are willing to continue
String exp = request.getExpect();
if (exp != null && (exp.equalsIgnoreCase("100-continue"))) {
Client client = request.getClient();
if ( client != null ) {
client.sendContinue();
}
}
String encoding = getCharacterEncoding();
if (encoding == null) {
dec = new URLDecoder (in, false, "8859_1");
} else {
dec = new URLDecoder (in, false, getCharacterEncoding());
}
postParameters = dec.parse() ;
} catch (URLDecoderException e) {
postParameters = null;
} catch (IOException ex) {
postParameters = null;
}
}
// URL encoded parameters:
String query = getQueryString();
if (query != null) {
Reader qis = null;
qis = new StringReader(query);
try {
URLDecoder dec;
String encoding = getCharacterEncoding();
if (encoding == null) {
dec = new URLDecoder (qis, false, "8859_1");
} else {
dec = new URLDecoder (qis, false, getCharacterEncoding());
}
queryParameters = dec.parse();
} catch (Exception ex) {
throw new RuntimeException("Java implementation bug.");
}
}
queryParameters = mergeParameters(postParameters, queryParameters);