Repository navigation
Fix/http client improvements - #835
Merged
Merged
Conversation
All outgoing HTTP requests now identify as arnis/<version> via the client builder, complying with OSM tile usage policy and Overpass API guidelines. Removes ad-hoc per-request User-Agent headers in favor of a single client-level setting.
The Private.coffee Overpass instance is back online with no rate limits. Removed the kumi.systems alias since both domains resolve to the same server (Kumi Systems is now managed by Private.coffee).
…_err Replace format!() with concat!() for zero-allocation UA string. Remove redundant .map_err(|e| e.to_string()) in elevation_data since the function already returns Box<dyn Error>.
|
⏱️ Benchmark run finished in 0m 29s 📈 Compared against baseline: 30s 🟢 Generation time is unchanged. 📅 Last benchmark: 2026-03-24 19:50:21 UTC You can retrigger the benchmark by commenting |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves HTTP client behavior across the codebase by standardizing how reqwest clients are built and by setting a consistent User-Agent for requests made to external services.
Changes:
- Build
reqwest::blocking::Clientinstances viaClient::builder()and set a versionedUser-Agent. - Remove per-request
User-Agentheaders in favor of client-level configuration. - Expand Overpass fallback server list.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/version_check.rs |
Switches version-check HTTP client to a builder and sets a versioned User-Agent. |
src/retrieve_data.rs |
Adds a versioned User-Agent to Overpass/Nominatim clients and updates fallback Overpass endpoints. |
src/elevation_data.rs |
Builds the shared elevation tile client with a User-Agent instead of using Client::new(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prevent startup hangs from stalled connections by adding a 5s connect timeout and 10s total timeout to the update check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.