If the request body is empty (NULL) of an incoming request then the REST entity resource plugin should return a 400 bad request error. It simply does not make sense to have empty bodies on PATCH or POST requests.

CommentFileSizeAuthor
#1 rest-null-body-2032919-1.patch2.82 KBklausi

Comments

klausi’s picture

Status: Active » Needs review
StatusFileSize
new2.82 KB

Patch fixing the problem + tests attached.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

Agreed.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 3091a40 and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.