Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: third_party/crashpad/crashpad/util/net/http_multipart_builder.cc

Issue 2833533003: Update Crashpad to f487da4ff2c47a129e2f8f3a7e0c769b54e4585f (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
diff --git a/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc b/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
index 640d540a6ed0d889b378c76cb491a6aad454b626..91105be9c0cef74ddd8e0b85bd58e9e5c1ddee13 100644
--- a/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
+++ b/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
@@ -40,8 +40,8 @@ std::string GenerateBoundaryString() {
// characters from the set “'()+_,-./:=? ”, and not ending in a space.
// However, some servers have been observed as dealing poorly with certain
// nonalphanumeric characters. See
- // blink/Source/platform/network/FormDataBuilder.cpp
- // blink::FormDataBuilder::generateUniqueBoundaryString().
+ // blink/Source/platform/network/FormDataEncoder.cpp
+ // blink::FormDataEncoder::GenerateUniqueBoundaryString().
//
// This implementation produces a 56-character string with over 190 bits of
// randomness (62^32 > 2^190).
@@ -60,17 +60,12 @@ std::string GenerateBoundaryString() {
// Escapes the specified name to be suitable for the name field of a
// form-data part.
std::string EncodeMIMEField(const std::string& name) {
- // RFC 2388 §3 says to encode non-ASCII field names according to RFC 2047, but
- // no browsers implement that behavior. Instead, they send field names in the
- // page hosting the form’s encoding. However, some form of escaping is needed.
// This URL-escapes the quote character and newline characters, per Blink. See
- // blink/Source/platform/network/FormDataBuilder.cpp
- // blink::appendQuotedString().
- //
- // TODO(mark): This encoding is not necessarily correct, and the same code in
- // Blink is marked with a FIXME. Blink does not escape the '%' character,
- // that’s a local addition, but it seems appropriate to be able to decode the
- // string properly.
+ // blink/Source/platform/network/FormDataEncoder.cpp
+ // blink::AppendQuotedString(). %-encoding is endorsed by RFC 7578 §2, with
+ // approval for otherwise unencoded UTF-8 given by RFC 7578 §5.1. Blink does
+ // not escape the '%' character, but it seems appropriate to do so in order to
+ // be able to decode the string properly.
std::string encoded;
for (char character : name) {
switch (character) {
« no previous file with comments | « third_party/crashpad/crashpad/test/win/child_launcher.h ('k') | third_party/crashpad/crashpad/util/util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698