Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing a raw header #326

Closed
yberreby opened this issue Feb 20, 2015 · 2 comments · Fixed by #331
Closed

Removing a raw header #326

yberreby opened this issue Feb 20, 2015 · 2 comments · Fixed by #331
Labels
A-headers Area: headers. E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@yberreby
Copy link
Contributor

Currently, I can insert or overwrite a header by doing, for example:

request_headers.set_raw("Accept-Encoding", vec![b"gzip, deflate".to_vec()]);

But apparently, I cannot remove it, only set it to a different value.
Wouldn't it be useful to add a remove_raw() method to Headers?
Raw headers are very useful if you don't know what headers to send at compile time, for example, or for quick prototyping.

@seanmonstar
Copy link
Member

Good call, this would be needed to support XHR's removeHeader method.

@seanmonstar seanmonstar added servo A-headers Area: headers. E-easy Effort: easy. A task that would be a great starting point for a new contributor. labels Feb 21, 2015
@jdm
Copy link

jdm commented Feb 22, 2015

removeRequestHeader is unspecc'd, so I don't expect Servo to make use of this.

@reem reem closed this as completed in #331 Feb 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-headers Area: headers. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants