summary refs log tree commit diff
path: root/bounce.h
diff options
context:
space:
mode:
Diffstat (limited to 'bounce.h')
-rw-r--r--bounce.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/bounce.h b/bounce.h
index 5aff027..1eb5ce9 100644
--- a/bounce.h
+++ b/bounce.h
@@ -102,19 +102,20 @@ static const char *CapNames[] = {
 #undef X
 };
 
-static inline enum Cap capParse(const char *list) {
+static inline enum Cap capParse(const char *list, const char *values[CapBits]) {
 	enum Cap caps = 0;
 	while (*list) {
 		enum Cap cap = CapUnsupported;
-		size_t len = strcspn(list, " ");
+		size_t len = strcspn(list, "= ");
 		for (size_t i = 0; i < ARRAY_LEN(CapNames); ++i) {
 			if (len != strlen(CapNames[i])) continue;
 			if (strncmp(list, CapNames[i], len)) continue;
 			cap = 1 << i;
+			if (list[len] == '=' && values) values[i] = &list[len + 1];
 			break;
 		}
 		caps |= cap;
-		list += len;
+		list += strcspn(list, " ");
 		if (*list) list++;
 	}
 	return caps;
31 -0400'>2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe