yada

borkdude 2018-05-25T08:59:05.000356Z

When I do a multipart request with a wrong body parameter, on localhost/dev I get a correct 400 response

borkdude 2018-05-25T08:59:25.000277Z

But deployed to our test environment, I get this exception: https://sentry.io/share/issue/2bd7d6adb0c34ad6a6ee871451850a6b/

borkdude 2018-05-25T08:59:33.000067Z

We’re using the newest Yada.

borkdude 2018-05-25T09:13:20.000472Z

I tested this from inside an uberjar, this also works.

borkdude 2018-05-25T10:07:26.000292Z

I’m debugging it on our test server via a REPL but this keyword prevents me from pasting an expression in the REPL:

:chunk#
😞

borkdude 2018-05-25T10:10:28.000105Z

renaming it to :chunk caused an error… :chunkn works

dominicm 2018-05-25T10:11:45.000236Z

(keyword "chunk#")

dominicm 2018-05-25T10:11:51.000194Z

🙈

borkdude 2018-05-25T10:37:40.000039Z

yada.multipart=> (finish-up fm1)

NullPointerException   [trace missing]

borkdude 2018-05-25T10:39:57.000264Z

Ah, localhost:

(copy-and-match fm) ;;=> [23167 23258 23448 23570 23644]
(:pos fm) ;;=>  23671
Server:
(copy-and-match fm1) ;;=> []
(:pos fm) ;;=> 39388

borkdude 2018-05-25T10:45:31.000334Z

Ah, I found out when I disable the file upload parameter, it works correctly in both cases.

borkdude 2018-05-25T10:52:26.000145Z

Pfft, it seems to be an issue with my HTTP client program…

borkdude 2018-05-25T10:52:29.000309Z

with curl it works

borkdude 2018-05-25T10:54:22.000228Z

So never mind, excuse my blathering

borkdude 2018-05-25T11:16:09.000170Z

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