Skip to content

Fixed : Refactor getMultiPartParameterMap to lazy getter to prevent re-parsing consumed input stream (OFBIZ-13369)#970

Open
Lukas-Finster wants to merge 1 commit intoapache:trunkfrom
ecomify:OFBIZ-13369-Refactor-getMultiPartParameterMap-to-lazy-getter-to-prevet-re-parsing-consumed-input-stream
Open

Fixed : Refactor getMultiPartParameterMap to lazy getter to prevent re-parsing consumed input stream (OFBIZ-13369)#970
Lukas-Finster wants to merge 1 commit intoapache:trunkfrom
ecomify:OFBIZ-13369-Refactor-getMultiPartParameterMap-to-lazy-getter-to-prevet-re-parsing-consumed-input-stream

Conversation

@Lukas-Finster
Copy link
Contributor

Fixed: Refactor getMultiPartParameterMap to lazy getter to prevent re-parsing consumed input stream
(OFBIZ-13369)

Explanation: With OFBIZ-13295 ControlFilter#doFilter called UtilHttp#getParameterMap, consuming the request's input stream in the process. Since a multipart stream can only be read once, all subsequent calls return an empty map, which lead to a problem with file uploads in our local setup.

UtilHttp#getMultiPartParameterMap was refactored into a lazy getter: It first checks whether the result is already cached as the request attribute "multiPartMap", and only parses the stream on the first call

Thanks:

re-parsing consumed input stream (OFBIZ-13369)
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant