Lagrange [work/v1.10]

GmResponse: Fixed parsing of the response

=> 80ae4eeb240c76200bd77d48f5156b363e567a95

diff --git a/lib/the_Foundation b/lib/the_Foundation
index 52fc0ee9..1b2c8527 160000
--- a/lib/the_Foundation
+++ b/lib/the_Foundation
@@ -1 +1 @@
-Subproject commit 52fc0ee9c948ddfbd5918ce1449ab32b910c005d
+Subproject commit 1b2c85274687bd2aea29917bffc71f62c3f3a4dc
diff --git a/res/about/version.gmi b/res/about/version.gmi
index ead4d5d2..e1abe34b 100644
--- a/res/about/version.gmi
+++ b/res/about/version.gmi
@@ -6,6 +6,10 @@
 ```
 # Release notes
 
+## 0.7.2
+* Fixed parsing of the server's response. In some cases it was possible that the response was only partially read.
+* Fixed handling of TLS/SSL connection being closed without the socket being closed.
+
 ## 0.7.1
 * Fixed build on OpenBSD.
 * Fixed build with LibreSSL.
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;
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.10/cdiff/80ae4eeb240c76200bd77d48f5156b363e567a95
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
60.484167 milliseconds
Gemini-to-HTML Time
0.228472 milliseconds

This content has been proxied by September (3851b).