parent
1873edb5ed
commit
f096369b5b
|
@ -23,4 +23,12 @@ struct uh_str {
|
||||||
size_t len;
|
size_t len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Return 1 for equal */
|
||||||
|
static inline int uh_str_cmp(struct uh_str *uv, const char *str)
|
||||||
|
{
|
||||||
|
if (uv->len != strlen(str))
|
||||||
|
return 0;
|
||||||
|
return (!strncasecmp(uv->at, str, uv->len));
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
10
src/uhttp.c
10
src/uhttp.c
|
@ -182,16 +182,6 @@ static int on_body(http_parser *parser, const char *at, size_t len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Return 1 for equal */
|
|
||||||
static int uh_str_cmp(struct uh_str *uv, const char *str)
|
|
||||||
{
|
|
||||||
if (uv->len != strlen(str))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return (!strncasecmp(uv->at, str, uv->len));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int on_message_complete(http_parser *parser)
|
static int on_message_complete(http_parser *parser)
|
||||||
{
|
{
|
||||||
struct uh_connection *con = container_of(parser, struct uh_connection, parser);
|
struct uh_connection *con = container_of(parser, struct uh_connection, parser);
|
||||||
|
|
Loading…
Reference in New Issue