This is a discussion on Apache 1.3 content negotiation within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi! I am testing content negotiation on my server and I have made some test pages. But I got a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi!
I am testing content negotiation on my server and I have made some test pages. But I got a problem. I have made three files: test.html.en, test.html.fr, test.html.it and I am trying to access test.html URL. The problem is that with the same browser configuration (Mozilla, "en" is set as preffered language) server sends sometimes English version (as it should) but sometimes it sends 406 error with links to all three files (including English). I understand the 406 error and that it is normal that it sends it when it cannot match a language to a file. That is really strange as I do not change anything between requests. It is not proxy problem (I do not use it) or cache problem as I sniffed my connection and to exactly the same GET request from my browser server sends once html file and once 406 error. I have not found any pattern. It seems random. And ideas? Mike |
|
|||
|
On Sun, 19 Sep 2004, Mike Mimic wrote:
> The problem is that with the same browser configuration > (Mozilla, "en" is set as preffered language) server > sends sometimes English version (as it should) but > sometimes it sends 406 error with links to all three > files (including English). I understand the 406 error > and that it is normal that it sends it when it cannot > match a language to a file. Have you found my page http://ppewww.ph.gla.ac.uk/~flavell/www/lang-neg.html on this general topic? I don't know the precise answer to your problem; but I think if you follow the suggestions on this page, then you will be able to get the results you wanted (even if you still don't understand what was going wrong before ;-) (Are you using MultiViews, or a type-map?) |
|
|||
|
Hi!
Alan J. Flavell wrote: > On Sun, 19 Sep 2004, Mike Mimic wrote: >>The problem is that with the same browser configuration >>(Mozilla, "en" is set as preffered language) server >>sends sometimes English version (as it should) but >>sometimes it sends 406 error with links to all three >>files (including English). I understand the 406 error >>and that it is normal that it sends it when it cannot >>match a language to a file. > > Have you found my page > http://ppewww.ph.gla.ac.uk/~flavell/www/lang-neg.html > on this general topic? Yes. I have read it. And I have also read Apache documentation on the topic. > (Are you using MultiViews, or a type-map?) MultiViews. I have discovered that after fresh restart (of Apache) everything is working OK. But after some time, minute or two, (I do not why) this two requests have different responses (first English (because of LanguagePriority) and second 406): GET / HTTP/1.1 Host: my.host.com Accept: */* Keep-Alive: 300 Connection: keep-alive GET / HTTP/1.1 Host: my.host.com Accept: */*;q=0.1 Keep-Alive: 300 Connection: keep-alive Mike |
|
|||
|
On Sun, 19 Sep 2004, Mike Mimic wrote:
> MultiViews. > > I have discovered that after fresh restart (of Apache) everything > is working OK. But after some time, minute or two, (I do not why) > this two requests have different responses (first English (because > of LanguagePriority) and second 406): > > GET / HTTP/1.1 > Host: my.host.com > Accept: */* > Keep-Alive: 300 > Connection: keep-alive > > GET / HTTP/1.1 > Host: my.host.com > Accept: */*;q=0.1 > Keep-Alive: 300 > Connection: keep-alive Boggle. I don't have an explanation (at least, not yet, nor have I any confidence that I'll be able to give one), but can you, at least, say what the "Vary:" response header contained in each case? |
|
|||
|
Hi!
Alan J. Flavell wrote: > Boggle. I don't have an explanation (at least, not yet, nor have I > any confidence that I'll be able to give one), but can you, at least, > say what the "Vary:" response header contained in each case? Of coure. For working one: Vary: negotiate,accept-language TCN: choice For other one: Vary: negotiate,accept-language TCN: list If you need any logs or anything (debug mode?) ... Mike |