← Commit list

1f2b39cfb1

Daniel Stenberg
Daniel Stenberg
2026-09-05
SUCCESS Duration: 442s

Subject

getparam: switch off CONNECT headers when using -J

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 →

src/tool_getparam.c+1 -0
@@ -2149,6 +2149,7 @@ static ParameterError opt_bool(struct OperationConfig *config,
break;
case C_REMOTE_HEADER_NAME: /* --remote-header-name */
config->content_disposition = toggle;
+ config->suppress_connect_headers = toggle;
break;
case C_INSECURE: /* --insecure */
config->insecure_ok = toggle;
tests/data/DISABLED+3 -0
@@ -63,3 +63,6 @@
2047
%endif
%endif
+# We can't close down the TLS connection nicely enough to make this work
+# reliably
+4656
tests/data/Makefile.am+1 -0
@@ -2101,6 +2101,7 @@ TESTCASES = \
test4000 \
test4001 \
test4644 \
+ test4656 \
test4657 \
test5000 \
test5001 \
tests/data/test4656+86 -0
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<testcase>
+<info>
+<keywords>
+HTTP CONNECT
+HTTP proxy
+</keywords>
+</info>
+
+# Server-side
+<reply>
+
+<data crlf="headers" nocheck="yes">
+HTTP/1.1 301 OK
+Location: %TESTNUMBER0002
+Content-Length: 0
+Connection: close
+
+</data>
+
+<data2 crlf="headers" nocheck="yes">
+HTTP/1.1 200 OK swsclose
+Content-Length: 18
+
+final destination
+</data2>
+
+<connect crlf="headers">
+HTTP/1.1 200 welcome dear
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Content-Disposition: attachment; filename="proxy-chosen.bin"
+
+</connect>
+
+</reply>
+
+# Client-side
+<client>
+<features>
+IPv6
+proxy
+</features>
+<server>
+http-proxy
+http
+https
+</server>
+<name>
+HTTPS over proxy with CONNECT redirected and -OJ
+</name>
+<command option="no-output,no-include">
+https://remotesite:%HTTPSPORT/%TESTNUMBER -L -O -J -x %HOSTIP:%PROXYPORT --insecure --output-dir=%LOGDIR
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<proxy crlf="headers">
+CONNECT remotesite:%HTTPSPORT HTTP/1.1
+Host: remotesite:%HTTPSPORT
+User-Agent: curl/%VERSION
+Proxy-Connection: Keep-Alive
+
+CONNECT remotesite:%HTTPSPORT HTTP/1.1
+Host: remotesite:%HTTPSPORT
+User-Agent: curl/%VERSION
+Proxy-Connection: Keep-Alive
+
+</proxy>
+<protocol crlf="headers">
+GET /%TESTNUMBER HTTP/1.1
+Host: remotesite:%HTTPSPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+GET /%TESTNUMBER0002 HTTP/1.1
+Host: remotesite:%HTTPSPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol>
+<file name="%LOGDIR/%TESTNUMBER0002">
+final destination
+</file>
+</verify>
+</testcase>