Read more

How to use different encodings for text in HTTP headers

Ulrich Berkmueller
July 19, 2011Software engineer

In order to use different encodings than ASCII for HTTP headers use the following syntax:

Header-Key: Header-Value; Parameter-Name*=utf-8''parameter_value_in_utf8_and_encoded_chars
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Concrete example how to use an utf8 encoded filename for file downloads (with fallback):

Content-Disposition: attachment; filename="aepfel"; filename*=utf-8''%c3%a4pfel
Posted by Ulrich Berkmueller to makandra dev (2011-07-19 12:10)