Permalink
Browse files

note a todo as a performance optimisation

  • Loading branch information...
1 parent c69f3da commit 182fbbe1cb34d2a85e52c41e618562ec1e1afe4b @g-eorge g-eorge committed Jan 29, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 netty-uploads/src/main/scala/request/uploads.scala
@@ -23,6 +23,9 @@ import java.io.{File => JFile}
/** Matches requests that have multipart content */
object MultiPart extends MultiPartMatcher[RequestBinding] {
def unapply(req: RequestBinding) = {
+ /** TODO: Find a way to detect whether the req is multipart without parsing the whole thing first.
+ Maybe something like this:
+ https://github.com/netty/netty/blob/master/codec-http/src/main/java/io/netty/handler/codec/http/HttpPostRequestDecoder.java#L246 */
if (PostDecoder(req.underlying.request).isMultipart)
Some(req)
else None

0 comments on commit 182fbbe

Please sign in to comment.