mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Comments in function skip_quoted
This commit is contained in:
@@ -1825,19 +1825,19 @@ skip_quoted(char **buf,
|
|||||||
if (end_word > begin_word) {
|
if (end_word > begin_word) {
|
||||||
p = end_word - 1;
|
p = end_word - 1;
|
||||||
while (*p == quotechar) {
|
while (*p == quotechar) {
|
||||||
/* TODO (bel, low): it seems this code is never reached, so
|
/* While the delimiter is quoted, look for the next delimiter. */
|
||||||
* quotechar is actually not needed - check if this code may be
|
/* This happens, e.g., in calls from parse_auth_header,
|
||||||
* droped */
|
* if the user name contains a " character. */
|
||||||
|
|
||||||
/* If there is anything beyond end_word, copy it */
|
/* If there is anything beyond end_word, copy it. */
|
||||||
if (*end_word == '\0') {
|
if (*end_word != '\0') {
|
||||||
*p = '\0';
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
size_t end_off = strcspn(end_word + 1, delimiters);
|
size_t end_off = strcspn(end_word + 1, delimiters);
|
||||||
memmove(p, end_word, end_off + 1);
|
memmove(p, end_word, end_off + 1);
|
||||||
p += end_off; /* p must correspond to end_word - 1 */
|
p += end_off; /* p must correspond to end_word - 1 */
|
||||||
end_word += end_off + 1;
|
end_word += end_off + 1;
|
||||||
|
} else {
|
||||||
|
*p = '\0';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (p++; p < end_word; p++) {
|
for (p++; p < end_word; p++) {
|
||||||
@@ -6172,6 +6172,7 @@ is_valid_http_method(const char *method)
|
|||||||
|
|
||||||
|| !strcmp(method, "PROPFIND") /* WEBDAV (RFC 2518) */
|
|| !strcmp(method, "PROPFIND") /* WEBDAV (RFC 2518) */
|
||||||
|| !strcmp(method, "MKCOL") /* WEBDAV (RFC 2518) */
|
|| !strcmp(method, "MKCOL") /* WEBDAV (RFC 2518) */
|
||||||
|
|
||||||
/* Unsupported WEBDAV Methods: */
|
/* Unsupported WEBDAV Methods: */
|
||||||
/* PROPPATCH, COPY, MOVE, LOCK, UNLOCK (RFC 2518) */
|
/* PROPPATCH, COPY, MOVE, LOCK, UNLOCK (RFC 2518) */
|
||||||
/* + 11 methods from RFC 3253 */
|
/* + 11 methods from RFC 3253 */
|
||||||
|
|||||||
Reference in New Issue
Block a user