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

Various improvements and update to the http cache #23494

Merged
merged 4 commits into from Jun 22, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

http-cache: do not cache responses from requests with authorization

  • Loading branch information
gterzian committed Jun 20, 2019
commit 67494d477667001910148647b03118534b7d7f82
@@ -802,6 +802,15 @@ impl HttpCache {
// Only Get requests are cached.
return;
}
if request.headers.contains_key(header::AUTHORIZATION) {
// https://tools.ietf.org/html/rfc7234#section-3.1
// A shared cache MUST NOT use a cached response
// to a request with an Authorization header field
//
// TODO: unless a cache directive that allows such
// responses to be stored is present in the response.
return;
};
let entry_key = CacheKey::new(request.clone());
let metadata = match response.metadata() {
Ok(FetchMetadata::Filtered {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.