diff options
author | pkasting@google.com <pkasting@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-01 01:48:35 +0000 |
---|---|---|
committer | pkasting@google.com <pkasting@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-01 01:48:35 +0000 |
commit | 53eaee80ee4556a8dc4e0ac5158a56fd236a70c9 (patch) | |
tree | 6612f645873fed4d9b5e04332c23e3b97757d280 /chrome/browser/autocomplete | |
parent | 7eaf9048f438fea08ffd9fdcf9afdf28c6d1b4f7 (diff) | |
download | chromium_src-53eaee80ee4556a8dc4e0ac5158a56fd236a70c9.zip chromium_src-53eaee80ee4556a8dc4e0ac5158a56fd236a70c9.tar.gz chromium_src-53eaee80ee4556a8dc4e0ac5158a56fd236a70c9.tar.bz2 |
Allow trailing commas in JSON responses from suggestion services. Various real-world servers return responses like this and there's no obvious reason to disallow it, even though technically it violates the JSON spec.
BUG=1295216
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/search_provider.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc index 40ba841..fbc24b5 100644 --- a/chrome/browser/autocomplete/search_provider.cc +++ b/chrome/browser/autocomplete/search_provider.cc @@ -136,6 +136,7 @@ void SearchProvider::OnURLFetchComplete(const URLFetcher* source, suggest_results_.clear(); navigation_results_.clear(); JSONStringValueSerializer deserializer(data); + deserializer.set_allow_trailing_comma(true); Value* root_val = NULL; have_suggest_results_ = status.is_success() && (response_code == 200) && deserializer.Deserialize(&root_val) && ParseSuggestResults(root_val); |