From 7ca5f939c8403db7ede21e2ccb805a65d3329ef8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 16 May 2026 00:54:13 +0200 Subject: [PATCH] test1646: netrc parsing without user match but user in URL Follow-up to 4ae1d7cc2643e --- tests/data/Makefile.am | 1 + tests/data/test1646 | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 tests/data/test1646 diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 9c63d7674e..b330af3b90 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -218,6 +218,7 @@ test1628 test1629 \ \ test1630 test1631 test1632 test1633 test1634 test1635 test1636 test1637 \ test1638 test1639 test1640 test1641 test1642 test1643 test1644 test1645 \ +test1646 \ \ test1650 test1651 test1652 test1653 test1654 test1655 test1656 test1657 \ test1658 test1659 test1660 test1661 test1662 test1663 test1664 test1665 \ diff --git a/tests/data/test1646 b/tests/data/test1646 new file mode 100644 index 0000000000..3df03bed9e --- /dev/null +++ b/tests/data/test1646 @@ -0,0 +1,45 @@ + + + + +netrc + + + + + +HTTP/1.1 200 OK +Content-Length: 6 + +12345 + + + +# Client-side + + +http + + +netrc parsing without user match but user in URL + + +--netrc --netrc-file %LOGDIR/netrc%TESTNUMBER http://alice@example.com:%HTTPPORT/%TESTNUMBER --resolve example.com:%HTTPPORT:%HOSTIP + + +machine example.com login bob password sekret + + + +# Verify data after the test has been "shot" + + +GET /%TESTNUMBER HTTP/1.1 +Host: example.com:%HTTPPORT +Authorization: Basic %b64[alice:]b64% +User-Agent: curl/%VERSION +Accept: */* + + + +