Willy Tarreau
c514365317
MINOR: channel: add new function co_getdelim() to support multiple delimiters
...
For now we have co_getline() which reads a buffer and stops on LF, and
co_getword() which reads a buffer and stops on one arbitrary delimiter.
But sometimes we'd need to stop on a set of delimiters (CR and LF, etc).
This patch adds a new function co_getdelim() which takes a set of delimiters
as a string, and constructs a small map (32 bytes) that's looked up during
parsing to stop after the first delimiter found within the set. It also
supports an optional escape character that skips a delimiter (typically a
backslash). For the rest it works exactly like the two other variants.
2022-01-19 19:16:47 +01:00
..
2021-10-18 07:21:28 +02:00
2021-11-05 07:48:38 +01:00
2021-10-22 16:40:09 +02:00
2021-04-28 10:51:08 +02:00
2021-09-30 16:37:05 +02:00
2021-05-08 12:29:51 +02:00
2021-12-06 09:11:47 +01:00
2021-08-25 16:14:14 +02:00
2021-11-23 16:15:02 +01:00
2021-09-23 15:27:25 +02:00
2021-10-13 11:28:08 +02:00
2021-04-26 10:42:58 +02:00
2021-09-27 09:47:40 +02:00
2021-10-15 14:12:19 +02:00
2022-01-12 11:08:48 +01:00
2021-12-29 14:42:16 +01:00
2021-12-15 11:05:51 +01:00
2022-01-19 19:16:47 +01:00
2021-10-20 18:43:30 +02:00
2021-04-10 19:27:41 +02:00
2022-01-19 19:16:47 +01:00
2021-10-08 17:22:26 +02:00
2021-10-08 17:22:26 +02:00
2021-11-06 09:20:07 +01:00
2021-10-15 17:16:11 +02:00
2021-12-28 16:59:00 +01:00
2021-04-07 18:18:37 +02:00
2021-10-27 11:35:59 +02:00
2021-10-08 17:22:26 +02:00
2021-08-16 12:37:59 +02:00
2021-09-17 17:22:05 +02:00
2021-10-08 17:22:26 +02:00
2021-11-30 09:34:32 +01:00
2021-10-08 17:22:26 +02:00
2021-10-08 17:22:26 +02:00
2021-10-08 17:22:26 +02:00
2021-10-15 14:12:19 +02:00
2021-08-16 12:37:59 +02:00
2021-10-08 17:22:26 +02:00
2021-10-15 14:12:19 +02:00
2021-08-16 12:37:59 +02:00
2021-11-05 16:36:42 +01:00
2021-10-08 17:22:26 +02:00
2021-11-08 12:08:26 +01:00
2021-10-07 01:41:14 +02:00
2021-10-27 11:34:21 +02:00
2021-09-23 16:13:17 +02:00
2021-12-02 09:46:29 +01:00
2021-11-08 08:05:39 +01:00
2021-12-08 15:52:59 +01:00
2022-01-11 15:09:49 +01:00
2021-11-24 16:14:24 +01:00
2022-01-14 20:51:31 +01:00
2021-04-02 17:48:42 +02:00
2021-04-10 19:27:41 +02:00
2022-01-03 14:40:58 +01:00
2021-12-07 19:04:33 +01:00
2022-01-04 10:56:04 +01:00
2022-01-14 20:46:21 +01:00
2021-08-30 06:14:32 +02:00
2021-11-08 12:08:26 +01:00
2021-11-08 12:08:26 +01:00
2021-10-15 14:12:19 +02:00
2021-09-28 16:21:25 +02:00
2022-01-13 09:34:22 +01:00
2021-04-21 09:20:17 +02:00
2021-11-03 17:19:48 +01:00
2021-06-22 18:43:14 +02:00
2021-06-22 18:43:14 +02:00
2021-09-22 07:24:02 +02:00
2021-08-16 12:37:59 +02:00
2021-06-22 18:43:14 +02:00
2021-10-16 14:58:30 +02:00
2021-12-01 15:21:56 +01:00
2021-04-21 09:20:17 +02:00
2021-10-01 18:36:29 +02:00
2021-05-25 08:44:45 +02:00
2021-04-15 17:05:38 +02:00
2021-11-05 07:48:38 +01:00
2021-11-08 12:08:26 +01:00
2022-01-12 17:31:01 +01:00
2022-01-12 17:31:01 +01:00
2021-09-23 16:25:47 +02:00
2022-01-12 18:08:29 +01:00
2021-11-10 15:53:01 +01:00
2021-11-10 15:53:01 +01:00
2021-09-11 19:58:45 +02:00
2021-05-08 13:55:40 +02:00
2021-12-24 13:48:39 +01:00
2021-04-07 18:18:37 +02:00
2022-01-02 19:35:26 +01:00
2021-11-05 15:20:04 +01:00
2021-10-27 17:05:36 +02:00
2021-12-06 09:11:47 +01:00
2021-10-27 17:05:36 +02:00
2021-10-27 17:05:36 +02:00
2021-12-06 09:11:47 +01:00
2021-10-27 17:31:20 +02:00
2022-01-06 09:09:51 +01:00
2021-12-17 08:38:43 +01:00
2021-11-08 08:59:30 +01:00
2021-09-23 15:27:25 +02:00
2021-12-24 11:50:01 +01:00
2022-01-04 17:30:00 +01:00
2022-01-04 17:30:00 +01:00
2021-11-19 15:55:19 +01:00
2022-01-12 11:08:48 +01:00
2021-10-07 01:41:14 +02:00
2021-12-02 10:05:04 +01:00
2021-04-21 09:20:17 +02:00
2021-12-03 09:03:55 +01:00
2021-10-15 14:12:19 +02:00
2022-01-18 12:05:17 +01:00
2021-10-27 11:34:21 +02:00
2021-11-19 19:25:13 +01:00
2021-04-21 09:20:17 +02:00
2021-10-27 11:35:59 +02:00
2021-12-06 09:14:20 +01:00
2021-10-14 21:27:48 +02:00
2021-10-14 21:27:48 +02:00
2021-11-24 19:00:39 +01:00
2021-11-23 15:20:59 +01:00
2021-05-17 10:50:24 +02:00
2022-01-10 16:31:22 +01:00
2022-01-10 16:31:22 +01:00
2021-08-26 19:48:34 +02:00
2021-11-09 10:51:08 +01:00
2021-11-15 09:17:27 +01:00
2021-12-06 09:11:47 +01:00
2021-12-06 09:11:47 +01:00
2021-10-21 16:17:29 +02:00
2021-10-27 11:35:59 +02:00
2021-10-15 14:12:19 +02:00
2021-10-27 11:35:59 +02:00
2021-11-08 12:08:26 +01:00
2021-10-08 17:22:26 +02:00
2021-10-08 17:22:26 +02:00
2022-01-03 14:43:51 +01:00
2021-12-21 15:53:19 +01:00
2021-05-11 17:24:32 +02:00
2022-01-03 14:40:58 +01:00
2021-10-08 17:22:26 +02:00
2022-01-12 18:08:29 +01:00