New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HiddenHttpMethodFilter cause HttpServletRequest.getInputStream() is empty #5676
Comments
I don't believe that's always the case. AFAIK, the input stream will only be empty if it was a Can you provide some more information about the container that you're using, the type of request that you are sending, and why you need to use the input stream? |
Well, I think a framework should not consume the IO data that can be consumed only once. We have a file sync service. when a file is ready, we use curl to post the file to our service. some thing like this: actually, this issue is trying to fix the same problem as this one: thanks. |
This will upload the JPEG image using
If you want to access the image data directly via the
Alternatively, you can make the data available via the request's parts by uploading it as multipart/form-data:
|
org.springframework.web.filter.HiddenHttpMethodFilter,
String paramValue = request.getParameter(this.methodParam);
cause HttpServletRequest.getInputStream() will be empty in future.and the filter is introduced by
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration
, which is automatically enabled when using spring mvc in spring-bootThe text was updated successfully, but these errors were encountered: