Skip to content

Fix/http client improvements - #835

Merged
louis-e merged 5 commits into
mainfrom
fix/http-client-improvements
Mar 24, 2026
Merged

louis-e merged 5 commits into
mainfrom
fix/http-client-improvements

Conversation

@louis-e

@louis-e louis-e commented Mar 24, 2026

Copy link
Copy Markdown
Owner

No description provided.

louis-e added 2 commits March 24, 2026 20:46
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).
Copilot AI review requested due to automatic review settings March 24, 2026 19:48
…_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>.
@github-actions

Copy link
Copy Markdown

⏱️ Benchmark run finished in 0m 29s
🧠 Peak memory usage: 1112 MB

📈 Compared against baseline: 30s
🧮 Delta: -1s
🔢 Commit: 998c41a

🟢 Generation time is unchanged.

📅 Last benchmark: 2026-03-24 19:50:21 UTC

You can retrigger the benchmark by commenting retrigger-benchmark.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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::Client instances via Client::builder() and set a versioned User-Agent.
  • Remove per-request User-Agent headers 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.

Comment thread src/version_check.rs
Comment thread src/version_check.rs
Comment thread src/retrieve_data.rs
Comment thread src/retrieve_data.rs
Comment thread src/elevation_data.rs
Comment thread src/elevation_data.rs
louis-e added 2 commits March 24, 2026 20:51
Prevent startup hangs from stalled connections by adding a 5s connect
timeout and 10s total timeout to the update check.
@louis-e
louis-e merged commit a99307f into main Mar 24, 2026
2 checks passed
@louis-e
louis-e deleted the fix/http-client-improvements branch March 24, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants