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

Side by Side Diff: Source/platform/network/HTTPRequest.cpp

Issue 99733002: Update HTTPHeaderMap wrappers to use AtomicString type for header values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years 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 | « Source/platform/network/HTTPRequest.h ('k') | Source/platform/network/ResourceRequest.h » ('j') | 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) 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 size_t result = parseHTTPRequestLine(data, length, failureReason, m_requestM ethod, url, m_httpVersion); 74 size_t result = parseHTTPRequestLine(data, length, failureReason, m_requestM ethod, url, m_httpVersion);
75 m_url = KURL(KURL(), url); 75 m_url = KURL(KURL(), url);
76 return result; 76 return result;
77 } 77 }
78 78
79 size_t HTTPRequest::parseHeaders(const char* data, size_t length, String& failur eReason) 79 size_t HTTPRequest::parseHeaders(const char* data, size_t length, String& failur eReason)
80 { 80 {
81 const char* p = data; 81 const char* p = data;
82 const char* end = data + length; 82 const char* end = data + length;
83 AtomicString name; 83 AtomicString name;
84 String value; 84 AtomicString value;
85 for (; p < data + length; p++) { 85 for (; p < data + length; p++) {
86 size_t consumedLength = parseHTTPHeader(p, end - p, failureReason, name, value); 86 size_t consumedLength = parseHTTPHeader(p, end - p, failureReason, name, value);
87 if (!consumedLength) 87 if (!consumedLength)
88 return 0; 88 return 0;
89 p += consumedLength; 89 p += consumedLength;
90 if (name.isEmpty()) 90 if (name.isEmpty())
91 break; 91 break;
92 m_headerFields.add(name, value); 92 m_headerFields.add(name, value);
93 } 93 }
94 return p - data; 94 return p - data;
(...skipping 14 matching lines...) Expand all
109 , m_httpVersion(version) 109 , m_httpVersion(version)
110 , m_requestMethod(requestMethod) 110 , m_requestMethod(requestMethod)
111 { 111 {
112 } 112 }
113 113
114 HTTPRequest::~HTTPRequest() 114 HTTPRequest::~HTTPRequest()
115 { 115 {
116 } 116 }
117 117
118 } // namespace WebCore 118 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/network/HTTPRequest.h ('k') | Source/platform/network/ResourceRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698