File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Authored by Alex Hultman, 2018-2020 .
2+ * Authored by Alex Hultman, 2018-2025 .
33 * Intellectual property of third-party.
44
55 * Licensed under the Apache License, Version 2.0 (the "License");
@@ -196,8 +196,11 @@ struct HttpResponse : public AsyncSocket<SSL> {
196196 Super::timeout (HTTP_TIMEOUT_S);
197197 }
198198
199- /* Remove onAborted function if we reach the end */
200- if (httpResponseData->offset == totalSize) {
199+ /* Remove onAborted, onWritable function and mark done if we reach the end, or if we were given no data (faked size like in HEAD response) */
200+ /* I need to figure out if this line should rather be simply httpResponseData->offset == data.length() */
201+ /* No that can't be right, tryEnd with fake length should not complete the response even if the smaller chunk wrote in one go */
202+ /* Possibly need to separate endWithoutBody and tryEnd with fake length into two separate calls with a boolean that explicitly marks isHeadOnly */
203+ if (httpResponseData->offset == totalSize || !data.length ()) {
201204 httpResponseData->markDone ();
202205
203206 /* We need to check if we should close this socket here now */
You can’t perform that action at this time.
0 commit comments