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

fix: User-Agent sent to IPNI HTTP routers #9550

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

lidel
Copy link
Member

@lidel lidel commented Jan 14, 2023

This PR sets correct User-Agent header sent to remote HTTP routers / IPNIs (like cid.contact):

User-Agent: kubo/0.18.0

See ipfs/boxo#17 and ipfs/boxo#31

TODO

go.mod Outdated Show resolved Hide resolved
@lidel lidel force-pushed the fix/delegated-routing-user-agent-header branch from 296869b to 28b92f0 Compare January 14, 2023 22:10
@lidel lidel mentioned this pull request Jan 16, 2023
@BigLep
Copy link
Contributor

BigLep commented Jan 17, 2023

Agreed we should have this - good catch.

Copy link
Member

@ajnavarro ajnavarro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after updating dependency.

ipfs block stat "$WANT_CID" &
test_wait_output_n_lines_60_sec http_requests 3 &&
test_should_contain "GET /routing/v1/providers/$WANT_CID" http_requests
'

test_expect_success 'expect HTTP request User-Agent to match Kubo version' '
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to add this using the new sharness go framework.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, extracted to #9562 so test refactor does not block 0.18

@lidel lidel force-pushed the fix/delegated-routing-user-agent-header branch from c561c4f to 6030db6 Compare January 17, 2023 18:37
@lidel lidel force-pushed the fix/delegated-routing-user-agent-header branch 2 times, most recently from e5dcd4b to 9088989 Compare January 18, 2023 22:07
@lidel lidel force-pushed the fix/delegated-routing-user-agent-header branch from 9088989 to da625cd Compare January 18, 2023 23:20
@lidel lidel merged commit 1fa3a78 into master Jan 18, 2023
@lidel lidel deleted the fix/delegated-routing-user-agent-header branch January 18, 2023 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants