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

Feature Request: HTTP serve validation results with Last-Modified header field #469

Closed
reschke opened this issue Feb 17, 2021 · 8 comments · Fixed by #488
Closed

Feature Request: HTTP serve validation results with Last-Modified header field #469

reschke opened this issue Feb 17, 2021 · 8 comments · Fixed by #488

Comments

@reschke
Copy link
Contributor

reschke commented Feb 17, 2021

I'm currently running tests with various validators, GETting JSON output and post-processing it. It would be very useful if the JSON output would be served with a Last-Modified header field, indicating the time when the last validation run finished.

(see also cloudflare/cfrpki#83)

@reschke reschke changed the title Feature Request: HTTP serve validation results with Last-Modified header fields Feature Request: HTTP serve validation results with Last-Modified header field Feb 17, 2021
@partim
Copy link
Member

partim commented Feb 17, 2021

That sounds like a good idea, indeed! We will try and implement it in 0.9.

We should also support If-Modified-Since and ETags.

@reschke
Copy link
Contributor Author

reschke commented Feb 17, 2021

...and If-None-Match, if you provide Etags...

@partim partim added this to the 0.9 milestone Feb 19, 2021
@reschke
Copy link
Contributor Author

reschke commented Feb 23, 2021

Note: Rust newbie.

The code that serves the ROAs is easy to find. However, despite reading a lot, I couldn't quite figure out the "right" way to format a timestamp as an HTTP date. Is this functionality present in the libraries Routinator uses already?

@partim
Copy link
Member

partim commented Feb 24, 2021

Yes, most date and time handling is done using the chrono crate. I believe DateTime::to_rfc2822 should provide the right format?

@reschke
Copy link
Contributor Author

reschke commented Feb 24, 2021

Unfortunately no; see https://greenbytes.de/tech/webdav/rfc7231.html#preferred.date.format. So it seems we'll need to come up with the correct format string for that...

@partim
Copy link
Member

partim commented Feb 24, 2021

Shouldn’t be too difficult. However, I would prefer using an array of formatting items rather than a string since the latter needs to be parsed. We’re already using this strategy to generate the timestamp in the csvext format in output.rs.

@reschke
Copy link
Contributor Author

reschke commented Feb 24, 2021

Ah, more pointers! Appreciated. I'll give it a try soonish.

@partim partim closed this as completed in f2d564b Mar 3, 2021
partim added a commit that referenced this issue Mar 3, 2021
 Send Last-Modified response header field with validation result (fixes #469)
@partim
Copy link
Member

partim commented Mar 3, 2021

I’d like to keep the issue open for support of ETags, If-Modified-Since, and If-None-Match.

(Client-side suppor for ETags in RRDP is supposed to be added for 0.9 as well, so this can all be ein aufwasch.)

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 a pull request may close this issue.

2 participants