chris-morgan / rust-http

Completely OBSOLETE Rust HTTP library (server and client)
Other
390 stars 110 forks source link

extensions headers: multiple headers support #157

Closed kstep closed 10 years ago

kstep commented 10 years ago

Hi!

I use your lib extensively, and looking forward to adapting Teepee someday. But being pragmatic, I have to live with things working now. Until recently I was satisfied with your http lib enough, but now that I need to parse cookies I stumbled upon major design flaw in your lib: no cookies support, nor multiple extension headers with the same name support.

Not that I'm complaining, you explicitly noted in README the lib is incomplete and unsupported, but as I need some ways to handle cookies, I decided to go with simplest way: add support for multiple custom header with the same name and parse cookies myself.

Hence the PR. Hope it'll help somebody out there. This is temporary measure, and I know it, but it's better than nothing.

Thanks!

chris-morgan commented 10 years ago

I presume this is for cookies? Anyone know what people have done to work around the deficiencies in that area? I presume it will break some things.

Also this doesn’t build at present and certainly can’t be merged until it does. Check out the entries API on hash maps, too.

kstep commented 10 years ago

You are absolutely right. To say honestly, I was very tired and in coding rush/hurry, too eager to make changes. I should think better than proposing PR in such delusional state of mind. Sorry, if I sounded too harsh too. I will look into the issue a little deeper and report back. Thank you for patience.