Skip to content

Conversation

@pyfisch
Copy link
Contributor

@pyfisch pyfisch commented Jan 17, 2015

Currently headers are exported at many places. For example you can access
Transfer-Encoding header at header, header::common and
header::common::transfer_encoding. Per discussion on IRC with
@seanmonstar and @reem, all contents of headers will be exposed at header
directly.

This breaks much code using headers. It should use everything it needs
directly from header::, encodings are exposed at header::Encoding::,
connection options are exposed at header::ConnectionOption.

@reem
Copy link
Contributor

reem commented Jan 17, 2015

The only thing I would change about this design is that the parsing helpers (from_comma_delimited, etc.) should be in their own module, since they feel like clutter here. Perhaps header::parsing?

@pyfisch
Copy link
Contributor Author

pyfisch commented Jan 17, 2015

I will change it like you propose.

By the way. Should header:: export the macros? I think they are useful for custom headers.

@reem
Copy link
Contributor

reem commented Jan 17, 2015

Hmm. Right now macros are exported at the crate level. I think it's fine to export them, since you only get them if you #[macro_use] anyway.

@reem
Copy link
Contributor

reem commented Jan 17, 2015

Added a bunch of nits.

@pyfisch
Copy link
Contributor Author

pyfisch commented Jan 17, 2015

Fixed all nits. Moved parsing to its own file. (Rustoc did not like it otherwise, and we also use separate files for everything else)

@reem
Copy link
Contributor

reem commented Jan 17, 2015

Waiting on deps to run this on travis.

@pyfisch
Copy link
Contributor Author

pyfisch commented Jan 19, 2015

Can someone please rerun this on Travis, or do I need to change something in the code?

@seanmonstar
Copy link
Member

I can't restart it on my phone, the Travis site sucks on mobile. The button
doesn't even render.

I can give it a kick when I get home.

On Mon, Jan 19, 2015, 1:12 PM Pyfisch notifications@github.com wrote:

Can someone please rerun this on Travis, or do I need to change something
in the code?


Reply to this email directly or view it on GitHub
#251 (comment).

@seanmonstar
Copy link
Member

Apparently, it doesn't work on desktop either. Try opening a new PR.

@reem
Copy link
Contributor

reem commented Jan 19, 2015

Ya, the travis site is bugging out for me too.

Currently headers are exported at many places. For example you can access
`Transfer-Encoding` header at `header`, `header::common` and
`header::common::transfer_encoding`. Per discussion on IRC with
@seanmonstar and @reem, all contents of headers will be exposed at `header`
directly. Parsing utilities will be exposed at `header::parsing`. Header
macros can now be used from other crates.

This breaks much code using headers. It should use everything it needs
directly from `header::`, encodings are exposed at `header::Encoding::`,
connection options are exposed at `header::ConnectionOption`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants