OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 void WebHTTPLoadInfo::setEncodedDataLength(long long encodedDataLength) { | 83 void WebHTTPLoadInfo::setEncodedDataLength(long long encodedDataLength) { |
84 ASSERT(!m_private.isNull()); | 84 ASSERT(!m_private.isNull()); |
85 m_private->encodedDataLength = encodedDataLength; | 85 m_private->encodedDataLength = encodedDataLength; |
86 } | 86 } |
87 | 87 |
88 static void addHeader(HTTPHeaderMap* map, | 88 static void addHeader(HTTPHeaderMap* map, |
89 const WebString& name, | 89 const WebString& name, |
90 const WebString& value) { | 90 const WebString& value) { |
91 HTTPHeaderMap::AddResult result = map->add(name, value); | 91 HTTPHeaderMap::AddResult result = map->add(name, value); |
92 // It is important that values are separated by '\n', not comma, otherwise Set
-Cookie header is not parseable. | 92 // It is important that values are separated by '\n', not comma, otherwise |
| 93 // Set-Cookie header is not parseable. |
93 if (!result.isNewEntry) | 94 if (!result.isNewEntry) |
94 result.storedValue->value = | 95 result.storedValue->value = |
95 result.storedValue->value + "\n" + String(value); | 96 result.storedValue->value + "\n" + String(value); |
96 } | 97 } |
97 | 98 |
98 void WebHTTPLoadInfo::addRequestHeader(const WebString& name, | 99 void WebHTTPLoadInfo::addRequestHeader(const WebString& name, |
99 const WebString& value) { | 100 const WebString& value) { |
100 ASSERT(!m_private.isNull()); | 101 ASSERT(!m_private.isNull()); |
101 addHeader(&m_private->requestHeaders, name, value); | 102 addHeader(&m_private->requestHeaders, name, value); |
102 } | 103 } |
(...skipping 29 matching lines...) Expand all Loading... |
132 return m_private->npnNegotiatedProtocol; | 133 return m_private->npnNegotiatedProtocol; |
133 } | 134 } |
134 | 135 |
135 void WebHTTPLoadInfo::setNPNNegotiatedProtocol( | 136 void WebHTTPLoadInfo::setNPNNegotiatedProtocol( |
136 const WebString& npnNegotiatedProtocol) { | 137 const WebString& npnNegotiatedProtocol) { |
137 ASSERT(!m_private.isNull()); | 138 ASSERT(!m_private.isNull()); |
138 m_private->npnNegotiatedProtocol = npnNegotiatedProtocol; | 139 m_private->npnNegotiatedProtocol = npnNegotiatedProtocol; |
139 } | 140 } |
140 | 141 |
141 } // namespace blink | 142 } // namespace blink |
OLD | NEW |