8000 platform inconsistent behavior involving alt-svc · Issue #17171 · curl/curl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

platform inconsistent behavior involving alt-svc #17171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nevakrien opened this issue Apr 24, 2025 · 10 comments
Open

platform inconsistent behavior involving alt-svc #17171

nevakrien opened this issue Apr 24, 2025 · 10 comments

Comments

@nevakrien
Copy link

I did this

what I did

curl --alt-svc test.txt https://integralblue.com
curl --alt-svc test.txt https://integralblue.com

what I see

it fails on native linux ("(6) cant process .onion") but on windows it works.
more over on a linux VM in windows it also works...

I expected the following

this code to act the same on all platform. either fail on all or work on all.

curl/libcurl version

8.2
8.0
7.8

all showed the same behivior

operating system

ubuntu 2024 tls (both natively on x64 or as a VM on windows with VMware or with WSL)
windows 10

@nevakrien
Copy link
Author

more info

this was found when testing an issue for a PR #17152
this new PR would ideally fix the issue on linux and so this paticular version of the bug will likely be fixed.

however it still seems very strange that the behivior is diffrent depending on what VM is used. this could be a sign of something else.

@bagder
Copy link
Member
bagder commented Apr 24, 2025
  1. Even 8.2 is old. It would be more interesting if you actually tested modern versions.
  2. Please be specific. Exactly what do they say when you invoke those command lines?
  3. What does it mean that "they work" ? 3dbbdetxoyw4nsp6c3cc456oj2aysmzhbfzz6s43ezxzsfxxri3h5xqd.onion (which this host returns in its Alt-svc: response header) is not a hostname that works in most environments just by accident.

@bagder bagder changed the title platform inconsistent behivior platform inconsistent behavior involving alt-svc Apr 24, 2025
@nevakrien
Copy link
Author
nevakrien commented Apr 24, 2025

so this also happened when compiling from source like under the current master branch.
here is the output from modern linux (ubuntu 2024) native under the current master branch compiled from source with gcc-13

(base) user@user-System-Product-Name:~/Desktop/open_source_work/curl$ curl --alt-svc test.txt https://integralblue.com
curl --alt-svc test.txt https://integralblue.com
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.integralblue.com/">here</a>.</p>
<hr>
<address>Apache Server at integralblue.com Port 443</address>
</body></html>
curl: (6) Not resolving .onion address (RFC 7686)

and on windows we get

under the branch from a 3 days ago in a linux VM of the exact same distribution we get

(base) user@user-System-Product-Name:~/Desktop/open_source_work/curl$ curl --alt-svc test.txt https://integralblue.com
curl --alt-svc test.txt https://integralblue.com
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.integralblue.com/">here</a>.</p>
<hr>
<address>Apache Server at integralblue.com Port 443</address>
</body></html>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.integralblue.com/">here</a>.</p>
<hr>
<address>Apache Server at integralblue.com Port 443</address>
</body></html>

runing the code under windows directly gives the same result. (I would rerun on the current version in both VMware and wsl and get back with the results)

@nevakrien
Copy link
Author

if possible maybe we can run the current CI setup on these 2 simple commands? so we can test on all the platform covered by CI and get a comprehensive view of the current behivior

@nevakrien
Copy link
Author

just confirmed on wsl of the current version.
my VMware machine is acting up so I am leaving it out of this disscusion for now. hope thats ok

@bagder
Copy link
Member
bagder commented Apr 24, 2025

so this also happened when compiling from source like under the current master branch.

So you show one invoke that does the expected and then one that does not. The first invoke is thus not very interesting.

under the branch from a 3 days ago in a linux VM of the exact same distribution we get

Again: details matter. What headers are returned in the first command line, and what does test.txt contain after that? Since you are using a remote server that isn't yours, you cannot be sure how that behaves in every situation.

@nevakrien
Copy link
Author

I am not quite sure how to answer these questions so I am just going to give you the debug output.
this is from the master branch of yestarday. I made sure to remove test.txt before running the test so everything here is the result of the a new version of curl

root@5CD016BMV5:~/curl/build# rm test.txt
root@5CD016BMV5:~/curl/build# ./src/curl --alt-svc test.txt https://integralblue.com --trace first.txt
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.integralblue.com/">here</a>.</p>
<hr>
<address>Apache Server at integralblue.com Port 443</address>
</body></html>
root@5CD016BMV5:~/curl/build# ./src/curl --alt-svc test.txt https://integralblue.com --trace second.txt
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.integralblue.com/">here</a>.</p>
<hr>
<address>Apache Server at integralblue.com Port 443</address>
</body></html>
root@5CD016BMV5:~/curl/build#

and the file contents are included here so you can take a look.

first.txt
second.txt
test.txt

again this is from a wsl running on windows10. and again running the same code natively gives a different result.
its also present in older versions.

the result might be different if we ran this on window11 but I don't have a good C setup in such a machine. leaving that up to someone else

@bagder
Copy link
Member
bagder commented Apr 25, 2025

And what's this second build like? a curl -V output would be good.

@nevakrien
Copy link
Author

@bagder both the same build its just 2 commands on the same machine.

Again it's 8.14-dev from like a day ago. Made with cmake But it seems independent of build what so ever. U would get pretty much the same behivior with 7.9 on native windows.

The 1 commonality i found is that it matters what the host machine is. Specifically windows10 seems to have this behivior regardless of how u virtualize it.

@bagder
Copy link
Member
bagder commented Apr 28, 2025

Can you build with debug enabled and run it with verbose enabled (-v or -vv) and see if it shows any clues?

U would get pretty much the same behivior with 7.9 on native windows.

Now you're just assuming. curl 7.9 did not support --alt-svc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants
0