update vendored code & attribute it correctly (#1382)
Motivation: This updates all vendored code and also lets github know what's vendored code through `.gitattributes`. Modifications: - http_parser update - attribution Result: - better github stats - up to date software
This commit is contained in:
parent
a678727747
commit
d1ef9be53c
|
@ -0,0 +1,3 @@
|
||||||
|
Sources/CNIOHTTPParser/* linguist-vendored
|
||||||
|
Sources/CNIOSHA1/* linguist-vendored
|
||||||
|
Sources/CNIOLinux/ifaddrs-* linguist-vendored
|
|
@ -1260,9 +1260,9 @@ reexecute:
|
||||||
|
|
||||||
switch (parser->header_state) {
|
switch (parser->header_state) {
|
||||||
case h_general: {
|
case h_general: {
|
||||||
size_t limit = data + len - p;
|
size_t left = data + len - p;
|
||||||
limit = MIN(limit, max_header_size);
|
const char* pe = p + MIN(left, max_header_size);
|
||||||
while (p+1 < data + limit && TOKEN(p[1])) {
|
while (p+1 < pe && TOKEN(p[1])) {
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1499,28 +1499,25 @@ reexecute:
|
||||||
|
|
||||||
switch (h_state) {
|
switch (h_state) {
|
||||||
case h_general:
|
case h_general:
|
||||||
{
|
{
|
||||||
const char* p_cr;
|
size_t left = data + len - p;
|
||||||
const char* p_lf;
|
const char* pe = p + MIN(left, max_header_size);
|
||||||
size_t limit = data + len - p;
|
|
||||||
|
|
||||||
limit = MIN(limit, max_header_size);
|
for (; p != pe; p++) {
|
||||||
|
ch = *p;
|
||||||
p_cr = (const char*) memchr(p, CR, limit);
|
if (ch == CR || ch == LF) {
|
||||||
p_lf = (const char*) memchr(p, LF, limit);
|
--p;
|
||||||
if (p_cr != NULL) {
|
break;
|
||||||
if (p_lf != NULL && p_cr >= p_lf)
|
}
|
||||||
p = p_lf;
|
if (!lenient && !IS_HEADER_CHAR(ch)) {
|
||||||
else
|
SET_ERRNO(HPE_INVALID_HEADER_TOKEN);
|
||||||
p = p_cr;
|
goto error;
|
||||||
} else if (UNLIKELY(p_lf != NULL)) {
|
}
|
||||||
p = p_lf;
|
}
|
||||||
} else {
|
if (p == data + len)
|
||||||
p = data + len;
|
--p;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
--p;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case h_connection:
|
case h_connection:
|
||||||
case h_transfer_encoding:
|
case h_transfer_encoding:
|
||||||
|
|
|
@ -30,7 +30,7 @@ extern "C" {
|
||||||
/* Also update SONAME in the Makefile whenever you change these. */
|
/* Also update SONAME in the Makefile whenever you change these. */
|
||||||
#define HTTP_PARSER_VERSION_MAJOR 2
|
#define HTTP_PARSER_VERSION_MAJOR 2
|
||||||
#define HTTP_PARSER_VERSION_MINOR 9
|
#define HTTP_PARSER_VERSION_MINOR 9
|
||||||
#define HTTP_PARSER_VERSION_PATCH 0
|
#define HTTP_PARSER_VERSION_PATCH 2
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#if defined(_WIN32) && !defined(__MINGW32__) && \
|
#if defined(_WIN32) && !defined(__MINGW32__) && \
|
||||||
|
|
Loading…
Reference in New Issue