[hunchentoot-devel] rfc2388: Handling of octets and strings is flawed

Leslie P. Polzer sky at viridian-project.de
Tue Jan 27 12:20:05 UTC 2009


rfc2388 doesn't care about the encoding of strings
despite of returning them.

The result of a parsed body that doesn't contain
binary data is then a vector of octets disguised
as string, forcing the ultimate user to jump through
this or a similar hoop:

  (sb-ext:octets-to-string
    (map '(vector (unsigned-byte 8)) #'char-int s))

Hunchentoot for example will just return this broken
string when rfc2388 is used for parsing a parameter's
content.

IMO parse-mime should return a vector of octets and
not a string. Its users (e.g. HT) should then apply
appropriate character conversion functions to build
a proper string.

  Leslie

-- 
LinkedIn Profile: http://www.linkedin.com/in/polzer
Xing Profile: https://www.xing.com/profile/LeslieP_Polzer
Blog: http://blog.viridian-project.de/





More information about the Tbnl-devel mailing list