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

"Not Acceptable" error when fetching ReactJS test server #5399

Closed
jdm opened this issue Mar 26, 2015 · 8 comments
Closed

"Not Acceptable" error when fetching ReactJS test server #5399

jdm opened this issue Mar 26, 2015 · 8 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Mar 26, 2015

After running grunt test --debug and watching the server start, I see:

Error: Not Acceptable
    at Object.exports.error (/Users/jdm/src/react/node_modules/grunt-contrib-connect/node_modules/connect/lib/utils.js:63:13)
    at /Users/jdm/src/react/node_modules/grunt-contrib-connect/node_modules/connect/lib/middleware/directory.js:112:38
    at ReaddirReq.Req.done (/Users/jdm/src/react/node_modules/populist/node_modules/graceful-fs/graceful-fs.js:143:5)
    at ReaddirReq.done (/Users/jdm/src/react/node_modules/populist/node_modules/graceful-fs/graceful-fs.js:90:22)
    at Object.oncomplete (fs.js:108:15)

Something about our HTTP fetch is disliked by the server.

Blocks #5398

@jdm
Copy link
Member Author

@jdm jdm commented Mar 26, 2015

This appears to be the connect middleware complaining that our preferred media type is unacceptable, which is based on our Accept header.

@jdm jdm added the A-network label Mar 26, 2015
@jdm
Copy link
Member Author

@jdm jdm commented Mar 26, 2015

Probably because we don't have one!

@jdm
Copy link
Member Author

@jdm jdm commented Mar 26, 2015

By contrast, Firefox sends an Accept header like text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

@jdm jdm added the E-easy label Mar 26, 2015
@jdm
Copy link
Member Author

@jdm jdm commented Mar 26, 2015

We should add one in the HTTP loader for now (just asking for text/html;q=0.9,*/*;q=0.8,

@jdm
Copy link
Member Author

@jdm jdm commented Mar 26, 2015

Code: components/net/http_loader.rs

@bdero
Copy link
Contributor

@bdero bdero commented Mar 28, 2015

I'm currently working on this.

@bdero
Copy link
Contributor

@bdero bdero commented Mar 28, 2015

Looks like it works!

bdero added a commit to bdero/servo that referenced this issue Mar 28, 2015
The value of the header is: `text/html;q=0.9,*/*;q=0.8`

Closes servo#5399
@jdm
Copy link
Member Author

@jdm jdm commented Mar 28, 2015

Hooray!

@jdm jdm added the C-assigned label Mar 28, 2015
bdero added a commit to bdero/servo that referenced this issue Apr 22, 2015
The value of the header is the same as that of Firefox 35.0.1:
`text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8`

Closes servo#5399
bdero added a commit to bdero/servo that referenced this issue Apr 27, 2015
The value of the header is the same as that of Firefox 35.0.1:
`text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8`

Closes servo#5399
bors-servo pushed a commit that referenced this issue Apr 27, 2015
The value of the header is: `text/html;q=0.9,*/*;q=0.8`

Closes #5399

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5424)
<!-- Reviewable:end -->
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.

2 participants
You can’t perform that action at this time.