diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-03 21:44:34 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-03 21:44:34 +0200 |
commit | 5c0f9d0c8cd38b5534c920a61cbb4c99f789d31e (patch) | |
tree | f67afd48ea534782075e70bce24e9bd4b261f607 /src | |
parent | cf67675efc8d9cd75c4c52f653d61472065f683b (diff) |
GmResponse: Fixed parsing of the response
In some cases an empty <META> 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
Diffstat (limited to 'src')
-rw-r--r-- | src/gmrequest.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
256 | notifyDone = iTrue; | 256 | notifyDone = iTrue; |
257 | } | 257 | } |
258 | const int code = toInt_String(&d->resp.meta); | 258 | const int code = toInt_String(&d->resp.meta); |
259 | if (code == 0 || cstr_String(&d->resp.meta)[2] != ' ') { | 259 | if (code == 0) { |
260 | clear_String(&d->resp.meta); | 260 | clear_String(&d->resp.meta); |
261 | d->resp.statusCode = invalidHeader_GmStatusCode; | 261 | d->resp.statusCode = invalidHeader_GmStatusCode; |
262 | d->state = finished_GmRequestState; | 262 | d->state = finished_GmRequestState; |