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

Wrong http status when opening a file which doesn't exist #7684

Closed
mylainos opened this issue Sep 20, 2015 · 6 comments
Closed

Wrong http status when opening a file which doesn't exist #7684

mylainos opened this issue Sep 20, 2015 · 6 comments

Comments

@mylainos
Copy link
Contributor

@mylainos mylainos commented Sep 20, 2015

When opening a file which doesn't exist, the 404 status is expected. Instead it's the 200 which is given.

@mylainos
Copy link
Contributor Author

@mylainos mylainos commented Sep 20, 2015

If you want to test, add this at the 1402 line of components/script/script_task.rs :

println!("{:?}", metadata.status);
@mylainos
Copy link
Contributor Author

@mylainos mylainos commented Sep 20, 2015

These attributes are not set when it's a local file:

content_type : None
charset : None
headers : None

Should I create a new issue ?

@jdm
Copy link
Member

@jdm jdm commented Sep 22, 2015

Yeah, this should be fixed along with #4212. Want to try fixing that one?

@mylainos
Copy link
Contributor Author

@mylainos mylainos commented Sep 22, 2015

Ok ! I lose here http://mxr.mozilla.org/servo/source/components/script/network_listener.rs#48 where Metadata come from and it's not modified before.

@jdm
Copy link
Member

@jdm jdm commented Sep 23, 2015

Look at ResponseAction in net_traits/lib.rs; that's where it is stored, and then you can find the code that creates the HeadersAvailable value in net/resource_task.rs if I recall correctly (apologies, I'm on a phone).

@wafflespeanut
Copy link
Member

@wafflespeanut wafflespeanut commented Nov 25, 2015

As of #8650, the metadata won't reach script_task, and so I guess this can be closed :)

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.