Comments (4)
We wanted to keep the API minimal -- encoding and decoding is intended to be done through a stream only. But perhaps there's a way we could fit it in if we move to a struct-based API.
from async-h1.
ok, cool.
just for context, I'm building a (kind of) proxy with async_h1
, and while I need the request parsed to act/route on it, I don't need the response parsed, since I can just pass the stream as-is from the back-end to the client. I can't do that with async_h1::accept currently, so I thought to build my own.
looking around, I can't find much standalone http request decoders (parsers).
from async-h1.
@gdamjan It sounds like you're building a TCP and HTTP proxy. Generally parsing the headers on the response is common too for the sake of logging and instrumentation.
If you're looking for a standalone parser the httparse crate handles this for you; but it only provides parsing, and correctly handling HTTP requests requires quite a bit more logic than that.
from async-h1.
yes, thank you, I think I'll try that library
from async-h1.
Related Issues (20)
- gracefully fail HTTP/1.0 connections HOT 2
- Fix Wasm build HOT 5
- Cache `Date` timestamps up to the minute HOT 2
- body is interpreted as next request if handler doesn't read it HOT 1
- Investigate the `http-desync-guardian` crate
- Suggestion to remove Clone bound from reader HOT 7
- "Continue" response can interleave with response data HOT 7
- Parsing Url is one of the most expensive things that async-h1 does HOT 3
- CloseableCursor implementation is racey HOT 1
- tcp_nodelay HOT 1
- Panic in both client and server: "Empty response" HOT 2
- Header DoS (surf#298)
- Panic in server when sending non-ASCII header value HOT 5
- Keep-Alive and persistent connection in client code
- Handle responses without Content-Length
- When acting as a client, processing HTTP/1.0 responses fails HOT 4
- Decode inserts malformed date header HOT 2
- Chunked decoding fails on a chunk of length 0xFF7 (4087), 9 bytes less than the buffer size HOT 2
- How to send head and body on single tcp packet? HOT 1
- Server response sending triggers Nagle's algorithm/delayed ACK interaction
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async-h1.