{{{
Content-Type: application/x-stuff
title*0*=us-ascii'en'This%20is%20even%20more%20
title*1*=%2A%2A%2Afun%2A%2A%2A%20
title*2="isn't it!"
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24213>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: raulcumplido@… (added)
* needs_better_patch: => 0
* type: Uncategorized => New feature
* needs_tests: => 1
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24213#comment:1>
Comment (by berkerpeksag):
If I understand you correctly, this is already implemented in the stdlib
email module:
{{{#!py
from email import message_from_string
s = """\
Content-Type: application/x-stuff;
\ttitle*0*=\"us-ascii'en'This%20is%20even%20more%20\";
\ttitle*1*=\"%2A%2A%2Afun%2A%2A%2A%20\";
\ttitle*2=\"isn't it!\"
"""
m = message_from_string(s)
print(m.get_param('title'))
# output is
# ('us-ascii', 'en', "This is even more ***fun*** isn't it!")
}}}
See also
https://hg.python.org/cpython/file/default/Lib/test/test_email/test_email.py#l5220
for relevant tests.
--
Ticket URL: <https://code.djangoproject.com/ticket/24213#comment:2>
Comment (by raulcd):
Yes, this is exactly what we should implement. The status is still new so
I'll expect someone to Accept it or close it :)
--
Ticket URL: <https://code.djangoproject.com/ticket/24213#comment:3>
* component: Uncategorized => HTTP handling
* needs_tests: 1 => 0
* stage: Unreviewed => Accepted
Comment:
Here you go :-)
--
Ticket URL: <https://code.djangoproject.com/ticket/24213#comment:4>
Old description:
> Currently RFC 2231 Section 4 is implemented (there is an open PR from me
> for a fix), but section 4.1 of the RFC is not implemented:
> http://tools.ietf.org/html/rfc2231#section-4.1
> Section 4.1 is about being able to have parameter continuation when
> combining Character Set and language Language headers:
>
> {{{
>
> Content-Type: application/x-stuff
> title*0*=us-ascii'en'This%20is%20even%20more%20
> title*1*=%2A%2A%2Afun%2A%2A%2A%20
> title*2="isn't it!"
>
> }}}
New description:
Currently RFC 2231 Section 4 is implemented (there is a closed
[https://github.com/django/django/pull/3983 PR] from me for a fix), but
section 4.1 of the RFC is not implemented:
http://tools.ietf.org/html/rfc2231#section-4.1
Section 4.1 is about being able to have parameter continuation when
combining Character Set and language Language headers:
{{{
Content-Type: application/x-stuff
title*0*=us-ascii'en'This%20is%20even%20more%20
title*1*=%2A%2A%2Afun%2A%2A%2A%20
title*2="isn't it!"
}}}
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24213#comment:5>
* cc: Herbert Fortes (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/24213#comment:6>
* owner: Raúl Cumplido => (none)
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/24213#comment:7>
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/24213#comment:8>