-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support for etag and if-not-modified in GBFS updater #6963
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
Draft
testower
wants to merge
5
commits into
opentripplanner:dev-2.x
Choose a base branch
from
entur:improve/support-caching-mechanisms-in-gbfs-sources
base: dev-2.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Support for etag and if-not-modified in GBFS updater #6963
testower
wants to merge
5
commits into
opentripplanner:dev-2.x
from
entur:improve/support-caching-mechanisms-in-gbfs-sources
Conversation
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
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6963 +/- ##
=============================================
+ Coverage 72.13% 72.16% +0.02%
- Complexity 19673 19850 +177
=============================================
Files 2127 2156 +29
Lines 79562 80121 +559
Branches 8041 8096 +55
=============================================
+ Hits 57396 57819 +423
- Misses 19332 19444 +112
- Partials 2834 2858 +24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
34b5bbe
to
f0f414b
Compare
Enable access to HTTP response headers through the ResponseMapper interface by introducing OtpHttpResponse wrapper class that encapsulates both headers and body content. Key Changes: - Created OtpHttpResponse class with case-insensitive header access - Updated ResponseMapper interface signature from InputStream to OtpHttpResponse - Modified all ResponseMapper implementations to use response.body() - Added comprehensive unit tests for OtpHttpResponse functionality - Enhanced integration tests to verify header access works correctly Benefits: - Enables HTTP caching with ETag and Last-Modified headers - Supports rate limit monitoring via response headers - Allows content type inspection and validation - Facilitates debugging with header access Implementation Details: - OtpHttpResponse provides immutable, case-insensitive header access - Supports multi-value headers (e.g., Set-Cookie) - InputStream lifecycle remains managed by OtpHttpClient - Breaking change: All ResponseMapper implementations require update Files Modified: - 13 source files updated to use response.body() - 2 test files updated - 1 integration test enhanced with header access tests All existing tests pass. No functional changes to HTTP request behavior. Only adds capability to access response headers when needed.
6bea580
to
bc8363a
Compare
bc8363a
to
a8592cf
Compare
a8592cf
to
b04c334
Compare
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.
Summary
TODO
Issue
Link to or create an issue that
describes the relevant feature or bug. You need not create an issue for small bugfixes and code
cleanups, but in that case do describe the problem clearly and completely in the "summary" section
above. In the linked issue (or summary section for smaller PRs) please describe:
Remember that the PR will be reviewed by another developer who may not be familiar with your use
cases or the code you're modifying. It generally takes much less effort for the author of a PR to
explain the background and technical details than for a reviewer to infer or deduce them. PRs may be
closed if they or their linked issues do not contain sufficient information for a reviewer to
proceed.
Add GitHub keywords to this PR's
description, for example:
Closes #6927
Unit tests
Write a few words on how the new code is tested.
pass the continuous integration service
?
Documentation
the configuration documentation updated?
Changelog
The changelog file
is generated from the pull-request title, make sure the title describe the feature or issue fixed.
To exclude the PR from the changelog add the label
+Skip Changelog
to the PR.Bumping the serialization version id
If you have made changes to the way the routing graph is serialized, for example by renaming a field
in one of the edges, then you must add the label
+Bump Serialization Id
to the PR. With this labelGithub Actions will increase the field
otp.serialization.version.id
inpom.xml
.