<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 4, 2018 at 6:15 PM Kim Rasmussen &lt;<a href="mailto:kr@asseco.dk">kr@asseco.dk</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I have a setup where I have my own variant of a ProxyHandler within undertow.</div><div>In one case, I proxy requests towards an IIS running MailEnable - if I try to download a webmail attachment where the filename contains non-ascii characters, MailEnable sends the filename in UTF-8 characters in the HTTP header.</div><div><br></div><div>I guess this is kinda a violation of the HTTP protocol, but thats how it is.</div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>When I run my undertow proxy using HTTP1.1 between the browser and undertow, everything works as expected - the browser detects and supports UTF-8 characters in the filename in the HTTP headers.</div><div>But, if I run HTTP/2 between the browser and undertow, using Chrome I am getting an SPDY_PROTOCOL_ERROR displayed within chrome.</div></div></blockquote><div><br></div><div>Does it work with other browsers? Its possible that we have a bug in how we handle this, but I think it is more likely that chrome is just being more strict with HTTP/2 and enforcing the spec.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>So, I guess that it is because Chrome chokes on the UTF-8 characters in the HTTP/2 headers - I tried digging into the spec but I cannot really find anything mentioned there regarding restrictions on header content - just on header naming.</div></div></blockquote><div><br></div><div><a href="https://tools.ietf.org/html/rfc7230">https://tools.ietf.org/html/rfc7230</a><br></div><div><br></div><div>&quot;   Historically, HTTP has allowed field content with text in the</div><div>   ISO-8859-1 charset [ISO-8859-1], supporting other charsets only</div><div>   through use of [RFC2047] encoding.  In practice, most HTTP header</div><div>   field values use only a subset of the US-ASCII charset [USASCII].</div><div>   Newly defined header fields SHOULD limit their field values to</div><div>   US-ASCII octets.  A recipient SHOULD treat other octets in field</div><div>   content (obs-text) as opaque data.&quot;</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Any suggestions ? I could of course strip the invalid characters from the response header before forwarding them but wanted to check if there is a better way first....<br clear="all"></div></div></blockquote><div><br></div><div>Maybe you could use RFC2047 encoding, although I don&#39;t think it is particularly widely used, but I guess chrome probably supports it. </div><div><br></div><div>Looking at our HTTP/2 encoder it does not attempt to deal with UTF-8 at all, it just casts the character to a byte, so we would not be encoding the characters properly anyway, but I am not sure if it matters as I don&#39;t think the browser would treat them as UTF-8 anyway.</div><div><br></div><div>Stuart</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div>-- <br><div class="gmail-m_3949205584039342372gmail_signature"><div dir="ltr"><div><span style="font-family:arial,sans-serif;border-collapse:collapse"><div style="font-size:13px"><span style="font-family:verdana,sans-serif;font-size:13px">Med venlig hilsen / Best regards</span></div><div><p style="font-size:13px"><b><span lang="EN-GB" style="font-size:10pt"><font color="#000066"><font face="verdana, sans-serif"><span style="color:rgb(34,34,34);background-color:rgb(255,255,255)">Kim Rasmussen</span></font></font></span></b><b><span lang="EN-GB" style="color:rgb(0,51,102)"><font face="verdana, sans-serif"><br></font></span></b><span lang="EN-GB" style="font-size:10pt;color:rgb(102,102,102)"><font face="verdana, sans-serif">Partner, IT Architect</font></span></p><p style="font-size:13px"><b><span lang="EN-GB" style="font-size:10pt;color:rgb(102,102,102)"><font face="verdana, sans-serif">Asseco Denmark A/S</font></span></b><span lang="EN-GB" style="font-size:10pt;color:rgb(102,102,102)"><font face="verdana, sans-serif"><b><br></b>Kronprinsessegade 54<br>DK-1306 Copenhagen K<br>Mobile: +45 26 16 40 23<br>Ph.: +45 33 36 46 60<br>Fax: +45 33 36 46 61</font></span></p><p><span lang="EN-GB" style="color:rgb(102,102,102)"><span style="font-family:verdana,sans-serif"><span style="font-size:13.3333px"><a href="https://ceptor.io" target="_blank">https://ceptor.io</a><br></span></span></span><span style="font-size:10pt;font-family:verdana,sans-serif;color:rgb(102,102,102)"><a href="https://asseco.dk" target="_blank">https://asseco.dk</a></span></p><p style="font-size:13px"><span lang="EN-GB" style="font-size:10pt;color:rgb(102,102,102)"><font face="verdana, sans-serif"><br></font></span></p></div></span></div></div></div>
</div></div>
_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a></blockquote></div></div>