commit 91b9f2a8f9d39f2fb842c33049d966777027e5f4 from: Omar Polo date: Sat May 15 10:07:21 2021 UTC const-ify strip_path commit - 571d20fbb3653391fb9baf932c502f8b9ffe7d27 commit + 91b9f2a8f9d39f2fb842c33049d966777027e5f4 blob - 8216113a331950fde1a4330f407cdf48a0fc47d8 blob + b7a71f482439a267da4816463956e7120d387000 --- server.c +++ server.c @@ -44,7 +44,7 @@ static int check_path(struct client*, const char*, in static void open_file(struct client*); static void check_for_cgi(struct client*); static void handle_handshake(int, short, void*); -static char *strip_path(char*, int); +static const char *strip_path(const char*, int); static void fmt_sbuf(const char*, struct client*, const char*); static int apply_block_return(struct client*); static int apply_require_ca(struct client*); @@ -494,8 +494,8 @@ err: start_reply(c, BAD_REQUEST, "Wrong/malformed host or missing SNI"); } -static char * -strip_path(char *path, int strip) +static const char * +strip_path(const char *path, int strip) { char *t;