Skip to content

Commit

Permalink
fix of post parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mairbek committed Nov 11, 2012
1 parent 51f7d4a commit 7956428
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/com/twitter/finatra/MultipartParsing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ object MultipartParsing {
// TODO: http://commons.apache.org/fileupload/streaming.html update to this
def loadMultiParams(request: FinagleRequest) = {
var multiParams = Map[String, MultipartItem]()
request.getContent.markReaderIndex()
val ctype = request.headers.get("Content-Type").getOrElse(null)
if(ctype != null){
val boundaryIndex = ctype.indexOf("boundary=")
Expand All @@ -45,6 +46,7 @@ object MultipartParsing {
nextPart = multistream.readBoundary
}
}
request.getContent.resetReaderIndex
multiParams
}

Expand Down

0 comments on commit 7956428

Please sign in to comment.