Permalink
Browse files

fixed typo

  • Loading branch information...
1 parent 774def1 commit efbf0e2827bc351068ddee74cfd5930ef46dc61a @pepite pepite committed Mar 16, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/play/modules/netty/PlayHandler.java
View
5 src/play/modules/netty/PlayHandler.java
@@ -332,14 +332,17 @@ public static Request parseRequest(ChannelHandlerContext ctx, HttpRequest nettyR
request.contentType = "text/html";
}
+ if (nettyRequest.getHeader("X-HTTP-Method-Override") != null) {
+ request.method = nettyRequest.getHeader("X-HTTP-Method-Override").intern();
+ }
+
ChannelBuffer b = nettyRequest.getContent();
if (b instanceof FileChannelBuffer) {
FileChannelBuffer buffer = (FileChannelBuffer) nettyRequest.getContent();
// An error occured
Integer max = Integer.valueOf(Play.configuration.getProperty("play.module.netty.maxContentLength", "-1"));
if (max == -1 || buffer.getInputStream().available() < max) {
request.body = buffer.getInputStream();
- } else {
request.body = new ByteArrayInputStream(new byte[0]);
}

0 comments on commit efbf0e2

Please sign in to comment.