Skip to content
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

--xattr stores the final, instead of the original URL in user.xdg.origin.url #9766

Closed
vszakats opened this issue Oct 18, 2022 · 1 comment
Closed
Assignees

Comments

@vszakats
Copy link
Member

vszakats commented Oct 18, 2022

I did this

$ curl -LO --xattr https://github.com/curl/curl/releases/download/curl-7_85_0/curl-7.85.0.tar.xz
$ xattr -l curl-7.85.0.tar.xz
user.xdg.origin.url: https://objects.githubusercontent.com/github-production-release-asset-2e65be/
569041/ce852[...]a60?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AK[...]%2F20221018
%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221018T[...]Z&X-Amz-Expires=300
&X-Amz-Signature=[...]&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=569041
&response-content-disposition=attachment%3B%20filename%3Dcurl-7.85.0.tar.xz
&response-content-type=application%2Foctet-stream

I expected the following

user.xdg.origin.url: https://github.com/curl/curl/releases/download/curl-7_85_0/curl-7.85.0.tar.xz

I expected the original (unglobbed) URL be stored in user.xdg.origin.url when the request triggered redirects.

curl/libcurl version

curl 7.85.0

Original comment with a workaround (with unwanted side-effects): #9757 (comment)

@bagder bagder self-assigned this Oct 19, 2022
bagder added a commit that referenced this issue Oct 19, 2022
Adjusted test 1621 accordingly.

Reported-by: Viktor Szakats
Fixes #9766
Closes #....

fixup update unit 1621
@jay
Copy link
Member

jay commented Oct 20, 2022

Freedesktop says:

  • user.xdg.origin.url: Set on a file downloaded from a url. Its value should equal the url it was downloaded from.

I think that's a little ambiguous. I also think the original makes more sense.

bagder added a commit that referenced this issue Oct 20, 2022
Adjusted test 1621 accordingly.

Reported-by: Viktor Szakats
Fixes #9766
Closes #....

fixup update unit 1621
bagder added a commit that referenced this issue Oct 21, 2022
Adjusted test 1621 accordingly.

Reported-by: Viktor Szakats
Fixes #9766
Closes #9768

fixup update unit 1621
@bagder bagder closed this as completed in 3ab3c16 Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants