Skip to content

Commit 39c5974

Browse files
authored
fix: add more expectsPayload methods (#3715)
1 parent 4869e5e commit 39c5974

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/dispatcher/client-h1.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,10 @@ function writeH1 (client, request) {
860860
const expectsPayload = (
861861
method === 'PUT' ||
862862
method === 'POST' ||
863-
method === 'PATCH'
863+
method === 'PATCH' ||
864+
method === 'QUERY' ||
865+
method === 'PROPFIND' ||
866+
method === 'PROPPATCH'
864867
)
865868

866869
if (util.isFormDataLike(body)) {
@@ -1139,7 +1142,7 @@ function writeBuffer (abort, body, client, request, socket, contentLength, heade
11391142
socket.uncork()
11401143
request.onBodySent(body)
11411144

1142-
if (!expectsPayload) {
1145+
if (!expectsPayload && request.reset !== false) {
11431146
socket[kReset] = true
11441147
}
11451148
}
@@ -1169,7 +1172,7 @@ async function writeBlob (abort, body, client, request, socket, contentLength, h
11691172
request.onBodySent(buffer)
11701173
request.onRequestSent()
11711174

1172-
if (!expectsPayload) {
1175+
if (!expectsPayload && request.reset !== false) {
11731176
socket[kReset] = true
11741177
}
11751178

@@ -1270,7 +1273,7 @@ class AsyncWriter {
12701273
socket.cork()
12711274

12721275
if (bytesWritten === 0) {
1273-
if (!expectsPayload) {
1276+
if (!expectsPayload && request.reset !== false) {
12741277
socket[kReset] = true
12751278
}
12761279

0 commit comments

Comments
 (0)