You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
I was trying to parse request body to multipart/form-data using org.apache.commons.fileupload. For that I needed request content as Array[Byte]. I first used getBytes("UTF-8") on body. This worked fine with text files, but for binary files, this didn't seem to work. On further examination, I noticed that the hex for new file was shifted by some amount.
As a workaround, I changed the type of body to Array[Byte] and made these changes in netty/NettyRequest.scala:
I was trying to parse request body to multipart/form-data using
org.apache.commons.fileupload
. For that I needed request content asArray[Byte]
. I first usedgetBytes("UTF-8")
on body. This worked fine with text files, but for binary files, this didn't seem to work. On further examination, I noticed that the hex for new file was shifted by some amount.As a workaround, I changed the type of body to
Array[Byte]
and made these changes in netty/NettyRequest.scala:This seemed to work fine with any type of file.
The text was updated successfully, but these errors were encountered: