-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Unable to list or fetch bucket #5
Comments
Hm, that's odd. Seems wierd that you don't even get 200 from When you start aw-server-rust you will see which paths are mounted, start with pasting that here so we can investigate.
Yeah this is hardcoded if I remember correctly, I'll add a issue for that |
Output looks fine, can't figure out what's wrong...
Edit: Ran with debug logs, found this:
Apparently using the |
No, if you request text/html you should not respond with application/json, that simply doesn't make sense. I agree that a 406 would make more sense though since the client/server fails to negotiate what content type is requested. |
You can request See how other APIs do it, like GitHub. If you browse to one of their API endpoints you will get JSON back despite your browser preferring Throwing a 406 is almost never done in practice for this reason (as suggested in the MDN docs). It just means one more header you need to set in your request, even when there's only one content type you expect. |
Where can I find this in the Rocket docs? The only related section I can find is https://rocket.rs/v0.4/guide/requests/#format If you want to prefer text/html but want to allow anything you should set your accept header to Also, my Accept header in both Firefox and Chrome set |
I was just saying that the Rocket docs use the terminology "preference" for the Accept header, not negotiation (and does not have strict enforcement by default). Regarding |
There's a test for it though which is odd. My opinion is that the industry standard of not caring about the Accept header is stupid, but since Rocket responds with a 404 rather than a 406 the error unclear to people who want to use the REST API so I guess I have to just accept this and move on. Merging. |
Trying to access the following URLs from my browser:
Gives me
{"reason":"Resource was not found.","status":"error"}
even though the bucket should exists (watcher is reporting, and bucket is listed at startup).I also checked
http://localhost:5667/api/0/info
and it works fine (testing
is incorrectly always set to false though).(I've changed the development port to 5667 to not collide with aw-server testing, but otherwise I haven't changed anything.)
The text was updated successfully, but these errors were encountered: