Index: src/OFHTTPRequest.m ================================================================== --- src/OFHTTPRequest.m +++ src/OFHTTPRequest.m @@ -128,21 +128,27 @@ sock = [[[of_http_request_tls_socket_class alloc] init] autorelease]; } - [sock connectToHost: [URL host] - onPort: [URL port]]; - @try { OFString *line; OFMutableDictionary *s_headers; OFDataArray *data; OFEnumerator *enumerator; OFString *key; int status; const char *t; + + [sock connectToHost: [URL host] + onPort: [URL port]]; + + /* + * Work around a bug with packet bisection in lighttpd when + * using HTTPS. + */ + [sock setBuffersWrites: YES]; if (requestType == OF_HTTP_REQUEST_TYPE_GET) t = "GET"; if (requestType == OF_HTTP_REQUEST_TYPE_HEAD) t = "HEAD"; @@ -177,10 +183,14 @@ [sock writeFormat: @"Content-Length: %d\r\n", [queryString cStringLength]]; } [sock writeString: @"\r\n"]; + + /* Work around a bug in lighttpd, see above */ + [sock flushWriteBuffer]; + [sock setBuffersWrites: NO]; if (requestType == OF_HTTP_REQUEST_TYPE_POST) [sock writeString: queryString]; /*