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

Content-Length should be a form parameter for IE mode requests #101

Open
garemoko opened this issue Dec 30, 2014 · 2 comments
Open

Content-Length should be a form parameter for IE mode requests #101

garemoko opened this issue Dec 30, 2014 · 2 comments

Comments

@garemoko
Copy link
Contributor

See adlnet/xAPI-Spec#566

@brianjmiller
Copy link
Member

I don't think there is any change needed here for this request. If the client is using a 'Content-Length' header then it was explicitly set since the library itself doesn't ever set it automatically. In that case the library will automatically shove all headers it isn't doing itself into the form encoded body, and then the browser may add the actual request content length automatically, which is still within spec.

@garemoko
Copy link
Contributor Author

My understanding is that we should always be sending a content length header. This is something that is not a MUST, but is encouraged in 1.0.3 and very loosely implied in earlier versions (you explicitly MAY omit Content-Length in HEAD requests).

It doesn't generally matter that TinCanJS doesn't add a content-length header for normal requests because the browser adds it (I think all the main ones do?). It's more important for alt syntax requests because those never add the content length form parameter.

A complete solution would also ensure we're not relying on the browser adding the header too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants