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

Access-Control-Allow-Credentials header #655

Closed
fuchsnj opened this issue Sep 16, 2015 · 5 comments
Closed

Access-Control-Allow-Credentials header #655

fuchsnj opened this issue Sep 16, 2015 · 5 comments
Labels
A-headers Area: headers. E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@fuchsnj
Copy link
Contributor

fuchsnj commented Sep 16, 2015

the Access-Control-Allow-Credentials header is missing

http://www.w3.org/TR/2008/WD-access-control-20080912/#access-control-allow-credentials

ABNF:

Access-Control-Allow-Credentials: "Access-Control-Allow-Credentials" ":" "true"
@fuchsnj fuchsnj changed the title access-control-allow-credentials header Access-Control-Allow-Credentials header Sep 16, 2015
@seanmonstar seanmonstar added A-headers Area: headers. E-easy Effort: easy. A task that would be a great starting point for a new contributor. labels Oct 14, 2015
@brycefisher
Copy link

I'd like to tackle this one.

I started looking at the spec, and I realized there is only ever one valid value for this header. For example, this value could never be false.

Given that invariant, I would probably want users to set this header without needing to pass in a bool. Ex:

extern crate hyper;

use hyper::header::{Headers, AccessControlAllowCredentials};

fn main() {
    let mut headers = Headers::new();
    headers.set(AccessControlAllowCredentials);
}

However, we probably would want to parse raw AccessControlAllowCredentials headers values of any case. For example an HTTP client should probably still parse this sort of response:

HTTP/1.1 200 OK
AccessControlAllowCredentials:TrUE
...

@brycefisher
Copy link

Can't get tests to pass tonight...trying tomorrow:
https://github.com/brycefisher/hyper/commit/29c33f59586976ac87b8de1c38bcc48e89d4dcc8

@brycefisher
Copy link

Gave up on any casing

@Ryman
Copy link
Contributor

Ryman commented Nov 22, 2015

@brycefisher You should be able to replicate something like this

if UniCase(text) == EXPECT_CONTINUE {

Good luck!

@brycefisher
Copy link

@Ryman oh nice, that's exactly what I was looking for!

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

No branches or pull requests

4 participants