You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue with the Accept-Language and the Accept header on the website po4a.org. For some reason the website responds with the Dutch language. And while I'm a native speaker, the Accept-Language of the browser isn't accepted. I've tested this across five browsers/user agents:
Chrome versions: 122.0.6261.128-1, 123.0.6312.28-1 and 124.0.6342.3-1
Firefox: 125.0a1~20240313094814
Curl: 8.6.0-3.2
TL;DR
Not all languages have text/html content type as seen in the Alternates header. Instead they use application/x-httpd-php, which aren't in the requested language (or in the preferred Accept). This affects the following languages: English, German, French, Japanese(?) (ja), Portuguese (both regular and Brazilian), and Chinese.
Conclusion:
Not all languages have text/html but instead use application/x-httpd-php, which aren't in the requested language (or in the preferred Accept). It seems to affect at least English, German, French, Japanese (ja), Portuguese (both regular and Brazilian), and Chinese. Could you change the content type for the affected languages? Most browsers (and thus users) would benefit from this change.
Many thanks!
Wesley
The text was updated successfully, but these errors were encountered:
+1 for this, please check all languages, it affects more than those outlined by @waterkip.
If I'm reading https://po4a.org/man/man1/po4a.1.php in English and click on a footer link to change it to sr_Cyrl in Edge 125.0.2535.92, the browser tries to download the file po4a.1.php.sr_Cyrl.
We need to completely redo the website. We need a more usual authoring solution allowing source code in markdown or asciidoc instead of html. And we need a way to automatically push the git commits to the webpage.
Any help is welcome, as I don't find the time to do these rather easy tasks. I personnally don't really care about the exact solution we pick. It just needs to do its work.
Hello,
I sent this message to the mailing list, but it bounced because:
So I'm filing this on your github.
I have an issue with the Accept-Language and the Accept header on the website
po4a.org
. For some reason the website responds with the Dutch language. And while I'm a native speaker, the Accept-Language of the browser isn't accepted. I've tested this across five browsers/user agents:TL;DR
Not all languages have
text/html
content type as seen in the Alternates header. Instead they useapplication/x-httpd-php
, which aren't in the requested language (or in the preferred Accept). This affects the following languages: English, German, French, Japanese(?) (ja), Portuguese (both regular and Brazilian), and Chinese.This is correct:
This goes wrong:
The behaviour changes when we add German.
Correct:
Incorrect:
This is what intrigued me as German with an Accept: * is accepted, so I dug a little deeper:
This returns a 406 HTTP code but adds Alternates to the response:
Now when we request it with the
application/x-httpd-php
content type:We get the correct language.
Conclusion:
Not all languages have
text/html
but instead useapplication/x-httpd-php
, which aren't in the requested language (or in the preferred Accept). It seems to affect at least English, German, French, Japanese (ja), Portuguese (both regular and Brazilian), and Chinese. Could you change the content type for the affected languages? Most browsers (and thus users) would benefit from this change.Many thanks!
Wesley
The text was updated successfully, but these errors were encountered: