View Issue Details

IDProjectCategoryView StatusLast Update
0002859libmicrohttpdHTTPS (TLS)public2021-09-02 15:54
Reporterbulba Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.26 
Target Version0.9.28Fixed in Version0.9.28 
Summary0002859: Re issue 0002783
Descriptiongnutls_record_send() barfs with -50 on zero-length send.

if SSL connection enters NORMAL_BODY_READY state without data to send -> infinite select(for write) -> gnutls barf -50 -> select(for write) loop.

What worked for me (connection.c):
in NORMAL_BODY_READY
before calling connection->send_cls()
if zerolenght -> move to FOOTERS_SENT.
Steps To Reproducesame as 0002783
gnutls 3.1.5
TagsNo tags attached.

Activities

Christian Grothoff

2013-05-06 10:49

manager   ~0007089

As there might still be footers, we should transition to BODY_SENT, not FOOTERS_SENT. Patch is in SVN 27035, please let me know if this does not work for some reason.

Christian Grothoff

2013-05-09 11:48

manager   ~0007093

Actually, doing this breaks stuff for HTTP, undone patch in SVN HEAD, will need to look into this more.

bulba

2013-05-15 14:14

reporter   ~0007101

Not much time to help in solving this problem, but:

In MHD_connection_handle_idle():
1) We get here in state MHD_CONNECTION_HEADERS_SENT
2) Which gets us into: MHD_CONNECTION_NORMAL/CHUNKED_BODY_UNREADY
3) Then try_ready_normal/chunked_body returns YES if body available or zerolenght
4) if YES -> we get into MHD_CONNECTION_NORMAL/CHUNKED_BODY_READY

so, just before moving to state MHD_CONNECTION_NORMAL/CHUNKED_BODY_READY
a simple check if (0 == response->total_size) pushing state into MHD_CONNECTION_BODY_SENT && continue should do the job.

Christian Grothoff

2013-05-15 20:04

manager   ~0007102

Ok, I think I fixed it now in 27152. Tests now pass.

Christian Grothoff

2021-09-02 15:54

manager   ~0018211

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2013-04-10 00:54bulbaNew Issue
2013-05-06 10:49Christian GrothoffNote Added: 0007089
2013-05-06 10:49Christian GrothoffStatusnew => resolved
2013-05-06 10:49Christian GrothoffFixed in Version => Git master
2013-05-06 10:49Christian GrothoffResolutionopen => fixed
2013-05-06 10:49Christian GrothoffAssigned To => Christian Grothoff
2013-05-06 10:52Christian GrothoffCategorySSL => HTTPS (SSL)
2013-05-09 11:48Christian GrothoffNote Added: 0007093
2013-05-15 14:14bulbaNote Added: 0007101
2013-05-15 14:14bulbaStatusresolved => feedback
2013-05-15 14:14bulbaResolutionfixed => reopened
2013-05-15 20:04Christian GrothoffNote Added: 0007102
2013-05-15 20:04Christian GrothoffStatusfeedback => resolved
2013-05-15 20:04Christian GrothoffFixed in VersionGit master => 0.9.28
2013-05-15 20:04Christian GrothoffResolutionreopened => fixed
2013-05-15 20:04Christian GrothoffTarget Version => 0.9.28
2013-07-19 11:36Christian GrothoffStatusresolved => closed
2021-09-02 15:54Christian Grothoff
2021-09-02 15:54Christian GrothoffNote Added: 0018211
2024-01-21 12:25Christian GrothoffCategoryHTTPS (SSL) => HTTPS (TLS)