kkhorimoto | 555f740 | 2015-05-26 20:28:21 | [diff] [blame] | 1 | // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ |
| 6 | #define IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ |
| 7 | |
kkhorimoto | 555f740 | 2015-05-26 20:28:21 | [diff] [blame] | 8 | #include "net/http/http_response_headers.h" |
| 9 | |
| 10 | @class NSHTTPURLResponse; |
| 11 | |
| 12 | namespace net { |
| 13 | |
| 14 | // Placeholder status description since the actual text from the headers is not |
| 15 | // available. |
John Z Wu | 14af80f | 2019-06-14 17:25:57 | [diff] [blame] | 16 | extern const char kDummyHttpStatusDescription[]; |
kkhorimoto | 555f740 | 2015-05-26 20:28:21 | [diff] [blame] | 17 | |
| 18 | // Constructs a net::HttpResponseHeaders from |response|. |
| 19 | // Note: The HTTP version and the status code description are not accessible |
| 20 | // from NSHTTPURLResponse, so HTTP/1.0 and kDummyHttpStatusDescription will |
| 21 | // be used in the status line instead. |
| 22 | scoped_refptr<HttpResponseHeaders> CreateHeadersFromNSHTTPURLResponse( |
| 23 | NSHTTPURLResponse* response); |
| 24 | |
| 25 | } // namespace net |
| 26 | |
| 27 | #endif // IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_ |