Opened 4 years ago

Closed 4 years ago

#18007 closed New feature (duplicate)

Support for character sets in HTTP headers (RFC5987)

Reported by: claudep Owned by: nobody
Component: HTTP handling Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Currently, Django is converting all HTTP headers to us-ascii (RFC 2616). However, a new RFC is available which defines how to encode character set in header fields (RFC 5987):

My use case is about setting a filename (which can legitimately be a Unicode string) in the Content-Disposition header:

    response["Content-Disposition"]= "attachment; filename=%s" % fname

Change History (2)

comment:1 Changed 4 years ago by ramiro

See also #16470.

comment:2 Changed 4 years ago by Clueless

  • Resolution set to duplicate
  • Status changed from new to closed

I mentioned RFC 5987 in #16470. The general solution will be the same for these two tickets.

Note: See TracTickets for help on using tickets.
Back to Top