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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 { | 98 { |
99 ASSERT(!m_private.isNull()); | 99 ASSERT(!m_private.isNull()); |
100 m_private->encodedDataLength = encodedDataLength; | 100 m_private->encodedDataLength = encodedDataLength; |
101 } | 101 } |
102 | 102 |
103 static void addHeader(HTTPHeaderMap* map, const WebString& name, const WebString
& value) | 103 static void addHeader(HTTPHeaderMap* map, const WebString& name, const WebString
& value) |
104 { | 104 { |
105 HTTPHeaderMap::AddResult result = map->add(name, value); | 105 HTTPHeaderMap::AddResult result = map->add(name, value); |
106 // It is important that values are separated by '\n', not comma, otherwise S
et-Cookie header is not parseable. | 106 // It is important that values are separated by '\n', not comma, otherwise S
et-Cookie header is not parseable. |
107 if (!result.isNewEntry) | 107 if (!result.isNewEntry) |
108 result.iterator->value = result.iterator->value + "\n" + String(value); | 108 result.storedValue->value = result.storedValue->value + "\n" + String(va
lue); |
109 } | 109 } |
110 | 110 |
111 void WebHTTPLoadInfo::addRequestHeader(const WebString& name, const WebString& v
alue) | 111 void WebHTTPLoadInfo::addRequestHeader(const WebString& name, const WebString& v
alue) |
112 { | 112 { |
113 ASSERT(!m_private.isNull()); | 113 ASSERT(!m_private.isNull()); |
114 addHeader(&m_private->requestHeaders, name, value); | 114 addHeader(&m_private->requestHeaders, name, value); |
115 } | 115 } |
116 | 116 |
117 void WebHTTPLoadInfo::addResponseHeader(const WebString& name, const WebString&
value) | 117 void WebHTTPLoadInfo::addResponseHeader(const WebString& name, const WebString&
value) |
118 { | 118 { |
(...skipping 19 matching lines...) Expand all Loading... |
138 return m_private->responseHeadersText; | 138 return m_private->responseHeadersText; |
139 } | 139 } |
140 | 140 |
141 void WebHTTPLoadInfo::setResponseHeadersText(const WebString& headersText) | 141 void WebHTTPLoadInfo::setResponseHeadersText(const WebString& headersText) |
142 { | 142 { |
143 ASSERT(!m_private.isNull()); | 143 ASSERT(!m_private.isNull()); |
144 m_private->responseHeadersText = headersText; | 144 m_private->responseHeadersText = headersText; |
145 } | 145 } |
146 | 146 |
147 } // namespace blink | 147 } // namespace blink |
OLD | NEW |