[email protected] | b6dbb0a | 2011-04-18 00:17:41 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 1889dc1b | 2010-10-14 22:03:13 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #include "net/server/http_server_request_info.h" | ||||
6 | |||||
[email protected] | 7ab0ffdf | 2013-07-31 22:27:59 | [diff] [blame^] | 7 | #include "base/strings/string_util.h" |
8 | |||||
[email protected] | b6dbb0a | 2011-04-18 00:17:41 | [diff] [blame] | 9 | namespace net { |
10 | |||||
[email protected] | 1889dc1b | 2010-10-14 22:03:13 | [diff] [blame] | 11 | HttpServerRequestInfo::HttpServerRequestInfo() {} |
12 | |||||
13 | HttpServerRequestInfo::~HttpServerRequestInfo() {} | ||||
[email protected] | b6dbb0a | 2011-04-18 00:17:41 | [diff] [blame] | 14 | |
[email protected] | 86c6a0b5 | 2011-08-02 19:49:25 | [diff] [blame] | 15 | std::string HttpServerRequestInfo::GetHeaderValue( |
16 | const std::string& header_name) const { | ||||
[email protected] | 7ab0ffdf | 2013-07-31 22:27:59 | [diff] [blame^] | 17 | DCHECK_EQ(StringToLowerASCII(header_name), header_name); |
[email protected] | 86c6a0b5 | 2011-08-02 19:49:25 | [diff] [blame] | 18 | HttpServerRequestInfo::HeadersMap::const_iterator it = |
19 | headers.find(header_name); | ||||
20 | if (it != headers.end()) | ||||
21 | return it->second; | ||||
[email protected] | 007b3f8 | 2013-04-09 08:46:45 | [diff] [blame] | 22 | return std::string(); |
[email protected] | 86c6a0b5 | 2011-08-02 19:49:25 | [diff] [blame] | 23 | } |
24 | |||||
[email protected] | b6dbb0a | 2011-04-18 00:17:41 | [diff] [blame] | 25 | } // namespace net |