| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_HTTP_HTTP_STATUS_LINE_VALIDATOR_H_ | 5 #ifndef NET_HTTP_HTTP_STATUS_LINE_VALIDATOR_H_ |
| 6 #define NET_HTTP_HTTP_STATUS_LINE_VALIDATOR_H_ | 6 #define NET_HTTP_HTTP_STATUS_LINE_VALIDATOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "base/basictypes.h" | 12 #include "base/macros.h" |
| 11 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
| 12 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
| 13 | 15 |
| 14 namespace net { | 16 namespace net { |
| 15 | 17 |
| 16 class HttpStatusLineValidator { | 18 class HttpStatusLineValidator { |
| 17 public: | 19 public: |
| 18 // RFC 7230 S3.1.2: | 20 // RFC 7230 S3.1.2: |
| 19 // status-line = HTTP-version SP status-code SP reason-phrase CRLF | 21 // status-line = HTTP-version SP status-code SP reason-phrase CRLF |
| 20 // status-code = 3DIGIT | 22 // status-code = 3DIGIT |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 static StatusLineStatus CheckReasonPhraseSyntax( | 79 static StatusLineStatus CheckReasonPhraseSyntax( |
| 78 const std::vector<base::StringPiece>& fields, | 80 const std::vector<base::StringPiece>& fields, |
| 79 size_t start_index); | 81 size_t start_index); |
| 80 | 82 |
| 81 DISALLOW_IMPLICIT_CONSTRUCTORS(HttpStatusLineValidator); | 83 DISALLOW_IMPLICIT_CONSTRUCTORS(HttpStatusLineValidator); |
| 82 }; | 84 }; |
| 83 | 85 |
| 84 } // namespace net | 86 } // namespace net |
| 85 | 87 |
| 86 #endif // NET_HTTP_HTTP_STATUS_LINE_VALIDATOR_H_ | 88 #endif // NET_HTTP_HTTP_STATUS_LINE_VALIDATOR_H_ |
| OLD | NEW |