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

Unified Diff: net/http/http_content_disposition.cc

Issue 1107913003: Remove support for "name" parameter from Content-Disposition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust comment for clarity Created 5 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
« no previous file with comments | « net/http/http_content_disposition.h ('k') | net/http/http_content_disposition_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_content_disposition.cc
diff --git a/net/http/http_content_disposition.cc b/net/http/http_content_disposition.cc
index 29593cdaf9021ee8cf43c088b5329552471b9a03..1563becc742fea5ba3095e48f816c0e837034e2e 100644
--- a/net/http/http_content_disposition.cc
+++ b/net/http/http_content_disposition.cc
@@ -397,7 +397,6 @@ void HttpContentDisposition::Parse(const std::string& header,
std::string::const_iterator end = header.end();
pos = ConsumeDispositionType(pos, end);
- std::string name;
std::string filename;
std::string ext_filename;
@@ -410,12 +409,6 @@ void HttpContentDisposition::Parse(const std::string& header,
&parse_result_flags_);
if (!filename.empty())
parse_result_flags_ |= HAS_FILENAME;
- } else if (name.empty() && LowerCaseEqualsASCII(iter.name_begin(),
- iter.name_end(),
- "name")) {
- DecodeFilenameValue(iter.value(), referrer_charset, &name, NULL);
- if (!name.empty())
- parse_result_flags_ |= HAS_NAME;
} else if (ext_filename.empty() && LowerCaseEqualsASCII(iter.name_begin(),
iter.name_end(),
"filename*")) {
@@ -427,10 +420,8 @@ void HttpContentDisposition::Parse(const std::string& header,
if (!ext_filename.empty())
filename_ = ext_filename;
- else if (!filename.empty())
- filename_ = filename;
else
- filename_ = name;
+ filename_ = filename;
}
} // namespace net
« no previous file with comments | « net/http/http_content_disposition.h ('k') | net/http/http_content_disposition_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698