Benign cargo Download

output.rs

Rust test marker or harnessimports flate2::Compression
SHA-256c7a31a2d6377dba3b711cdf5851debd834c78a277295dd6c42d89c6a1b700ca4

Evidence

imports flate2::Compression lines 1–25
1use std::fmt::Write as FmtWrite;
2use std::io::Write;
3use std::str::FromStr;
4use std::{cmp, fmt, io, mem};
5
6#[cfg(feature = "brotli")]
7use brotli2::write::BrotliEncoder;
8use bytes::BytesMut;
9#[cfg(feature = "flate2")]
10use flate2::write::{GzEncoder, ZlibEncoder};
11#[cfg(feature = "flate2")]
12use flate2::Compression;
13use http::header::{ACCEPT_ENCODING, CONTENT_LENGTH};
14use http::Version;
15
16use super::message::InnerRequest;
17use body::{Binary, Body};
18use header::ContentEncoding;
19use httpresponse::HttpResponse;
20
21#[derive(Debug)]
⋯4 lines
English function-word token "for" lines 250–252
250:17… error!("Connection upgrade is forbidden for HTTP/2");
251 }
252 if encoding != ContentEncoding::Identity …
Source uses a buffer write call lines 491–494
491:2… ContentEncoder::Br(ref mut encoder) => match encoder.write_all(data) {
492 Ok(_) => Ok(()),
493 Err(err) => {
494 trace!("Error decoding br encoding …
Rust replaces matched string content lines 724–734
724:34… oding, quality })
725 }
726
727 /// Parse a raw Accept-Encoding header value into an ordered list.
728 pub fn parse(raw: &str) -> ContentEncoding {
729 let mut encodings: Vec<_> = raw
730 .replace(' ', "")
731 .split(',')
732 .map(|l| AcceptEncoding::new(l))
733 .collect();
734 …
imports bytes::Bytes lines 739–760
⋯4 lines
743}
744
745#[cfg(test)]
746mod tests {
747 use super::*;
748 use bytes::Bytes;
749
750 #[test]
751 fn test_chunked_te() {
752 let bytes = BytesMut::new();
⋯8 lines

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.