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

Add support for conditional HTTP requests. #98

Merged
merged 10 commits into from
Feb 12, 2024
Merged

Add support for conditional HTTP requests. #98

merged 10 commits into from
Feb 12, 2024

Conversation

partim
Copy link
Member

@partim partim commented Nov 29, 2023

This PR adds support for conditional HTTP requests via Etags and Last-Modified to both the JSON unit and the HTTP JSON target.

Fixes #38.

@partim partim requested a review from a team November 29, 2023 14:01
src/targets/http.rs Outdated Show resolved Hide resolved
src/targets/http.rs Outdated Show resolved Hide resolved
src/units/json.rs Outdated Show resolved Hide resolved
src/units/json.rs Outdated Show resolved Hide resolved
src/units/json.rs Outdated Show resolved Hide resolved
@partim partim requested a review from ximon18 February 8, 2024 15:43
@partim partim merged commit f743017 into main Feb 12, 2024
9 checks passed
@partim partim deleted the conditional-http branch February 12, 2024 15:37
partim added a commit that referenced this pull request May 29, 2024
Breaking Changes

* Upgrade Rust edition, minimal Rust version to 1.70, and dependencies.
  ([#88], [#91])
* Removed internal serial numbers and the ability to pass optional diffs
  between units. ([#96])

New

* Added a new `merge` unit that merges the datasets of all its sources.
  ([#110], [#113])
* Added four new configuration options to the HTTP client:
  * `http-root-certs` for additional TLS root certificates,
  * `http-user-agent` for setting a custom user agent,
  * `http-client-addr` to specify a local address to bind to, and
  * `http-proxies` to add HTTP proxies (only available if the `socks` feature
     is enabled which it is by default). ([#111])
* The RTR timer values can now be configured for the RTR target. ([#106])
* The RTR target now produces metrics. By setting `client-metrics: true`
  in its configuration, the target produces separate metrics for each
  client address. ([#115], [#117])
* Log changes made by the `slurm` unit to updates. ([#87])
* The `slurm` unit now updates its data set if it discovers that the Slurm
  files have changed. ([#89])
* Both the `json` unit and target now support conditional HTTP requests
  via the Etag and Last-Modified headers. ([#98])

Bug Fixes

* Fix a race condition where the `slurm` unit would not apply its changes
  to the first update if loading the files is too slow. ([#89])
* Fixed various race conditions during startup and shutdown. ([#101])

Other Changes

* Upgrade the packaging and Docker build workflow to allow for
  cross-compilation. ([#90])
partim added a commit that referenced this pull request Jun 6, 2024
Breaking Changes

* Upgrade Rust edition, minimal Rust version to 1.70, and dependencies.
  ([#88], [#91])
* Removed internal serial numbers and the ability to pass optional diffs
  between units. ([#96])

New

* Added a new `merge` unit that merges the datasets of all its sources.
  ([#110], [#113])
* Added four new configuration options to the HTTP client:
  * `http-root-certs` for additional TLS root certificates,
  * `http-user-agent` for setting a custom user agent,
  * `http-client-addr` to specify a local address to bind to, and
  * `http-proxies` to add HTTP proxies (only available if the `socks` feature
     is enabled which it is by default). ([#111])
* The RTR timer values can now be configured for the RTR target. ([#106])
* The RTR target now produces metrics. By setting `client-metrics: true`
  in its configuration, the target produces separate metrics for each
  client address. ([#115], [#117])
* Log changes made by the `slurm` unit to updates. ([#87])
* The `slurm` unit now updates its data set if it discovers that the Slurm
  files have changed. ([#89])
* Both the `json` unit and target now support conditional HTTP requests
  via the Etag and Last-Modified headers. ([#98])

Bug Fixes

* Fix a race condition where the `slurm` unit would not apply its changes
  to the first update if loading the files is too slow. ([#89])
* Fixed various race conditions during startup and shutdown. ([#101])

Other Changes

* Upgrade the packaging and Docker build workflow to allow for
  cross-compilation. ([#90])
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.

Add ETag support to both the json unit and the HTTP target.
2 participants