Mirsad Todorovac wrote:
GET /gpc-hr/h-index.html HTTP/1.0
Thank you, Mariusz, for pointing out this -- the error is mine, not Maurice's. It remained from trying it with HTTP/1.1, I suppose.
No problem. But in HTTP/1.1 URI part is the same, except Host header is required. Host specifies the domain name of the host the request is made to.
See also my comments below
domac:~/c> telnet www.gnu-pascal.de 80 Trying 132.252.79.79... Connected to Tartaglia.Dida.Physik.Uni-Essen.DE. Escape character is '^]'. GET /gpc-hr/h-index.html HTTP/1.0
You're requesting the file directly leaving no choice for server to reply with another language/charset.
HTTP/1.1 200 OK Date: Fri, 20 Jun 2003 19:49:56 GMT Server: Apache/1.3.26 (Unix) Debian GNU/Linux Last-Modified: Wed, 07 May 2003 01:11:57 GMT ETag: "23b2d-1a8a-3eb85d5d" Accept-Ranges: bytes Content-Length: 6794 Connection: close Content-Type: text/html; charset=iso-8859-1 ^^^^^^^^^^^^^^^^^^
Server knows nothing about the charset setting in the file. It responds with default.
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="hr"><head> <!-- Generated automatically by make-homepage DO NOT CHANGE THIS FILE MANUALLY! --> <title>GNU Pascal</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> ^^^^^^^^^^^^^^^^^^
If you want to use content negotiation, you should rather use Accept-Language (or Accpet-Charset, or both) header in your request. Eg.
GET /gpc/index.html HTTP/1.0 Accept-Language: hr
and if there is MultiViews option used in httpd.conf and the file index.html.hr exists, it will be returned.
I think browsers use charset from the file not from headers but it may depend on the browser.
Hope it's what you guys discuss, as I missed the begining of the thread. I'm sorry for wasting bandwidth if it's not the point.