Apache 1.3 content negotiation

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-19-2004
Mike Mimic
 
Posts: n/a
Default Apache 1.3 content negotiation

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
  #2 (permalink)  
Old 09-19-2004
Alan J. Flavell
 
Posts: n/a
Default Re: Apache 1.3 content negotiation

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?)
  #3 (permalink)  
Old 09-19-2004
Mike Mimic
 
Posts: n/a
Default Re: Apache 1.3 content negotiation

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
  #4 (permalink)  
Old 09-19-2004
Alan J. Flavell
 
Posts: n/a
Default Re: Apache 1.3 content negotiation

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?
  #5 (permalink)  
Old 09-19-2004
Mike Mimic
 
Posts: n/a
Default Re: Apache 1.3 content negotiation

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:53 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0