summaryrefslogtreecommitdiffstats
path: root/ios/net/http_response_headers_util.h
blob: 4bc00199b5f987fb342795438369fa209a8ce4ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_
#define IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_

#include "base/memory/scoped_ptr.h"
#include "net/http/http_response_headers.h"

@class NSHTTPURLResponse;

namespace net {

// Placeholder status description since the actual text from the headers is not
// available.
extern const std::string kDummyHttpStatusDescription;

// Constructs a net::HttpResponseHeaders from |response|.
// Note: The HTTP version and the status code description are not accessible
// from NSHTTPURLResponse, so HTTP/1.0 and kDummyHttpStatusDescription will
// be used in the status line instead.
scoped_refptr<HttpResponseHeaders> CreateHeadersFromNSHTTPURLResponse(
    NSHTTPURLResponse* response);

}  // namespace net

#endif  // IOS_NET_HTTP_RESPONSE_HEADERS_UTIL_H_