1
#pragma once
2

            
3
#include <string>
4

            
5
#include "source/common/singleton/const_singleton.h"
6

            
7
namespace Envoy {
8
namespace Http {
9

            
10
struct UhvResponseCodeDetailValues {
11
  const std::string InvalidNameCharacters = "uhv.invalid_name_characters";
12
  const std::string InvalidValueCharacters = "uhv.invalid_value_characters";
13
  const std::string InvalidUrl = "uhv.invalid_url";
14
  const std::string InvalidHost = "uhv.invalid_host";
15
  const std::string InvalidScheme = "uhv.invalid_scheme";
16
  const std::string InvalidMethod = "uhv.invalid_method";
17
  const std::string InvalidContentLength = "uhv.invalid_content_length";
18
  const std::string InvalidUnderscore = "uhv.unexpected_underscore";
19
  const std::string InvalidStatus = "uhv.invalid_status";
20
  const std::string EmptyHeaderName = "uhv.empty_header_name";
21
  const std::string InvalidPseudoHeader = "uhv.invalid_pseudo_header";
22
  const std::string InvalidHostDeprecatedUserInfo = "uhv.invalid_host_deprecated_user_info";
23
  const std::string FragmentInUrlPath = "uhv.fragment_in_url_path";
24
  const std::string EscapedSlashesInPath = "uhv.escaped_slashes_in_url_path";
25
  const std::string Percent00InPath = "uhv.percent_00_in_url_path";
26
};
27

            
28
using UhvResponseCodeDetail = ConstSingleton<UhvResponseCodeDetailValues>;
29

            
30
struct Http1ResponseCodeDetailValues {
31
  const std::string InvalidTransferEncoding = "http1.invalid_transfer_encoding";
32
  const std::string TransferEncodingNotAllowed = "uhv.http1.transfer_encoding_not_allowed";
33
  const std::string ContentLengthNotAllowed = "uhv.http1.content_length_not_allowed";
34
  const std::string ChunkedContentLength = "http1.content_length_and_chunked_not_allowed";
35
};
36

            
37
using Http1ResponseCodeDetail = ConstSingleton<Http1ResponseCodeDetailValues>;
38

            
39
struct PathNormalizerResponseCodeDetailValues {
40
  const std::string RedirectNormalized = "uhv.path_normalization_redirect";
41
};
42

            
43
using PathNormalizerResponseCodeDetail = ConstSingleton<PathNormalizerResponseCodeDetailValues>;
44

            
45
} // namespace Http
46
} // namespace Envoy