<div>Hi,</div><div><br></div><div>I have a couple of questions about Web Workers and text encoding of URLs. Usually, &#39;server&#39; and &#39;path&#39; portions of URLs are always sent in UTRF-8, the &#39;query&#39; portion may be sent encoded if it contains non-ascii characters. I&#39;m looking at what should be an encoding used for this. </div>
<div><br></div><div>Lets say we have the Page that creates a Worker which uses includeScripts to load the NestedScript.</div><div>Lets say the Page has some text encoding (from http header, meta tag or otherwise). For example, in latest FF nightly (Minefield) the following behaviors can be observed:</div>
<div><br></div><div>- XmlHttpRequest created on the Page would send its URL to server encoded using UTF8, irrespective to the encoding of the Page. However, a XmlHttpRequest created in the Worker would send the URL encoded using Page&#39;s encoding. It seems that either XHR on the Page should also use Page&#39;s encoding, or XHR in the Worker should use UTF-8. Bug?</div>
<div><br></div><div>- When a script of the Worker is decoded, the encoding of the Page is used, unless Worker&#39;s script comes with http header overriding the ecncoding. That sounds right. However, if the Worker in turn creates a nested Worker, uses an XHR or importScripts(url), the URL encoding defaults back to the Page&#39;s, even if there was overriding http header. It might be ok but seems a bit illogical - the nested worker or imported scripts are &#39;sub resources&#39;, their relative url is resolved against the Worker&#39;s base url, so it feels that their default encoding should be inherited from Worker. Is it a bug? </div>
<div><br></div><div>Thanks,</div><div>Dmitry</div>