Skip to content

Commit 241d838

Browse files
committed
http: skip processing when body is null or 0 length
Mistakenly `&&` when we should have `||`d.
1 parent 9f0088c commit 241d838

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libgit2/transports/httpclient.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ static int on_body(http_parser *parser, const char *buf, size_t len)
395395
size_t max_len;
396396

397397
/* Saw data when we expected not to (eg, in consume_response_body) */
398-
if (ctx->output_buf == NULL && ctx->output_size == 0) {
398+
if (ctx->output_buf == NULL || ctx->output_size == 0) {
399399
ctx->parse_status = PARSE_STATUS_NO_OUTPUT;
400400
return 0;
401401
}

0 commit comments

Comments
 (0)