Jeremiah Senkpiel

Results 518 comments of Jeremiah Senkpiel

You can open a PR if you'd like, just be aware of those things.

Closely related to https://github.com/http-rs/surf/issues/251

@yoshuawuyts I think static file serving should probably also use this to attempt to determine mime type before sniffing

I think a first step would be to do what you described in `tide-compress` then.

That's now been done in tide-compress: https://github.com/Fishrock123/tide-compress/commit/cc1551b6a8267cccb70fa3e84ee787e6aaad2fa0 I did not use `xtask` as that seemed like it added more unnecessary stuff, I just made a run-able subcrate which isn't publishable.

I think we may be able to think about this better. After thinking about this since yesterday, I was thinking about my wip port of [negotiator](https://www.npmjs.com/package/negotiator) - i.e. `Accept-*` headers,...

> ```rust > // V2 > impl Headers { > fn get(&self) -> Option where T: TypedHeader { > self.vals.get(T::HEADER_NAME).map(|v| T::from_str(&v)) > } > } > ``` > 3. Do...

I think there's still a couple things missing here. For example, `from_headers()` should probably return `Option`. Also this doesn't really answer any questions regarding header value matching/verification... I suppose for,...

> I'm not sure I would nest `if let Some` statements when using it, but overall that looks like a reasonable API to me? How would you write that? Also...

That being said on further thought maybe header errors should just be "none" unless inspected otherwise?