Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

OT: 406 Response Error
 

Brian




quote this post edit post

IP Loged report this post

Old Post  08-22-04 - 12:25 AM  
Lachlan Hunt wrote:

> I tried to set:
>
>   ErrorDocument 406 /error/406
>
> which refers to <http://www.lachy.id.au/error/406>
>
> But that document was also en-au, due to the fact that I had set
>
>   DefaultLanguage en-au

> how I can get the best of both worlds and still send the custom 406
> document, while having my default language as en-au

Set a different default language (en) for the directory that contains
error documents, using another .htaccess file.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/


Post Follow-Up to this message ]
Re: OT: 406 Response Error
 

Alan J. Flavell




quote this post edit post

IP Loged report this post

Old Post  08-22-04 - 12:25 AM  
On Sat, 21 Aug 2004, Brian wrote:

> Set a different default language (en) for the directory that contains
> error documents, using another .htaccess file.

I have to say that I don't think that's the answer, sorry.  The 406
dilemma will still be there when the visitor requests, for example,
language "nl" only.

The first part of this question is, should one be using a custom 406
page at all?  Apache automatically produces a nice little menu of
available variants (along with its unpleasant error message text), and
the RFC says that the server *SHOULD* produce such a menu.  But if you
create a custom 406 page, then you lose that automatically-generated
menu.  Short of rebuilding the module, you can't substitute the error
report text with some text of your choice, without losing the
automatically-generated menu.

Therefore, it seems that any custom 406 page needs to re-create a menu
of available variants.  Which is tedious and error-prone.

The alternative is to avoid a 406 situation developing, by arranging
for one of the variants to be returned even when nothing matches.  And
one of the keys to being able to do that is not to specify a
DefaultLanguage at all.

And then nominate one of the variants to be the non-language-specific
variant, and that'll be the one which is returned when none of the
requester's language selections match.  I say more about that in the
cited web page, and I can only emphasise the remark I made before:
look carefully at the documentation for DefaultLanguage, it might not
do what you assume it does.

If you only wanted to advertise the HTTP content language, rather than
also influencing the content negotiation in unintended ways, then
maybe what is wanted in the .htaccess is a "Header" directive - I
haven't looked into that in detail, though - I suppose it would be
e.g:

Header set Content-Language en-au


Post Follow-Up to this message ]
Re: OT: 406 Response Error
 

Brian




quote this post edit post

IP Loged report this post

Old Post  08-22-04 - 04:15 AM  
Alan J. Flavell wrote:
> Brian wrote:
> 
>
> I have to say that I don't think that's the answer, sorry.

Apologies, I've used that technique to overcome other problems,
compeltely unrelated to 405, or indeed content negotiation.

> The 406 dilemma will still be there when the visitor requests, for
> example, language "nl" only.

I was only giving a quick solution to the double 406, assuming that the
op was experienced enough to work out the rest of it.

> Apache automatically produces a nice little menu of available
> variants (along with its unpleasant error message text), and the RFC
> says that the server *SHOULD* produce such a menu.  But if you create
> a custom 406 page, then you lose that automatically-generated menu.

Right you are. In fact, you've jogged my memory: this why I've avoided
the whole mess. I'd rather not expose the novice user to a cryptic
message, and the alternative is to provide no such menu.

> I can only emphasise the remark I made before: look carefully at the
> documentation for DefaultLanguage, it might not do what you assume it
> does.

All good advice. I should have kept my mouth shut.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/


Post Follow-Up to this message ]
Re: OT: 406 Response Error
 

Alan J. Flavell




quote this post edit post

IP Loged report this post

Old Post  08-22-04 - 12:14 PM  
On Sat, 21 Aug 2004, Brian wrote:

> I should have kept my mouth shut.

Not at all!  Discussions like this help to identify points that might
otherwise have gone unnoticed.  I've learned something new, anyway.


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 03:26 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top