Skip to content

Commit

Permalink
Merge branch 'master' of git@yuisource.corp.yahoo.com:yuicompressor
Browse files Browse the repository at this point in the history
  • Loading branch information
stoyan committed Oct 20, 2010
2 parents a0b216c + 5847c27 commit 53a8012
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -84,8 +84,8 @@ public void handle (HttpExchange t) throws IOException {

try {
config = parseOptions(config, t); // get desired response format first
if (!t.getRequestMethod().toUpperCase().equals("POST")) {
throw new ConfigurationException("You must POST urlencoded JavaScript or CSS to this endpoint.");
if (!t.getRequestMethod().toUpperCase().equals("PUT")) {
throw new ConfigurationException("You must PUT JavaScript or CSS to this endpoint.");
}
} catch (ConfigurationException ex) {
abort("Bad request", ex, HttpURLConnection.HTTP_BAD_REQUEST, config, t);
Expand All @@ -104,12 +104,13 @@ public void handle (HttpExchange t) throws IOException {
String tmp = br.readLine();
while (tmp != null) {
sb.append(tmp);
sb.append("\n");
tmp = br.readLine();
}
String incoming = sb.toString();
incoming = URLDecoder.decode(incoming, config.getCharset());
// incoming = URLDecoder.decode(incoming, config.getCharset());

// System.err.println(incoming.toCharArray());
// System.err.print(incoming.toCharArray());

in = new InputStreamReader(new ByteArrayInputStream(incoming.getBytes()));

Expand Down

0 comments on commit 53a8012

Please sign in to comment.