Ivan Shmakov
2017-10-28 08:12:42 UTC
[…]
pretty sure it didn’t allow UTF-8; hence I suspect that failing
to catch that may be due to a bug in the validator), but at
least the validator at [1] correctly reports space characters as
(HTML5?) errors:
3. Error: Bad value Antropozofi/Valentin Wember – Waar gaan we
eigenlijk heen%3F.pdf for attribute href on element a: Illegal
character in path segment: space is not allowed.
[1] http://validator.nu/?doc=http://hendrikmaryns.name/antro.shtml
in that it points to the ‘ErrorDocument’ directive. See [2].
[2] http://httpd.apache.org/docs/2.4/mod/core.html#errordocument
However, the problem is not in the “document,” but rather in the
Content-Type: header, which is:
Content-Type: text/html; charset=iso-8859-1
At the same time, Apache includes the (supposed) filename in the
response “as is”: in UTF-8.
Curiously, adding ‘AddDefaultCharset utf-8’ [3] to my .htaccess
didn’t seem to have any effect on the 404 response header, so
I’m interested in how it can be fixed, too. (Reading [4]
wasn’t enlightening so far, either. Cross-posting to
news:comp.infosystems.www.servers.unix, as the question is
specific to server software, not HTML.)
[3] http://httpd.apache.org/docs/2.4/mod/core.html#adddefaultcharset
[4] http://httpd.apache.org/docs/2.4/mod/mod_mime.html
The strange redirects are due to some experimenting with .htaccess,
I’ll have to fix that, disabled it for now.
(I’ve suspected something along these lines.)I’ll have to fix that, disabled it for now.
Ivan Shmakov also noted that I claim html4 compliance but should move
to html5 if I want to use “unencoded” UTF-8 in ‘href’. Clicking the
button in the footer seems to indeed validate, so I wonder what the
exact problem is. I vaguely remember that in the past I decided not
to move to html5, but forgot for what reason. Maybe I will for this
reason.
Frankly, I’m unsure if HTML4 allowed whitespace in href (and I’mto html5 if I want to use “unencoded” UTF-8 in ‘href’. Clicking the
button in the footer seems to indeed validate, so I wonder what the
exact problem is. I vaguely remember that in the past I decided not
to move to html5, but forgot for what reason. Maybe I will for this
reason.
pretty sure it didn’t allow UTF-8; hence I suspect that failing
to catch that may be due to a bug in the validator), but at
least the validator at [1] correctly reports space characters as
(HTML5?) errors:
3. Error: Bad value Antropozofi/Valentin Wember – Waar gaan we
eigenlijk heen%3F.pdf for attribute href on element a: Illegal
character in path segment: space is not allowed.
[1] http://validator.nu/?doc=http://hendrikmaryns.name/antro.shtml
Lastly, it turns out the problem had nothing to do with the encoding.
The reason I thought so were the error messages, which contained
Not Found
The requested URL /Antropozofi/Spirituele opgaven België – Luc
Vandecasteele2.pdf was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
If I understand this right, the server is misconfigured and I should
fix this by providing my own 404.html file. Can someone point me to
the right place on how to do this?
Actually, the error message above is kind of self-documentingThe reason I thought so were the error messages, which contained
Not Found
The requested URL /Antropozofi/Spirituele opgaven België – Luc
Vandecasteele2.pdf was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to
use an ErrorDocument to handle the request.
If I understand this right, the server is misconfigured and I should
fix this by providing my own 404.html file. Can someone point me to
the right place on how to do this?
in that it points to the ‘ErrorDocument’ directive. See [2].
[2] http://httpd.apache.org/docs/2.4/mod/core.html#errordocument
However, the problem is not in the “document,” but rather in the
Content-Type: header, which is:
Content-Type: text/html; charset=iso-8859-1
At the same time, Apache includes the (supposed) filename in the
response “as is”: in UTF-8.
Curiously, adding ‘AddDefaultCharset utf-8’ [3] to my .htaccess
didn’t seem to have any effect on the 404 response header, so
I’m interested in how it can be fixed, too. (Reading [4]
wasn’t enlightening so far, either. Cross-posting to
news:comp.infosystems.www.servers.unix, as the question is
specific to server software, not HTML.)
[3] http://httpd.apache.org/docs/2.4/mod/core.html#adddefaultcharset
[4] http://httpd.apache.org/docs/2.4/mod/mod_mime.html
--
FSF associate member #7257 np. Flight of the Phoenix — Jumpy
FSF associate member #7257 np. Flight of the Phoenix — Jumpy