Subject: bug#16198: 24.3.50; [PATCH 1/2] eww: Does not support file upload.

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 25 Dec 2013 09:26:05 +0100

Kenjiro NAKAYAMA <[email-masked]> writes:

Looks good.  One bit that could perhaps be changed is this:

> +                            "Content-Disposition: form-data; name=\"" (cdr (assoc "name" (cdr data))) "\"; filename=\"" (cdr (assoc "filename" (cdr data))) "\"\r\n"

Lines shouldn't be longer than 80 characters, and these file names may
perhaps contain the " character, which would make these specs invalid?

It's usually best to use `format' with %S in these cases:

(setq file "foo\"bar")

(insert (concat "name=\"" file "\""))
name="foo"bar"

(insert (format "name=%S" file))
name="foo\"bar"

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/