Benign cargo Download

cache_control.rs

Rust test marker or harnessimports http::header
SHA-256e5d5849fe7451e62e808a74ec654dcb4de5a46785ad6e3178dc3cbd679c55d3b
MaleculeMd₂(InPa)

Evidence

imports http::header lines 1–12
1use header::{Header, IntoHeaderValue, Writer};
2use header::{fmt_comma_delimited, from_comma_delimited};
3use http::header;
4use std::fmt::{self, Write};
5use std::str::FromStr;
6
7/// `Cache-Control` header, defined in [RFC7234](https://tools.ietf.org/html/rfc7234#section-5.2)
8///
9/// The `Cache-Control` header field is used to specify directives for
10/// caches along the request/response chain. Such cache directives are
11/// unidirectional in that the presence of a directive in a request does
12/// not imply that the same directive is to be g …
English function-word token "this" lines 51–55
51:18… acheControl => Vec<CacheDirective>);
52
53//TODO: this could just be the header! macro
54impl Header for CacheControl {
55 fn name() -> header::Heade …
imports self::CacheDirective::* lines 126–130
126:25… t fmt::Formatter) -> fmt::Result {
127 use self::CacheDirective::*;
128 fmt::Display::fmt(
129 match *self {
130 NoCache => "no-cache", …
imports super::* lines 182–196
⋯4 lines
186}
187
188#[cfg(test)]
189mod tests {
190 use super::*;
191 use header::Header;
192 use test::TestRequest;
193
194 #[test]
195 fn test_parse_multiple_headers() {
196 let req = TestRequest::with_header(header::CACHE_CONTROL, "no-cache, private") …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.