Skip to content

Commit 6760d56

Browse files
committed
Complete rewrite to simplify the implementation
1 parent 6574e14 commit 6760d56

29 files changed

+1159
-1491
lines changed

.appveyor.yml

Lines changed: 71 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,75 @@
1+
# Since we use custom test script, disable the default build action
2+
build: false
3+
4+
5+
# The Rust target platforms
6+
platform:
7+
- x86_64-pc-windows-msvc
8+
- i686-pc-windows-msvc
9+
- x86_64-pc-windows-gnu
10+
- i686-pc-windows-gnu
11+
- x86_64-unknown-linux-gnu
12+
- x86_64-apple-darwin
13+
14+
15+
# The Rust feature matrix
16+
configuration:
17+
- --features=
18+
19+
20+
# General environment vars
121
environment:
2-
matrix:
3-
- TARGET: x86_64-pc-windows-msvc
4-
- TARGET: i686-pc-windows-msvc
22+
# Promote warnings to errors
23+
RUSTFLAGS: -D warnings
524

6-
install:
7-
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
8-
- rustup-init.exe -y --default-host %TARGET%
9-
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
10-
- rustc -V
11-
- cargo -V
1225

13-
build: false
26+
# Fail fast if one job in the matrix fails
27+
matrix:
28+
fast_finish: true
29+
1430

15-
test_script:
16-
- cargo test --verbose
17-
- cargo test --verbose --release
31+
for:
32+
# Windows specific build settings
33+
- matrix:
34+
only:
35+
- platform: x86_64-pc-windows-msvc
36+
- platform: i686-pc-windows-msvc
37+
- platform: x86_64-pc-windows-gnu
38+
- platform: i686-pc-windows-gnu
39+
environment:
40+
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
41+
install:
42+
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
43+
- rustup-init.exe -y --default-host "%PLATFORM%"
44+
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
45+
test_script:
46+
- cargo test --verbose --no-default-features %CONFIGURATION%
47+
- cargo test --verbose --release --no-default-features %CONFIGURATION%
48+
49+
# Linux specific build settings
50+
- matrix:
51+
only:
52+
- platform: x86_64-unknown-linux-gnu
53+
environment:
54+
APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
55+
install:
56+
- curl https://sh.rustup.rs -sSf -o rustup-init.sh
57+
- sh rustup-init.sh -y --default-host "$PLATFORM"
58+
- source $HOME/.cargo/env
59+
test_script:
60+
- cargo test --verbose --no-default-features $CONFIGURATION
61+
- cargo test --verbose --release --no-default-features $CONFIGURATION
62+
63+
# macOS specific build settings
64+
- matrix:
65+
only:
66+
- platform: x86_64-apple-darwin
67+
environment:
68+
APPVEYOR_BUILD_WORKER_IMAGE: macOS
69+
install:
70+
- curl https://sh.rustup.rs -sSf -o rustup-init.sh
71+
- sh rustup-init.sh -y --default-host "$PLATFORM"
72+
- source $HOME/.cargo/env
73+
test_script:
74+
- cargo test --verbose --no-default-features $CONFIGURATION
75+
- cargo test --verbose --release --no-default-features $CONFIGURATION

.travis.yml

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "http_header"
33
edition = "2018"
4-
version = "0.7.0"
4+
version = "0.8.0"
55
authors = ["KizzyCode Software Labs./Keziah Biermann"]
66
description = "A simple, dependency-less HTTP-header builder and parser"
77
categories = ["data-structures", "encoding", "network-programming", "parsing", "web-programming"]
@@ -12,14 +12,14 @@ readme = "README.md"
1212

1313

1414
[badges]
15-
travis-ci = { repository = "KizzyCode/http_header" }
1615
appveyor = { repository = "KizzyCode/http_header" }
1716
maintenance = { status = "actively-developed" }
1817
is-it-maintained-open-issues = { repository = "KizzyCode/http_header" }
1918
is-it-maintained-issue-resolution = { repository = "KizzyCode/http_header" }
2019

2120

2221
[dependencies]
22+
ebacktrace = "0.3"
2323

2424

2525
[profile.release]

LICENSE.md renamed to LICENSE BSD 2-CLAUSE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Copyright (c) 2019, Keziah Biermann
2-
1+
Copyright (c) 2021, Keziah Biermann
32
All rights reserved.
43

54
Redistribution and use in source and binary forms, with or without

LICENSE MIT.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Keziah Biermann
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
__THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.__

README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,12 @@
33
[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
44
[![crates.io](https://img.shields.io/crates/v/http_header.svg)](https://crates.io/crates/http_header)
55
[![Download numbers](https://img.shields.io/crates/d/http_header.svg)](https://crates.io/crates/http_header)
6-
[![Travis CI](https://travis-ci.org/KizzyCode/http_header.svg?branch=master)](https://travis-ci.org/KizzyCode/http_header)
76
[![AppVeyor CI](https://ci.appveyor.com/api/projects/status/github/KizzyCode/http_header?svg=true)](https://ci.appveyor.com/project/KizzyCode/http-header)
8-
[![dependency status](https://deps.rs/crate/http_header/0.4.0/status.svg)](https://deps.rs/crate/http_header/0.4.0)
7+
[![dependency status](https://deps.rs/crate/http_header/0.8.0/status.svg)](https://deps.rs/crate/http_header/0.8.0)
98

109

1110
# About
12-
`http_header` is a small, dependency-less crate to create, serialize, read and parse
13-
HTTP/1.*-headers.
11+
`http_header` is a small, nearly dependency-less crate to create, serialize, read and parse HTTP/1.1-headers.
1412

15-
It is not designed to be the fastest crate out there, but it's easy to understand and read and
16-
flexible enough to be useful as general-purpose HTTP-header crate.
17-
18-
19-
# Build Library and Documentation
20-
To build the documentation, go into the projects root-directory and run `cargo doc --release`; to
21-
open the documentation in your web-browser, run `cargo doc --open`.
22-
23-
To build the library, go into the projects root-directory and run `cargo build --release`; you can
24-
find the build in target/release.
13+
It is not designed to be the fastest crate out there, but it's easy to understand and read and flexible enough to be
14+
useful as general-purpose HTTP-header crate.

0 commit comments

Comments
 (0)