Benign cargo Download

range.rs

Rust test marker or harnessSource contains a bytes= string literal
SHA-256ee19190e04c1cbba97cd57d771dee3fcdac50138eabbdfa7b7cb9a976f050905

Evidence

imports header::Header lines 1–10
1use std::fmt::{self, Display};
2use std::str::FromStr;
3
4use header::parsing::from_one_raw_str;
5use header::{Header, Raw};
6
7/// `Range` header, defined in [RFC7233](https://tools.ietf.org/html/rfc7233#section-3.1)
8///
9/// The "Range" header field on a GET request modifies the method
10/// semantics to request transfer of …
hyper Rust HTTP library lines 37–46
37:9… ustom_unit=xxx-yyy`
38///
39/// # Examples
40///
41/// ```
42/// use hyper::header::{Headers, Range, ByteRangeSpec};
43///
44/// let mut headers = Headers::new();
45/// headers.set(Range::Bytes(
46/// vec …
Source contains a bytes= string literal lines 185–190
185:12… Range::Bytes(ref ranges) => {
186 try!(write!(f, "bytes="));
187
188 for (i, range) in ranges.iter().enumerate() {
189 if i != 0 {
190 …
#[test] attribute lines 270–278
270:47… matter) -> fmt::Result {
271 f.fmt_line(self)
272 }
273}
274
275#[test]
276fn test_parse_bytes_range_valid() {
277 let r: Range = Header::parse_header(&"bytes=1-100".into()).unwrap();
278 let r2: Ran …
imports header::Headers lines 343–353
343:23… None);
344}
345
346#[test]
347fn test_fmt() {
348 use header::Headers;
349
350 let mut headers = Headers::new();
351
352 headers.set(Range::Bytes(vec![
353 ByteRa …

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.