Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59648 > unrolled thread

Why tornado.web.RequestHandler.arguments.get is binary?

Started byLaszlo Nagy <gandalf@shopzeus.com>
First post2013-11-16 20:38 +0100
Last post2013-11-16 20:38 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Why tornado.web.RequestHandler.arguments.get is binary? Laszlo Nagy <gandalf@shopzeus.com> - 2013-11-16 20:38 +0100

#59648 — Why tornado.web.RequestHandler.arguments.get is binary?

FromLaszlo Nagy <gandalf@shopzeus.com>
Date2013-11-16 20:38 +0100
SubjectWhy tornado.web.RequestHandler.arguments.get is binary?
Message-ID<mailman.2731.1384630731.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

I believe most data passed in URLs are character data. RFC 2986 also 
suggest that the standard should be percent encoded UTF-8:

> The generic URI syntax mandates that new URI schemes that provide for 
> the representation of character data in a URI must, in effect, 
> represent characters from the unreserved set without translation, and 
> should convert all other characters to bytes according to UTF-8 
> <http://en.wikipedia.org/wiki/UTF-8>, and then percent-encode those 
> values. This requirement was introduced in January 2005 with the 
> publication of RFC 3986 <http://tools.ietf.org/html/rfc3986>. URI 
> schemes introduced before this date are not affected. [1]

It is somewhat confusing that URI may be used to represent binary data. 
More specifically, http and https URLs contain textual data in almost 
all cases. When it is textual, it must be in UTF-8 (as dictated by the 
RFC). So what is the reason in arguments.get returning binary data?


[1] http://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_in_a_URI


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web