Skip to content

Spurious message: "Leftovers after chunking: X bytes" #12937

Description

@mkauf

I did this

curl 8.6.0 shows the verbose message "Leftovers after chunking: X bytes" when it receives a response with "Transfer-Encoding: chunked".

Example:

$ curl -s -v --http1.1 https://echo.free.beeceptor.com > /dev/null
[...]
< HTTP/1.1 200 OK
< Alt-Svc: h3=":443"; ma=2592000
< Content-Type: application/json
< Date: Wed, 14 Feb 2024 14:40:48 GMT
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< 
{ [5 bytes data]
* Leftovers after chunking: 5 bytes
* Connection #0 to host echo.free.beeceptor.com left intact

"git bisect" found commit d7b6ce6

I expected the following

No message "Leftovers after chunking".

curl 8.2.1 does not have the bug:

curl -s -v --http1.1 https://echo.free.beeceptor.com > /dev/null
[...]
< HTTP/1.1 200 OK
< Alt-Svc: h3=":443"; ma=2592000
< Content-Type: application/json
< Date: Wed, 14 Feb 2024 14:47:05 GMT
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< 
{ [5 bytes data]
* Connection #0 to host echo.free.beeceptor.com left intact

curl/libcurl version

curl 8.6.0

operating system

Fedora Linux 39

Activity

  1. icing commented on Feb 14, 2024

    @icing
    Contributor

    I do not see that, given your example, on my machine, but it may be some timing dependant thing. Will investigate further.

    Update: found it. Please see #12939 for the fix.

  2. added a commit that references this issue on Feb 14, 2024
  3. mkauf commented on Feb 14, 2024

    @mkauf
    ContributorAuthor

    @icing Great, thanks! I have tested #12939, the message does not appear anymore :-)

  4. jay commented on Feb 18, 2024

    @jay
    Member

    Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions