Bug description: HTTP POST requests with short Content-Lenght hangs (see attached file request) Test setup: relayd configured to relay client requests to the internet. I use a relay which is in lateconnect mode.
$ cat request | nc 127.0.0.1 8888 Bug analysis: - relay_read_http() reads the Content-Length and sets bev->readcb to relay_read_httpcontent(). - At this time the request content is already read into the buffer. - The buffer callback is never called because there is no further event for this buffer. Proposed Solution (relay.c, see patch): - use the existing check in line 1513 that checks for remaining data and applies the callback. - do this by not returning immediately after relay_connect() in line 1504 Happy hacking Georg -- Georg Hoesch, [email protected], +49 (89) 99 19 50-168 GeNUA Gesellschaft f|r Netzwerk - und Unix-Administration mbH Domagkstr. 7, D-85551 Kirchheim. http://www.genua.de Tel: (089) 99 19 50-0, Fax: (089) 99 19 50 - 999 Geschdftsf|hrer: Dr. Magnus Harlander, Dr. Michaela Harlander, Bernhard Schneck. Amtsgericht M|nchen HRB 98238 POST http://www.openbsd.org/ HTTP/1.1 Content-Length: 3 bla [demime 1.01d removed an attachment of type text/x-diff which had a name of patch]
