Skip to content

Commit

Permalink
Merge pull request #778 from magnolia-k/use_inpurStream
Browse files Browse the repository at this point in the history
use the internal method inputStream
  • Loading branch information
takezoe committed Jan 7, 2018
2 parents c0f0900 + 830cc0e commit 382694f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/org/scalatra/servlet/RichRequest.scala
Expand Up @@ -191,7 +191,7 @@ case class RichRequest(r: HttpServletRequest) extends AttributesMap {
if (contentType.exists(_ equalsIgnoreCase "application/json")) "UTF-8" else "ISO-8859-1"
} else encoding
val body: String = try {
Source.fromInputStream(r.getInputStream, enc).mkString
Source.fromInputStream(inputStream, enc).mkString
} catch { case e: java.io.IOException => "" }
update(cachedBodyKey, body)
body
Expand Down

0 comments on commit 382694f

Please sign in to comment.