Skip to content

Commit ca704fc

Browse files
committed
Merge branch 'master' into headers_encoding
2 parents fd8f22f + c207372 commit ca704fc

File tree

7 files changed

+69
-31
lines changed

7 files changed

+69
-31
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
minrust: 1.41.0
7+
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
rust: [stable, beta, nightly]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions-rs/toolchain@v1
20+
with:
21+
toolchain: ${{ matrix.rust }}
22+
profile: minimal
23+
override: true
24+
25+
- name: cargo test --all
26+
uses: actions-rs/cargo@v1
27+
with:
28+
command: test
29+
args: --all
30+
- name: cargo test --benches
31+
if: matrix.rust == 'nightly'
32+
uses: actions-rs/cargo@v1
33+
with:
34+
command: test
35+
args: --benches
36+
37+
- name: Check minimal versions
38+
if: matrix.rust == 'nightly'
39+
run: |
40+
cargo clean
41+
cargo update -Z minimal-versions
42+
cargo check
43+
44+
MSRV:
45+
runs-on: ubuntu-latest
46+
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Install rust ${{ env.minrust }}
50+
uses: actions-rs/toolchain@v1
51+
with:
52+
toolchain: ${{ env.minrust }}
53+
profile: minimal
54+
override: true
55+
56+
- name: cargo build
57+
uses: actions-rs/cargo@v1
58+
with:
59+
command: build

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "headers"
3-
version = "0.3.2" # don't forget to update html_root_url
3+
version = "0.3.4" # don't forget to update html_root_url
44
description = "typed HTTP headers"
55
license = "MIT"
66
readme = "README.md"
@@ -19,12 +19,12 @@ members = [
1919
[dependencies]
2020
http = "0.2.0"
2121
headers-core = { version = "0.2", path = "./headers-core" }
22-
base64 = "0.12"
22+
base64 = "0.13"
2323
bitflags = "1.0"
24-
bytes = "0.5"
2524
itertools = "0.9"
25+
bytes = "1"
2626
mime = "0.3.14"
27-
sha-1 = "0.8"
27+
sha-1 = "0.9"
2828
time = "0.1.34"
2929

3030
[features]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# rust http headers
22

3-
[![Build Status](https://travis-ci.org/hyperium/headers.svg?branch=master)](https://travis-ci.org/hyperium/header)
3+
[![Build Status](https://github.com/hyperium/headers/workflows/CI/badge.svg)](https://github.com/hyperium/headers/actions?query=workflow%3ACI)
44

55
Typed HTTP headers.

src/common/referer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use http::header::HeaderValue;
55
/// `Referer` header, defined in
66
/// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.5.2)
77
///
8-
/// The `Referer` [sic] header field allows the user agent to specify a
8+
/// The `Referer` \[sic\] header field allows the user agent to specify a
99
/// URI reference for the resource from which the target URI was obtained
1010
/// (i.e., the "referrer", though the field name is misspelled). A user
1111
/// agent MUST NOT include the fragment and userinfo components of the

src/common/sec_websocket_accept.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ impl From<SecWebsocketKey> for SecWebsocketAccept {
3737

3838
fn sign(key: &[u8]) -> SecWebsocketAccept {
3939
let mut sha1 = Sha1::default();
40-
sha1.input(key);
41-
sha1.input(&b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"[..]);
42-
let b64 = Bytes::from(base64::encode(&sha1.result()));
40+
sha1.update(key);
41+
sha1.update(&b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"[..]);
42+
let b64 = Bytes::from(base64::encode(&sha1.finalize()));
4343

4444
let val = ::HeaderValue::from_maybe_shared(b64).expect("base64 is a valid value");
4545

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![deny(missing_debug_implementations)]
33
#![cfg_attr(test, deny(warnings))]
44
#![cfg_attr(all(test, feature = "nightly"), feature(test))]
5-
#![doc(html_root_url = "https://docs.rs/headers/0.3.2")]
5+
#![doc(html_root_url = "https://docs.rs/headers/0.3.4")]
66

77
//! # Typed HTTP Headers
88
//!

0 commit comments

Comments
 (0)