← Commit list

1e2d19f454

Daniel Stenberg
Daniel Stenberg
2026-09-14
SUCCESS Duration: 390s

Subject

test2924: CURLOPT_HTTP_TRANSFER_DECODING, chunked + Content-Length

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/data/Makefile.am+1 -0
@@ -2008,6 +2008,7 @@ TESTCASES = \
test2723 \
test2805 \
test2885 \
+ test2924 \
test3000 \
test3001 \
test3002 \
tests/data/test2924+54 -0
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+CURLOPT_HTTP_TRANSFER_DECODING
+chunked Transfer-Encoding
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 123456789
+Transfer-Encoding: chunked
+Content-Type: text/html
+Funny-head: yesyes
+
+10%CR
+chunked data fun%CR
+0%CR
+%CR
+</data>
+</reply>
+
+# Client-side
+<client>
+<tool>
+lib%TESTNUMBER
+</tool>
+
+<server>
+http
+</server>
+<name>
+CURLOPT_HTTP_TRANSFER_DECODING, chunked + Content-Length
+</name>
+<command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol crlf="headers">
+GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol>
+</verify>
+</testcase>
tests/libtest/Makefile.inc+1 -0
@@ -316,6 +316,7 @@ TESTS_C = \
lib2506.c \
lib2700.c \
lib2805.c \
+ lib2924.c \
lib3010.c \
lib3025.c \
lib3026.c \
tests/libtest/lib2924.c+47 -0
@@ -0,0 +1,47 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) Daniel Stenberg, <[email protected]>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+#include "first.h"
+
+static CURLcode test_lib2924(const char *URL)
+{
+ CURL *curl;
+ CURLcode result = CURLE_OK;
+
+ global_init(CURL_GLOBAL_ALL);
+
+ easy_init(curl);
+
+ easy_setopt(curl, CURLOPT_URL, URL);
+ easy_setopt(curl, CURLOPT_HEADER, 1L);
+ easy_setopt(curl, CURLOPT_HTTP_TRANSFER_DECODING, 0L);
+
+ result = curl_easy_perform(curl);
+
+test_cleanup:
+
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return result;
+}