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

Get language from headers #85

Closed
ngosang opened this issue Mar 14, 2017 · 2 comments
Closed

Get language from headers #85

ngosang opened this issue Mar 14, 2017 · 2 comments

Comments

@ngosang
Copy link

ngosang commented Mar 14, 2017

Currently you are getting the language information from the "lang" tag, but many sites doesn't have this tag and uses HTTP headers instead.
My proposal is to use the "lang" tag and if it's not available get the language from the header "Content-Language".
Example URl without tag but with header:
http://www.investopedia.com/university/introduction-stock-trader-types/pivot-traders.asp

Already reported in wallabag but they send me here => wallabag/wallabag#2978

@j0k3r
Copy link
Owner

j0k3r commented Mar 14, 2017

Might be a good idea 👍
For the record:

HTTP/1.1 200 OK
Date: Tue, 14 Mar 2017 09:41:21 GMT
Server: Apache
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Tue, 14 Mar 2017 09:41:21 +0000
Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0
Content-Language: en
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
ETag: W/"1489484481-gzip"
X-Varnish: 59793755 59693389
Age: 5488
Via: 1.1 varnish-v4
X-Dev: true
X-Cookie: 
X-UA-Device: desktop
X-VH: 1
X-SEM: false
X-Cache: HIT
X-Cache-Hits: 7
Transfer-Encoding: chunked
Connection: keep-alive

@nicosomb
Copy link
Collaborator

nicosomb commented Apr 7, 2017

Useful for me because I want to know if the http headers contain "X-Frame-Options" value.

This was referenced Apr 29, 2017
@j0k3r j0k3r closed this as completed in #98 Apr 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants