diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-24 05:48:37 +0200 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-24 05:48:37 +0200 |
| commit | 185bee5366b26db3788d1486bb15e9b46f344771 (patch) | |
| tree | 8e89cf0cf75889faa2e4f9c7b4416de49ff12fca /scan_urlencoded_query.h | |
| parent | 040c7eab81f8b1526841d3c8ce56e4912cae10f1 (diff) | |
Add a url escaper next to the scanner
Diffstat (limited to 'scan_urlencoded_query.h')
| -rw-r--r-- | scan_urlencoded_query.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scan_urlencoded_query.h b/scan_urlencoded_query.h index 74246e7..6f12c03 100644 --- a/scan_urlencoded_query.h +++ b/scan_urlencoded_query.h | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | #ifndef SCAN_URLENCODED_QUERY_H__ | 6 | #ifndef SCAN_URLENCODED_QUERY_H__ |
| 7 | #define SCAN_URLENCODED_QUERY_H__ | 7 | #define SCAN_URLENCODED_QUERY_H__ |
| 8 | 8 | ||
| 9 | #include <stddef.h> | ||
| 10 | #include <stdint.h> | ||
| 9 | #include <sys/types.h> | 11 | #include <sys/types.h> |
| 10 | 12 | ||
| 11 | typedef struct { | 13 | typedef struct { |
| @@ -52,4 +54,10 @@ void scan_urlencoded_skipvalue(char **string); | |||
| 52 | */ | 54 | */ |
| 53 | ssize_t scan_fixed_int(char *data, size_t len, int *number); | 55 | ssize_t scan_fixed_int(char *data, size_t len, int *number); |
| 54 | 56 | ||
| 57 | /* The other direction: percent encode len bytes from src into dest and return | ||
| 58 | how many characters were written, or how many would be needed when dest is | ||
| 59 | NULL. dest needs room for three times len. | ||
| 60 | */ | ||
| 61 | size_t fmt_urlencoded(char *dest, const uint8_t *src, size_t len); | ||
| 62 | |||
| 55 | #endif | 63 | #endif |
