mirror of
https://github.com/curl/curl.git
synced 2025-03-07 15:27:17 +08:00
The netrc init was only done in the Curl_open, meaning that a duplicated
handle would not get inited properly.
Added test 2309 to verify. It does netrc auth with a duplicated handle.
Regression from 3b43a05e00
Reported-by: tranzystorekk on github
Fixes #15496
Closes #15503
67 lines
1.1 KiB
Plaintext
67 lines
1.1 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
netrc
|
|
HTTP
|
|
</keywords>
|
|
</info>
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
<data crlf="yes" nocheck="yes">
|
|
HTTP/1.1 200 OK
|
|
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
Server: test-server/fake
|
|
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
|
ETag: "21025-dc7-39462498"
|
|
Accept-Ranges: bytes
|
|
Content-Length: 6
|
|
Connection: close
|
|
Content-Type: text/html
|
|
Funny-head: yesyes
|
|
|
|
-foo-
|
|
</data>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<features>
|
|
proxy
|
|
</features>
|
|
|
|
# Reproducing issue 15496
|
|
<name>
|
|
HTTP with .netrc using duped easy handle
|
|
</name>
|
|
<tool>
|
|
lib%TESTNUMBER
|
|
</tool>
|
|
<command>
|
|
http://github.com %LOGDIR/netrc%TESTNUMBER http://%HOSTIP:%HTTPPORT/
|
|
</command>
|
|
<file name="%LOGDIR/netrc%TESTNUMBER" >
|
|
|
|
machine github.com
|
|
|
|
login daniel
|
|
password $y$j9T$WUVjiVvDbRAWafDLs6cab1$01NX.oaZKf5lw8MR2Nk9Yaxv4CqbE0IaDF.GpGxPul1
|
|
</file>
|
|
</client>
|
|
|
|
<verify>
|
|
<protocol>
|
|
GET http://github.com/ HTTP/1.1
|
|
Host: github.com
|
|
Authorization: Basic %b64[daniel:$y$j9T$WUVjiVvDbRAWafDLs6cab1$01NX.oaZKf5lw8MR2Nk9Yaxv4CqbE0IaDF.GpGxPul1]b64%
|
|
Accept: */*
|
|
Proxy-Connection: Keep-Alive
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|