From 5c0f9d0c8cd38b5534c920a61cbb4c99f789d31e Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 3 Nov 2020 21:44:34 +0200 Subject: GmResponse: Fixed parsing of the response In some cases an empty in the server response would cause GmResponse to treat the entire header as invalid. Also, TlsRequest was not handling closing of the TLS/SSL connection if the socket still remained open. This caused GmRequest to wait until the timeout before it realized the full response had been received. IssueID #22 --- src/gmrequest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gmrequest.c') diff --git a/src/gmrequest.c b/src/gmrequest.c index bb6ac23e..f15d80f1 100644 --- a/src/gmrequest.c +++ b/src/gmrequest.c @@ -256,7 +256,7 @@ static void readIncoming_GmRequest_(iAnyObject *obj) { notifyDone = iTrue; } const int code = toInt_String(&d->resp.meta); - if (code == 0 || cstr_String(&d->resp.meta)[2] != ' ') { + if (code == 0) { clear_String(&d->resp.meta); d->resp.statusCode = invalidHeader_GmStatusCode; d->state = finished_GmRequestState; -- cgit v1.2.3