src: Remove lookup_token(const std::string&)
This commit is contained in:
parent
f74d7ea119
commit
00b2d7d513
|
@ -574,11 +574,6 @@ int parse_http_status_code(const StringRef &src) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lookup_token(const std::string &name) {
|
|
||||||
return lookup_token(reinterpret_cast<const uint8_t *>(name.c_str()),
|
|
||||||
name.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
int lookup_token(const StringRef &name) {
|
int lookup_token(const StringRef &name) {
|
||||||
return lookup_token(name.byte(), name.size());
|
return lookup_token(name.byte(), name.size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,7 +302,6 @@ using HeaderIndex = std::array<int16_t, HD_MAXIDX>;
|
||||||
// Only headers we are interested in are tokenized. If header name
|
// Only headers we are interested in are tokenized. If header name
|
||||||
// cannot be tokenized, returns -1.
|
// cannot be tokenized, returns -1.
|
||||||
int lookup_token(const uint8_t *name, size_t namelen);
|
int lookup_token(const uint8_t *name, size_t namelen);
|
||||||
int lookup_token(const std::string &name);
|
|
||||||
int lookup_token(const StringRef &name);
|
int lookup_token(const StringRef &name);
|
||||||
|
|
||||||
// Initializes |hdidx|, header index. The |hdidx| must point to the
|
// Initializes |hdidx|, header index. The |hdidx| must point to the
|
||||||
|
|
|
@ -271,10 +271,12 @@ void test_http2_index_header(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_http2_lookup_token(void) {
|
void test_http2_lookup_token(void) {
|
||||||
CU_ASSERT(http2::HD__AUTHORITY == http2::lookup_token(":authority"));
|
CU_ASSERT(http2::HD__AUTHORITY ==
|
||||||
CU_ASSERT(-1 == http2::lookup_token(":authorit"));
|
http2::lookup_token(StringRef::from_lit(":authority")));
|
||||||
CU_ASSERT(-1 == http2::lookup_token(":Authority"));
|
CU_ASSERT(-1 == http2::lookup_token(StringRef::from_lit(":authorit")));
|
||||||
CU_ASSERT(http2::HD_EXPECT == http2::lookup_token("expect"));
|
CU_ASSERT(-1 == http2::lookup_token(StringRef::from_lit(":Authority")));
|
||||||
|
CU_ASSERT(http2::HD_EXPECT ==
|
||||||
|
http2::lookup_token(StringRef::from_lit("expect")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void test_http2_parse_link_header(void) {
|
void test_http2_parse_link_header(void) {
|
||||||
|
|
Loading…
Reference in New Issue