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

recommend/require Accept-headers, and show them in examples #18

Open
sknebel opened this issue May 7, 2018 · 9 comments · May be fixed by #70
Open

recommend/require Accept-headers, and show them in examples #18

sknebel opened this issue May 7, 2018 · 9 comments · May be fixed by #70

Comments

@sknebel
Copy link
Member

sknebel commented May 7, 2018

Since in-the-wild implementations also sometimes use/default to form-encoded in some places this spec requires JSON responses, it might make sense to state that clients SHOULD/MUST set an Accept: application/json header. Or is the intention to hunt all of them down and change their behavior?

@sknebel
Copy link
Member Author

sknebel commented Jul 4, 2018

Looking at this again, I'm not sure what a good spot for a general note would be.

If you ok it I'd prepare a pull request adding the header to the examples?

@aaronpk
Copy link
Member

aaronpk commented Jul 4, 2018

At the very least adding the Accept header to the examples is a good place to start, go for it!

aaronpk added a commit that referenced this issue Jul 7, 2018
@aaronpk
Copy link
Member

aaronpk commented Jun 22, 2019

I'm inclined to not add text to the spec that requires or suggests sending the Accept header. Looking back at OAuth 2.0, it doesn't even include the Accept header in the examples, although that spec has always required a JSON response.

Now that it's been a year since this issue was opened, are there many servers left that are still sending form-encoded responses?

@fluffy-critter
Copy link
Contributor

fluffy-critter commented Nov 28, 2019

Now that it's been a year since this issue was opened, are there many servers left that are still sending form-encoded responses?

indieauth.com does :)

@aaronpk
Copy link
Member

aaronpk commented Jul 29, 2020

I would rather get all clients and servers to update to drop form-encoded responses completely at this point.

@Zegnat
Copy link
Member

Zegnat commented Jul 30, 2020

I just had a check and selfauth defaults to JSON unless it receives other Accept headers, however there is an issue to change the default. Apparently it was (is?) an issue for Telegraph to default to JSON.

@Zegnat
Copy link
Member

Zegnat commented Nov 21, 2020

All HTTP examples in the current version of the spec include Accept headers in the requests, and Content-Type headers in the responses. Are there any actionables left for this issue or can it be closed?

@fluffy-critter
Copy link
Contributor

While the examples all refer to the Accept: header, that was the case already - I opened this issue because the spec itself doesn't actually indicate whether the header is required, or what the default response should be if it's left off (if defined).

@Zegnat Zegnat linked a pull request Nov 22, 2020 that will close this issue
@Zegnat
Copy link
Member

Zegnat commented Nov 22, 2020

I see what you mean now, @fluffy-critter. Thanks for elaborating!

I have filed a PR to mention the Accept headers outside of the (often taken as non-normative) example blocks.

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

Successfully merging a pull request may close this issue.

4 participants