Skip to content

Commit

Permalink
Merge pull request #342 from NLnetLabs/status-version
Browse files Browse the repository at this point in the history
Include version in HTTP status output.
  • Loading branch information
partim committed Jun 9, 2020
2 parents 5d5d03a + 7f40974 commit 77cb3cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Changelog.md
Expand Up @@ -6,6 +6,9 @@ Breaking Changes

New

* The HTTP `/status` command now contains a `version` field showing the
Routinator version running. [(#342)]

Bug Fixes

* Fix a typo in the `--allow-dubious-hosts` option which was actually
Expand All @@ -23,6 +26,7 @@ Other Changes
[#331]: https://github.com/NLnetLabs/routinator/pull/331
[#339]: https://github.com/NLnetLabs/routinator/pull/339
[#340]: https://github.com/NLnetLabs/routinator/pull/340
[#342]: https://github.com/NLnetLabs/routinator/pull/342


## 0.7.0 ‘Your Time Starts … Now’
Expand Down
7 changes: 6 additions & 1 deletion src/http.rs
Expand Up @@ -17,7 +17,7 @@ use std::str::FromStr;
use std::sync::Arc;
use std::task::{Context, Poll};
use chrono::{Duration, Utc};
use clap::crate_version;
use clap::{crate_name, crate_version};
use futures::stream;
use futures::pin_mut;
use futures::future::{pending, select_all};
Expand Down Expand Up @@ -443,6 +443,11 @@ fn status_active(
);
let now = Utc::now();

// version
writeln!(res,
concat!("version: ", crate_name!(), "/", crate_version!())
).unwrap();

// serial
writeln!(res, "serial: {}", origins.serial()).unwrap();

Expand Down

0 comments on commit 77cb3cc

Please sign in to comment.