diff options
author | corvid <corvid@lavabit.com> | 2012-12-04 07:46:08 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2012-12-04 07:46:08 +0000 |
commit | 2442eca7c6b7ab4384785c55eb380d3c43a4ecc8 (patch) | |
tree | 6c012ccc6bc366316c8ee7fc687bbc21d358fc45 /src | |
parent | 60dba9e3622e2616f81aebff8c7099ac3c0e6e71 (diff) |
update form-data commentary
As of a couple of years ago, there was talk and confusion over whether
rfc 2231 should be used, or rfc 2047. But now... *sigh*
Diffstat (limited to 'src')
-rw-r--r-- | src/form.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/form.cc b/src/form.cc index 05042569..ac36baa2 100644 --- a/src/form.cc +++ b/src/form.cc @@ -1338,14 +1338,15 @@ void DilloHtmlForm::filesInputMultipartAppend(Dstr* data, dStr_append(data, "--"); dStr_append(data, boundary); } - // TODO: encode name, filename dStr_sprintfa(data, "\r\n" "Content-Disposition: form-data; name=\"%s\"; " "filename=\"", name); /* - * Servers don't seem to like encoded names yet, but let's at least - * replace the characters that are the most likely to damage things. + * Replace the characters that are the most likely to damage things. + * For a while, there was some momentum to standardize on an encoding, + * but HTML5/Ian Hickson/his Google masters are, as of late 2012, + * evidently standing in opposition to all of that for some reason. */ for (int i = 0; char c = filename[i]; i++) { if (c == '\"' || c == '\r' || c == '\n') @@ -1378,7 +1379,6 @@ void DilloHtmlForm::inputMultipartAppend(Dstr *data, dStr_append(data, "--"); dStr_append(data, boundary); } - // TODO: encode name (RFC 2231) dStr_sprintfa(data, "\r\n" "Content-Disposition: form-data; name=\"%s\"\r\n" |