fix: Determine body presence according to RFC7230

Fixes https://github.com/solid/community-server/issues/121
This commit is contained in:
Ruben Verborgh
2020-09-03 00:51:40 +02:00
committed by Joachim Van Herwegen
parent ee3b847033
commit a06a7ff685
5 changed files with 48 additions and 18 deletions

View File

@@ -129,7 +129,7 @@ describe('A server with authorization', (): void => {
handler,
requestUrl,
'POST',
{ 'content-type': 'text/turtle' },
{ 'content-type': 'text/turtle', 'transfer-encoding': 'chunked' },
[ '<http://test.com/s> <http://test.com/p> <http://test.com/o>.' ],
);
expect(response.statusCode).toBe(200);
@@ -140,7 +140,7 @@ describe('A server with authorization', (): void => {
handler,
requestUrl,
'PUT',
{ 'content-type': 'text/turtle' },
{ 'content-type': 'text/turtle', 'transfer-encoding': 'chunked' },
[ '<http://test.com/s> <http://test.com/p> <http://test.com/o>.' ],
);
expect(response.statusCode).toBe(200);
@@ -162,7 +162,7 @@ describe('A server with authorization', (): void => {
handler,
requestUrl,
'POST',
{ 'content-type': 'text/turtle' },
{ 'content-type': 'text/turtle', 'transfer-encoding': 'chunked' },
[ '<http://test.com/s> <http://test.com/p> <http://test.com/o>.' ],
);
expect(response.statusCode).toBe(401);
@@ -173,7 +173,7 @@ describe('A server with authorization', (): void => {
handler,
requestUrl,
'PUT',
{ 'content-type': 'text/turtle' },
{ 'content-type': 'text/turtle', 'transfer-encoding': 'chunked' },
[ '<http://test.com/s> <http://test.com/p> <http://test.com/o>.' ],
);
expect(response.statusCode).toBe(401);