Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
pepite committed Mar 16, 2010
1 parent 774def1 commit efbf0e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/play/modules/netty/PlayHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down

0 comments on commit efbf0e2

Please sign in to comment.