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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.cpp

Issue 2822183002: Fetch, XHR: Use ", " as header list value separator. (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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 void ResourceRequest::SetPriority(ResourceLoadPriority priority, 321 void ResourceRequest::SetPriority(ResourceLoadPriority priority,
322 int intra_priority_value) { 322 int intra_priority_value) {
323 priority_ = priority; 323 priority_ = priority;
324 intra_priority_value_ = intra_priority_value; 324 intra_priority_value_ = intra_priority_value;
325 } 325 }
326 326
327 void ResourceRequest::AddHTTPHeaderField(const AtomicString& name, 327 void ResourceRequest::AddHTTPHeaderField(const AtomicString& name,
328 const AtomicString& value) { 328 const AtomicString& value) {
329 HTTPHeaderMap::AddResult result = http_header_fields_.Add(name, value); 329 HTTPHeaderMap::AddResult result = http_header_fields_.Add(name, value);
330 if (!result.is_new_entry) 330 if (!result.is_new_entry)
331 result.stored_value->value = result.stored_value->value + ',' + value; 331 result.stored_value->value = result.stored_value->value + ", " + value;
332 } 332 }
333 333
334 void ResourceRequest::AddHTTPHeaderFields(const HTTPHeaderMap& header_fields) { 334 void ResourceRequest::AddHTTPHeaderFields(const HTTPHeaderMap& header_fields) {
335 HTTPHeaderMap::const_iterator end = header_fields.end(); 335 HTTPHeaderMap::const_iterator end = header_fields.end();
336 for (HTTPHeaderMap::const_iterator it = header_fields.begin(); it != end; 336 for (HTTPHeaderMap::const_iterator it = header_fields.begin(); it != end;
337 ++it) 337 ++it)
338 AddHTTPHeaderField(it->key, it->value); 338 AddHTTPHeaderField(it->key, it->value);
339 } 339 }
340 340
341 void ResourceRequest::ClearHTTPHeaderField(const AtomicString& name) { 341 void ResourceRequest::ClearHTTPHeaderField(const AtomicString& name) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 // layer. 418 // layer.
419 if (HttpMethod() == HTTPNames::GET || HttpMethod() == HTTPNames::HEAD) 419 if (HttpMethod() == HTTPNames::GET || HttpMethod() == HTTPNames::HEAD)
420 return false; 420 return false;
421 421
422 // For non-GET and non-HEAD methods, always send an Origin header so the 422 // For non-GET and non-HEAD methods, always send an Origin header so the
423 // server knows we support this feature. 423 // server knows we support this feature.
424 return true; 424 return true;
425 } 425 }
426 426
427 } // namespace blink 427 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchHeaderListTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698