Skip to content

Commit 89a1b23

Browse files
committed
[hotfix] multipart body contents in XQuery
This reverts commit c22ffe0. It turns out that payloads in body encoded as multipart/form-data have to be written to disk in order to be available in XQuery context. This is the reason the DiskFileItemFactory threshhold has to be zero.
1 parent 8d4d026 commit 89a1b23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

exist-core/src/main/java/org/exist/http/servlets/HttpRequestWrapper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ private void parseMultipartContent() {
188188
// Create a factory for disk-based file items
189189
final DiskFileItemFactory factory = new DiskFileItemFactory();
190190

191+
// Ensure small attachments are readable in XQuery context
192+
factory.setSizeThreshold(0);
193+
191194
// Create a new file upload handler
192195
final ServletFileUpload upload = new ServletFileUpload(factory);
193196

0 commit comments

Comments
 (0)