0

I have this code:

Request restletRequest = getRequest(); HttpServletRequest servletRequest = ServletUtils.getRequest(restletRequest); ServletFileUpload upload = new ServletFileUpload(); FileItemIterator fileIterator = upload.getItemIterator(servletRequest); LOG.info("File Item iterator - " + fileIterator.hasNext()); while (fileIterator.hasNext()) { // never reached } 

With log:

[main] INFO com.xyzbackend.ServerResource - Media type - multipart/form-data; boundary=----WebKitFormBoundary5XV92DI2vfB2Z6NO [main] INFO com.xyzbackend.ServerResource - Media size - 27671 [main] INFO com.xyzbackend.ServerResource - File Item iterator - false 

The problem here is that it works on my local machine, meaning the "never reached" section is actually reached and the code executes fine. My problem is that when it gets uploaded to the cloud server (Linode with NGINX Unit server running) it starts behaving differently. The fileIterator.hasNext() is evaluated false.

Based on experience, what could be the possible causes of such weird behavior?

1 Answer 1

1

Currently, multipart feature is not supported by Java module in NGINX Unit. I would recommend you to create issue on GitHub to discuss and implement this one.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.