Fork me on GitHub
#yada
<
2018-05-25
>
borkdude08:05:05

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

borkdude08:05:25

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

borkdude08:05:33

We’re using the newest Yada.

borkdude09:05:20

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

borkdude10:05:26

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

:chunk#
😞

borkdude10:05:28

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

dominicm10:05:45

(keyword "chunk#")

borkdude10:05:40

yada.multipart=> (finish-up fm1)

NullPointerException   [trace missing]

borkdude10:05:57

Ah, localhost:

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

borkdude10:05:31

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

borkdude10:05:26

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

borkdude10:05:29

with curl it works

borkdude10:05:22

So never mind, excuse my blathering

borkdude11:05:09

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