Global: fixes issues found by AI

This commit is contained in:
李通洲
2026-09-24 21:21:02 +08:00
committed by Carter Li
parent 00ccd8be12
commit bba45429ae
24 changed files with 387 additions and 80 deletions
+2 -1
View File
@@ -73,7 +73,8 @@ int main(void) {
FFstrbuf response = ffStrbufCreateS("HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n0\r\n\r\n");
uint32_t headerEnd = (uint32_t) (strstr(response.chars, "\r\n\r\n") - response.chars);
VERIFY(ffNetworkingDecodeChunked(&response, headerEnd));
VERIFY(ffNetworkingDecodeChunked(&response, &headerEnd));
VERIFY(headerEnd == (uint32_t) (strstr(response.chars, "\r\n\r\n") - response.chars));
VERIFY(ffStrbufContainS(&response, "Content-Length: 5"));
VERIFY(!ffStrbufContainS(&response, "Transfer-Encoding"));
VERIFY(ffStrbufEndsWithS(&response, "hello"));