• Stars
    star
    499
  • Rank 88,341 (Top 2 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created almost 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A push parser for the HTTP 1.x protocol in Rust.

httparse

crates.io Released API docs MIT licensed CI Discord chat

A push parser for the HTTP 1.x protocol. Avoids allocations. No copy. Fast.

Works with no_std, simply disable the std Cargo feature.

Changelog

Usage

let mut headers = [httparse::EMPTY_HEADER; 64];
let mut req = httparse::Request::new(&mut headers);

let buf = b"GET /index.html HTTP/1.1\r\nHost";
assert!(req.parse(buf)?.is_partial());

// a partial request, so we try again once we have more data

let buf = b"GET /index.html HTTP/1.1\r\nHost: example.domain\r\n\r\n";
assert!(req.parse(buf)?.is_complete());

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Repositories

1

warp

A super-easy, composable, web server framework for warp speeds.
Rust
9,057
star
2

reqwest

An easy and powerful Rust HTTP Client
Rust
8,010
star
3

num_cpus

Get the number of CPUs in Rust
Rust
510
star
4

pretty-env-logger

A pretty, easy-to-use logger for Rust.
Rust
441
star
5

intel

I need more intel!
JavaScript
200
star
6

futures-fs

Access File System operations off-thread, using a Futures.
Rust
65
star
7

unicase

Unicode Case-folding for Rust
Rust
60
star
8

spmc

Rust
55
star
9

want

Rust
33
star
10

insist

A drop-in replacement for `assert` with a better default message.
JavaScript
32
star
11

symbol

ES6 Symbols in your ES5.
JavaScript
29
star
12

vecio

Rust
27
star
13

try-lock

A lightweight lock protected by an atomic boolean.
Rust
23
star
14

hood

Cover your head. Security headers middlware
JavaScript
21
star
15

ServiceDroid

ServiceDroid is an Android application built to assist Jehovah's Witnesses doing volunteer work.
Java
20
star
16

l20n.rs

Deprecated
Rust
16
star
17

MGFX.Tabs

A simple to use Tabs plugin for MooTools.
JavaScript
15
star
18

futures-compat

A compatibility shim between futures v0.1 and v0.2.
Rust
11
star
19

tick

Rust
10
star
20

tower-h3

Rust HTTP/3 + tower Service
Rust
9
star
21

merit

Rust
9
star
22

android-browserid

Use the BrowserID protocol easily in native Android apps.
Java
9
star
23

splatmonstar

Issue tracker for tentmonstar, a Tent client on Android.
7
star
24

mocha-text-cov

text summary of code coverage for Mocha
JavaScript
6
star
25

hyper-benchmarks

Performance benchmarks for hyper.rs
4
star
26

gryphon

HTTP Request Signing with Ed25519
JavaScript
4
star
27

dbug

debug moar
JavaScript
4
star
28

cookies

Rust
3
star
29

dotfiles

These aren't the droids you're looking for.
Vim Script
3
star
30

ansi.rs

ANSI colors for Rust
Rust
2
star
31

syslogger

A sane syslog API.
JavaScript
2
star
32

relay

Rust
2
star
33

seanmonstar.github.io

HTML
1
star
34

noom

Super simple Enum types
JavaScript
1
star
35

intel-syslog

A syslog handler for intel logging.
JavaScript
1
star
36

js

Some of my JavaScript extensions
JavaScript
1
star