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

elinks does not seem to send Accept header. #143

Open
Merivuokko opened this issue Apr 20, 2022 · 5 comments
Open

elinks does not seem to send Accept header. #143

Merivuokko opened this issue Apr 20, 2022 · 5 comments

Comments

@Merivuokko
Copy link

Some sites can return different data with the same request URL depending on the Accept header sent by the client.

For example hackage.haskell.org and crates.io currently return application/json data, unless text/html is explicitly requested. If elinks asked for text/html these sites would function more like they should. There are most likely some other sites which work this way.

lynx seems to send this header.

@rkd77
Copy link
Owner

rkd77 commented Apr 20, 2022

AFAIR elinks sent Accept: */*
Now it is configurable. You can set protocol.http.accept arbitrarily.

@Merivuokko
Copy link
Author

Merivuokko commented Apr 20, 2022 via email

@rkd77
Copy link
Owner

rkd77 commented Apr 20, 2022

I don't know what to set as default. No changes seems good policy here.

@smemsh
Copy link
Contributor

smemsh commented Jun 6, 2022

Endpoints that can give web pages or API responses will be increasingly common. There's a weighting factor available in the header. Perhaps a good default would be:

text/html, text/*;q=0.9, */*;q=0.8

these priority specifications are at least in the 1.0 and 1.1 specs

@rkd77
Copy link
Owner

rkd77 commented Jun 7, 2022

ok, let it be: text/html, text/*;q=0.9, /;q=0.8

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

No branches or pull requests

3 participants