swindon-rs / tk-http

Full featured HTTP and Websockets library for rust/tokio
Apache License 2.0
136 stars 10 forks source link

Use a smaller but growable buffers for headers (httparse) #15

Closed tailhook closed 8 years ago

tailhook commented 8 years ago

I mean this one: https://github.com/servo/rust-smallvec

Also, we shouldn't create Vec::with_capacity(MAX_HEADERS) for headers table. We already know number of headers at this point (at it's much smaller than MAX_HEADERS in 99.9% use cases)