Skip to content
Browse files

Merge branch 'master' of git@yuisource.corp.yahoo.com:yuicompressor

  • Loading branch information...
2 parents a0b216c + 5847c27 commit 53a801237a4ac29653b3b4597f0e54c8015b7b2a @stoyan stoyan committed Oct 20, 2010
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/com/yahoo/platform/yui/compressor/CompressorHttpHandler.java
View
9 src/com/yahoo/platform/yui/compressor/CompressorHttpHandler.java
@@ -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);
@@ -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()));

0 comments on commit 53a8012

Please sign in to comment.
Something went wrong with that request. Please try again.