View Issue Details

IDProjectCategoryView StatusLast Update
0006610libmicrohttpdHTTP 1.1 request pipeliningpublic2021-01-03 10:18
ReporterAlexander Petrov Assigned ToChristian Grothoff  
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 14: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 10:12

manager   ~0017029

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

Issue History

Date Modified Username Field Change
2020-09-28 15:18 Alexander Petrov New Issue
2020-10-02 14:04 Alexander Petrov Note Added: 0016989
2020-10-02 14:04 Alexander Petrov File Added: chunked_example.zip
2020-10-21 00:07 Christian Grothoff Assigned To => Christian Grothoff
2020-10-21 00:07 Christian Grothoff Status new => assigned
2020-10-21 10:12 Christian Grothoff Status assigned => resolved
2020-10-21 10:12 Christian Grothoff Resolution open => fixed
2020-10-21 10:12 Christian Grothoff Fixed in Version => 0.9.72
2020-10-21 10:12 Christian Grothoff Note Added: 0017029
2020-10-21 10:12 Christian Grothoff Target Version => 0.9.72
2021-01-03 10:18 Christian Grothoff Status resolved => closed