Comments (3)
In most cases, we parse a url from host and path and then later on only use the path for routing.
When routing on the path we do need to parse the URL in order to filter out the query string, and normalize URL escaping. We can probably skip parsing the URL in async-h1
, but I'm not sure to which degree it's feasible for e.g. tide
.
If we think we'll have to parse URLs for tide
anyway, is it still worth adding extra logic to async-h1
to not always have to parse them?
from async-h1.
It might be worth checking if percent_encoding::percent_decode_str(path.split("?").next())
is faster than Url decode. However, this would have to happen at the same time as http-types v3, since there is currently no way to construct a Request without a full Url.
from async-h1.
I also think it's worth asking why we need to parse urls for tide. Why does the host and path have to be represented as a Url
specifically?
Alternatively, we could try to add a constructor for Url, or fork Url to add a constructor, since currently we are concatenating strings and then parsing them in order to construct a Url from scheme, host and path
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
- 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.