diff options
author | Omar Polo <op@omarpolo.com> | 2023-08-08 15:56:27 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-08-08 15:56:27 +0000 |
commit | d98ef734940a49d192d87024e60559b38eb190c9 (patch) | |
tree | 9fd986bdf4000c35d8c51d0d5ce557162222acf9 /server.c | |
parent | 877b479bcc183e71a6d78cb938548c21ed4303fc (diff) |
move strip_path to utils.c
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -53,7 +53,6 @@ void tls_config_use_fake_private_key(struct tls_config *); static inline int matches(const char*, const char*); static void handle_handshake(int, short, void*); -static const char *strip_path(const char*, int); static void fmtbuf(char *, size_t, const char *, struct client *, const char *); static int apply_block_return(struct client*); @@ -432,23 +431,6 @@ err: start_reply(c, BAD_REQUEST, "Wrong/malformed host or missing SNI"); } -static const char * -strip_path(const char *path, int strip) -{ - char *t; - - while (strip > 0) { - if ((t = strchr(path, '/')) == NULL) { - path = strchr(path, '\0'); - break; - } - path = t; - strip--; - } - - return path; -} - static void fmtbuf(char *buf, size_t buflen, const char *fmt, struct client *c, const char *path) |