Re: Combination of --unix-socket and --proxy http://...

Stefan Eissing via curl-library <[email protected]> Fri, 15 May 2026 14:18:15 +0200
Newsgroups gmane.comp.web.curl.library
Message-ID <[email protected]>

> Am 15.05.2026 um 12:23 schrieb Stefan Eissing via curl-library <[email protected]>:
> 
> 
> 
>> Am 15.05.2026 um 12:05 schrieb Fabian Keil via curl-library <[email protected]>:
>> 
>> After updating git master today I noticed that tests
>> 1435 and 1436 fail when trying to run them through Privoxy's
>> test framework.
>> 
>> I have not yet bisected to see why the tests fail now and
>> appeared to work previously but suspect that Privoxy silently
>> wasn't being used and I just wasn't aware of it.
>> 
>> Currently the failure for test 1435 looks like this:
>> 
>>   fk@t520 ~ $~/git/privoxy/tests/cts/run-privoxy-tests.sh -t upstream-tests -- -v 1435
>>   Passing remaining arguments to runtests-wrapper.sh: -v 1435
>>   Test scenario: upstream-tests
>>   Not setting TESTDIR
>>   Using curl: /home/fk/git/curl/src/curl
>>   CMD (0): /home/fk/git/curl/src/curl --version 1>log/curlverout.log 2>log/curlvererr.log
>>   ********* System characteristics ******** 
>>   * curl 8.21.0-DEV (amd64-unknown-freebsd15.1) 
>>   * libcurl/8.21.0-DEV OpenSSL/3.0.19 zlib/1.3.2 brotli/1.2.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 nghttp2/1.68.1
>>   * Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt mqtts pop3 pop3s smtp smtps telnet tftp ws wss
>>   * Features: alt-svc AsynchDNS brotli Debug HSTS HTTP2 HTTPS-proxy IDN IPv6 Largefile libz PSL SSL threadsafe TLS-SRP UnixSockets zstd
>>   * Disabled: win32-ca-searchpath, win32-ca-search-safe, override-dns, ssl-sessions
>>   * Host: t520.local
>>   * System: ElectroBSD t520.local 15.1-STABLE ElectroBSD 15.1-STABLE #64 electrobsd-15-n283851-9c91bf3b2a6e: 2026-05-13 00:59:16 +0000     [email protected]:/usr/obj/usr/src/amd64.amd64/sys/ELECTRO_BEER amd64
>>   * OS: freebsd
>>   * Perl: v5.42.2 (/usr/local/bin/perl)
>>   * Args: -c /home/fk/git/curl/src/curl -L /home/fk/git/privoxy/tests/cts/privoxy-runtests.pm -P http://127.0.0.1:9119/ -E /home/fk/git/privoxy/tests/cts/curl-test-manifest-for-privoxy -a -n HTTP !skip HTTP -v 1435
>>   * Seed: 260565
>>   * Servers: SSL HTTP-IPv6 HTTP-unix FTP-IPv6 
>>   ***************************************** 
>>   DISABLED: test 323
>>   DISABLED: test 594
>>   DISABLED: test 836
>>   DISABLED: test 882
>>   DISABLED: test 938
>>   DISABLED: test 1182
>>   DISABLED: test 1184
>>   DISABLED: test 1209
>>   DISABLED: test 1211
>>   DISABLED: test 1307
>>   DISABLED: test 1316
>>   DISABLED: test 1512
>>   DISABLED: test 1801
>>   DISABLED: test 2043
>>   startnew: /usr/local/bin/perl -I. -I. ./http-server.pl --keepalive 30 --pidfile "log/server/http_unix_server.pid" --logfile "log/http_unix_server.log" --logdir "log" --portfile log/server/http_unix_server.port --config log/server.cmd --unix-socket '/home/fk/git/curl/tests/log/server/http-uds' --srcdir "."
>>   RUN: HTTP-unix server is on PID 28 port 8999
>>   * pid http-unix => 28 28
>>   test 1435...[simple HTTP GET over Unix socket]
>>   /home/fk/git/curl/src/curl -q --output log/curl1435.out  --include --trace-ascii log/trace1435 --trace-time --unix-socket /home/fk/git/curl/tests/log/server/http-uds http://server-interpreted.example.com/1435 --proxy http://127.0.0.1:9119/  > log/stdout1435 2> log/stderr1435
>>   CMD (14336): /home/fk/git/curl/src/curl -q --output log/curl1435.out  --include --trace-ascii log/trace1435 --trace-time --unix-socket /home/fk/git/curl/tests/log/server/http-uds http://server-interpreted.example.com/1435 --proxy http://127.0.0.1:9119/  > log/stdout1435 2> log/stderr1435
>>   Expecting crlf
>>   Expecting no Connection: header
>>   Expecting no Proxy-Connection: header
>>   Skipping 'Proxy-Connection: Keep-Alive'
>> 
>>    1435: protocol FAILED:
>>   Unprocessed headers:
>>   --- log/check-expected 2026-05-15 11:23:43.825752000 +0200
>>   +++ log/check-generated 2026-05-15 11:23:43.825570000 +0200
>>   @@ -1,5 +1,5 @@
>>   -GET /1435 HTTP/1.1[CR][LF]
>>   -Host: server-interpreted.example.com[CR][LF]
>>   +CONNECT /home/fk/git/curl/tests/log/server/http-uds:0 HTTP/1.1[CR][LF]
>>   +Host: /home/fk/git/curl/tests/log/server/http-uds:0[CR][LF]
>>    User-Agent: curl/8.21.0-DEV[CR][LF]
>>   -Accept: */*[CR][LF]
>>   +Proxy-Connection: Keep-Alive[CR][LF]
>>    [CR][LF]
>>   Processed headers:
>>   Expecting crlf
>>   Expecting no Connection: header
>>   Expecting no Proxy-Connection: header
>>   Skipping 'Proxy-Connection: Keep-Alive'
>>   --- log/check-expected 2026-05-15 11:23:43.833750000 +0200
>>   +++ log/check-generated 2026-05-15 11:23:43.833643000 +0200
>>   @@ -1,5 +1,4 @@
>>   -GET /1435 HTTP/1.1[CR][LF]
>>   -Host: server-interpreted.example.com[CR][LF]
>>   +CONNECT /home/fk/git/curl/tests/log/server/http-uds:0 HTTP/1.1[CR][LF]
>>   +Host: /home/fk/git/curl/tests/log/server/http-uds:0[CR][LF]
>>    User-Agent: curl/8.21.0-DEV[CR][LF]
>>   -Accept: */*[CR][LF]
>>    [CR][LF]
>>   * kill pid for http-unix => 28
>>   RUN: Process with pid 28 signalled to die
>>   RUN: Process with pid 28 gracefully died
>>   TESTDONE: 1 tests were considered during 1 seconds.
>>   TESTDONE: 0 tests out of 1 reported OK: 0%
>> 
>>   FAIL 1435: 'simple HTTP GET over Unix socket' HTTP, HTTP GET, UnixSockets
>> 
>>   TESTFAIL: These test cases failed: 1435
>> 
>> As far as I can tell, Privoxy isn't actually being used and it
>> does not support Unix domain sockets anyway.
>> 
>> I obviously don't actually expect the test to work when using Privoxy
>> and only bring this up because the generated request looks invalid to
>> me.
>> 
>> Is the combination of --unix-socket and --proxy http://... expected
>> to work?
> 
> --unix-socket should disable proxy arguments.
> 
> Looks like a bug in master.

I added a test and fix in https://github.com/curl/curl/pull/21630

- Stefan

> 
>> 
>> If not, it should probably be explicitly rejected.
>> 
>> Fabian
>> -- 
>> Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
>> Etiquette:   https://curl.se/mail/etiquette.html
> 
> -- 
> Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
> Etiquette:   https://curl.se/mail/etiquette.html


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html