Opened 10 years ago

Last modified 8 months ago

#24213 new New feature

RFC 2231 Section 4.1 is not implemented

Reported by: Raúl Cumplido Owned by:
Component: HTTP handling Version: dev
Severity: Normal Keywords:
Cc: raulcumplido@…, Herbert Fortes, Ülgen Sarıkavak Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Anton Samarchyan)

Currently RFC 2231 Section 4 is implemented (there is a closed 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!"

Change History (9)

comment:1 by Raúl Cumplido, 10 years ago

Cc: raulcumplido@… added
Needs tests: set
Type: UncategorizedNew feature

comment:2 by Berker Peksag, 10 years ago

If I understand you correctly, this is already implemented in the stdlib email module:

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.

comment:3 by Raúl Cumplido, 10 years ago

Yes, this is exactly what we should implement. The status is still new so I'll expect someone to Accept it or close it :)

comment:4 by Claude Paroz, 10 years ago

Component: UncategorizedHTTP handling
Needs tests: unset
Triage Stage: UnreviewedAccepted

Here you go :-)

comment:5 by Anton Samarchyan, 8 years ago

Description: modified (diff)

comment:6 by Herbert Fortes, 6 years ago

Cc: Herbert Fortes added

comment:7 by Mariusz Felisiak, 3 years ago

Owner: Raúl Cumplido removed
Status: newassigned

comment:8 by Mariusz Felisiak, 3 years ago

Status: assignednew

comment:9 by Ülgen Sarıkavak, 8 months ago

Cc: Ülgen Sarıkavak added
Note: See TracTickets for help on using tickets.
Back to Top