Return HTTP code 413 when uploading an avatar/header that's too large #367

Merged
floatingghost merged 3 commits from norm/akkoma:return-413-max-size into develop 2022-12-14 10:07:24 +00:00
Contributor

Pulled from: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3804

Until now it was returning a 500 because the upload plug were going
through the changeset and ending in the JSON encoder, which raised
because struct has to @derive the encoder.

This changes it to return 413 Payload Too Large instead, which is a more appropriate error code.

Pulled from: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3804 > Until now it was returning a 500 because the upload plug were going through the changeset and ending in the JSON encoder, which raised because struct has to @derive the encoder. This changes it to return 413 Payload Too Large instead, which is a more appropriate error code.
norm force-pushed return-413-max-size from 43f50d1c16 to 8104f46031 2022-12-12 22:29:03 +00:00 Compare

seems okie, thanks~

seems okie, thanks~
floatingghost merged commit 7f4d218cff into develop 2022-12-14 10:07:24 +00:00
floatingghost deleted branch return-413-max-size 2022-12-14 10:07:24 +00:00
Sign in to join this conversation.
No description provided.