summaryrefslogtreecommitdiffstats
path: root/net/http/http_content_disposition_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove support for "name" parameter from Content-Disposition.dtapuska2015-04-301-13/+13
| | | | | | | | | | | | | | | | All other UAs don't treat the name value as a synonym. Drop support from Chrome. UMA metrics indicate 0.00% actually only contain the "name" attribute. 0.01% of requests had with a name attribute; but had higher preference values as well. This feature isn't clearly used anymore. BUG=162815 TEST=net_unittests Review URL: https://codereview.chromium.org/1107913003 Cr-Commit-Position: refs/heads/master@{#327708}
* net cleanup: Remove unnecessary namespace prefixes.ttuttle2015-04-231-287/+231
| | | | | | | | BUG=475208 Review URL: https://codereview.chromium.org/1095823003 Cr-Commit-Position: refs/heads/master@{#326610}
* Convert ARRAYSIZE_UNSAFE -> arraysize in net/.viettrungluu2014-10-161-3/+3
| | | | | | | | | R=rsleevi@chromium.org BUG=423134 Review URL: https://codereview.chromium.org/662553002 Cr-Commit-Position: refs/heads/master@{#299857}
* Update uses of UTF conversions in courgette/, device/, extensions/, ↵avi@chromium.org2013-12-251-2/+2
| | | | | | | | | | | | google_apis/, gpu/, ipc/, media/, net/ to use the base:: namespace. BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/112963005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242496 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in net/.avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/15995039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204876 0039d316-1c4b-4281-b951-d872f2087c98
* Add UMA for measuring Content-Dispostion header use and abuse.asanka@chromium.org2012-12-171-0/+75
| | | | | | | | BUG=162815 Review URL: https://chromiumcodereview.appspot.com/11478034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173403 0039d316-1c4b-4281-b951-d872f2087c98
* Prefer 'filename' parameters if both 'name' and 'filename' parameters are ↵asanka@chromium.org2012-06-041-0/+5
| | | | | | | | | | | | specified in a Content-Disposition header. BUG=129366 TEST=net_unittests Review URL: https://chromiumcodereview.appspot.com/10447019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140289 0039d316-1c4b-4281-b951-d872f2087c98
* This patch tunes our parsing of the Content-Disposition header to match otherabarth@chromium.org2012-01-311-7/+7
| | | | | | | | | | | | | | | | | browsers and the specs slightly better. There are two changes in this patch: 1) We now require disposition-type to match the RFC 2616 token production in order to treat the response as an attachment (i.e., a download). 2) When there are multiple filename parameters, we now take the first one, which maches our behavior prior to the new parser and matches what other browsers do. Review URL: http://codereview.chromium.org/9225046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119833 0039d316-1c4b-4281-b951-d872f2087c98
* BufferedResourceHandler::ShouldDownload shouldn't manually parse ↵abarth@chromium.org2012-01-281-1/+1
| | | | | | | | | | | | Content-Disposition Now that we have net::HttpContentDisposition to parse the Content-Disposition header, BufferedResourceHandler::ShouldDownload shouldn't use its own ad-hoc parser. Review URL: http://codereview.chromium.org/9297039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119611 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable HttpContentDispositionTest.tc2231abarth@chromium.org2012-01-281-1/+7
| | | | | | | | TBR=asanka Review URL: http://codereview.chromium.org/9225035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119591 0039d316-1c4b-4281-b951-d872f2087c98
* This test fails on Windows. Need to investigate.abarth@chromium.org2012-01-271-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119497 0039d316-1c4b-4281-b951-d872f2087c98
* Import Content-Disposition parsing tests from http://greenbytes.de/tech/tc2231/abarth@chromium.org2012-01-271-0/+303
| | | | | | | | We pass the vast majority of these tests. In a future CL, I will go through and fix the ones where we disagree with tc2231 (as appropriate). Review URL: https://chromiumcodereview.appspot.com/9121044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119489 0039d316-1c4b-4281-b951-d872f2087c98
* Improve parsing of the Content-Disposition headerabarth@chromium.org2012-01-271-0/+201
Previous, we were using GetHeaderParamValue to parse the Content-Disposition header, which describes itself as a "quick and dirty implementation." After this patch, we use more of our normal HTTP parsing machinery, making our parsing much less quirky and better aligned with RFC 6266. Some notes: 1) Many of the test cases for parsing the Content-Disposition header included the string "Content-Disposition: " in the input. I've looked through all of the callers of these functions, and that seems to be completely bogus. The old parser wasn't careful enough to see that as a problem, but the new one follows the spec more closely. I've updated the test cases to remove this string. 2) After this patch, there's a bunch of code in net_util.cc that really should be moved to http_content_disposition.cc. I didn't move that code in this patch because I didn't want this path to be too large. I'll move it in a future patch. 3) In a future patch, I'll audit the codebase for callers of GetHeaderParamValue. With any luck, we'll be able to remove them all and delete this less-than-amazing function. BUG=65423 Review URL: http://codereview.chromium.org/9234055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119378 0039d316-1c4b-4281-b951-d872f2087c98