fix netplay UPNP binding for specific router behavior (#13399)

* fix netplay UPNP binding for specific router behavior

* use ISSPACE macro
This commit is contained in:
Jamiras 2021-12-23 11:30:35 -07:00 committed by GitHub
parent c752f9b0de
commit e0ad9f7e26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -197,6 +197,7 @@ rxml_document_t *rxml_load_document_string(const char *str)
node->name = strdup(x.elem);
attr = NULL;
valptr = buf->val;
++level;
break;

View File

@ -919,11 +919,14 @@ bool net_http_update(struct http_t *state, size_t* progress, size_t* total)
}
else
{
if (string_starts_with_case_insensitive(state->data, "Content-Length: "))
if (string_starts_with_case_insensitive(state->data, "Content-Length:"))
{
char* ptr = state->data + STRLEN_CONST("Content-Length:");
while (ISSPACE(*ptr))
++ptr;
state->bodytype = T_LEN;
state->len = strtol(state->data +
STRLEN_CONST("Content-Length: "), NULL, 10);
state->len = strtol(ptr, NULL, 10);
}
if (string_is_equal_case_insensitive(state->data, "Transfer-Encoding: chunked"))
state->bodytype = T_CHUNK;