Skip to content

Commit

Permalink
Fix an edge case in cupsGetResponse so we don't accidentally write a …
Browse files Browse the repository at this point in the history
…0-length chunk.
  • Loading branch information
michaelrsweet committed Jan 27, 2025
1 parent cbbcc53 commit e106bcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cups/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ cupsGetResponse(http_t *http, /* I - Connection to server or @code CUPS_HTTP
* Check for an unfinished chunked request...
*/

if (http->data_encoding == HTTP_ENCODING_CHUNKED)
if (http->state == HTTP_STATE_POST_RECV && http->data_encoding == HTTP_ENCODING_CHUNKED)
{
/*
* Send a 0-length chunk to finish off the request...
Expand Down

0 comments on commit e106bcd

Please sign in to comment.