W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: XHR: restrictions on request headers

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 14 Apr 2006 10:10:51 +0200
To: Jonas Sicking <jonas@sicking.cc>
Cc: web APIs WG <public-webapi@w3.org>
Message-ID: <n7ku32p2t5suugmc9bs1nb2jdburhi774o@hive.bjoern.hoehrmann.de>

* Jonas Sicking wrote:
>The only use case I've heard so far is the ability to request a 
>pure-ascii response. Or I guess more generally requesting an encoding 
>that only contains a specific subset of the unicode map. However I'm not 
>sure what value this gives over simply looping over responseText and 
>testing if all chars are in the desired subset.

I think testing won't get you very far as far as I understant the use
case here. If you have a text file with my name, one in US-ASCII with
"Bjoern" and one in ISO-8859-1 with "Björn", getting the latter would
mean you have to replace "ö" with "oe" in the script if you really
want the us-ascii transliteration.

I've used something like the following in an unrelated test case some
time ago:

  HTTP/1.1 302 Found
  Vary: Accept-Charset, Accept-Language
  Content-Language: ja
  Location: data:text/plain;charset=utf-8,%E3%83%95%E3%82%A1%E3%82%A4%E3%83%8A%E3%83%AB%E3%83%95%E3%82%A1%E3%83%B3%E3%82%BF%E3%82%B8

versus

  HTTP/1.1 302 Found
  Vary: Accept-Charset, Accept-Language
  Content-Language: ja
  Location: data:text/plain;charset=iso-8859-4,Fainaru%20Fantaj%EF

and

  HTTP/1.1 302 Found
  Vary: Accept-Charset, Accept-Language
  Content-Language: en
  Location: data:text/plain;charset=us-ascii,Final%20Fantasy
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Friday, 14 April 2006 08:11:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:54 GMT