View Issue Details

IDProjectCategoryView StatusLast Update
0006610libmicrohttpdHTTP 1.1 request pipeliningpublic2021-09-02 15:54
ReporterAlexander Petrov Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Platformamd64OSFreeBSDOS Version12.1
Product Version0.9.70 
Target Version0.9.72Fixed in Version0.9.72 
Summary0006610: MHD_send_on_connection_() with MHD_SSO_HDR_CORK on MHD_CONNECTION_FOOTERS_SENDING makes chunked transfer stuck
DescriptionWe have a https server application which use chunked encoding to transfer data from FreeBSD machine. After freebsd-ports libmicrohttpd updating from 0.9.58 to 0.9.70 wget(and curl) on client side (Ubuntu) getting stuck. As I saw in curl trace-ascii logs last CRLF in chunk ending is missing. But seems that it should be sent from MHD_connection_handle_write() on MHD_CONNECTION_FOOTERS_SENDING state. I tried to replace MHD_SSO_HDR_CORK on MHD_SSO_NO_CORK in MHD_send_on_connection_() call and rebuilt library - problem was solved. Could you check is it proper to send last chunk with enabled CORK?
Transfers with disabled chunked encoding works well.
TagsNo tags attached.

Activities

Alexander Petrov

2020-10-02 12:04

reporter   ~0016989

Here is modified chunked_example.zip from src/examples. It sends (using TLS) testfile.bin which could be generated by command:
dd if=/dev/zero of=testfile.bin bs=1M count=1
Command to receive data:
curl -v -k -o 1.bin "https://127.0.0.1:9080" --trace-ascii trace.log
Issue was reproduced on ubuntu (20.04/18.04) machine.
chunked_example.zip (4,080 bytes)

Christian Grothoff

2020-10-21 08:12

manager   ~0017029

Fixed in Git master as suggested: you are correct, we must not cork when sending the footer.

Christian Grothoff

2021-09-02 15:54

manager   ~0018167

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2020-09-28 13:18Alexander PetrovNew Issue
2020-10-02 12:04Alexander PetrovNote Added: 0016989
2020-10-02 12:04Alexander PetrovFile Added: chunked_example.zip
2020-10-20 22:07Christian GrothoffAssigned To => Christian Grothoff
2020-10-20 22:07Christian GrothoffStatusnew => assigned
2020-10-21 08:12Christian GrothoffStatusassigned => resolved
2020-10-21 08:12Christian GrothoffResolutionopen => fixed
2020-10-21 08:12Christian GrothoffFixed in Version => 0.9.72
2020-10-21 08:12Christian GrothoffNote Added: 0017029
2020-10-21 08:12Christian GrothoffTarget Version => 0.9.72
2021-01-03 09:18Christian GrothoffStatusresolved => closed
2021-09-02 15:54Christian Grothoff
2021-09-02 15:54Christian GrothoffNote Added: 0018167