When I do a multipart request with a wrong body parameter, on localhost/dev I get a correct 400 response
But deployed to our test environment, I get this exception: https://sentry.io/share/issue/2bd7d6adb0c34ad6a6ee871451850a6b/
We’re using the newest Yada.
I tested this from inside an uberjar, this also works.
I’m debugging it on our test server via a REPL but this keyword prevents me from pasting an expression in the REPL:
:chunk#
😞renaming it to :chunk
caused an error… :chunkn
works
(keyword "chunk#")
🙈
yada.multipart=> (finish-up fm1)
NullPointerException [trace missing]
Ah, localhost:
(copy-and-match fm) ;;=> [23167 23258 23448 23570 23644]
(:pos fm) ;;=> 23671
Server:
(copy-and-match fm1) ;;=> []
(:pos fm) ;;=> 39388
Ah, I found out when I disable the file upload parameter, it works correctly in both cases.
Pfft, it seems to be an issue with my HTTP client program…
with curl it works
So never mind, excuse my blathering
It turned out to be a problem with a redirect. So if the multipart/form request was made to http and we redirect to https, then it doesn’t work