remove unused function

This commit is contained in:
prx 2022-08-18 14:00:51 +02:00
parent 27549119ef
commit 63616a97fc
3 changed files with 0 additions and 18 deletions

2
main.c
View File

@ -59,8 +59,6 @@ main(int argc, char **argv)
split_request(request, hostname, path, query);
set_path(path, sizeof(path), virtualhost, hostname);
//get_query(path, query, sizeof(query));
/* percent decode */
uridecode(query);
uridecode(path);

15
vger.c
View File

@ -452,21 +452,6 @@ split_dir_file(char *path, char *dir, size_t dirsiz, char *file, size_t filesiz)
}
}
char *
get_query(char *path, char *query, size_t querysiz)
{
char *pos = NULL;
/* remove a query string before percent decoding */
/* look for "?" if any to set query for cgi, remove it */
pos = strchr(path, '?');
if (pos != NULL) {
estrlcpy(query, pos + 1, querysiz);
pos[0] = '\0'; /* path end where query begins */
}
return query;
}
void
split_request(const char *request, char *hostname, char *path, char *query)
{

1
vger.h
View File

@ -47,7 +47,6 @@ ssize_t display_file(const char *);
int do_cgi(const char *, const char *, const char *, const char *, const char *);
void drop_privileges(const char *, const char *, const char *);
void split_dir_file(char *, char *, size_t, char *, size_t);
char * get_query(char *, char *, size_t);
char * set_path(char *, size_t, int, const char *);
void status(const int, const char *, ...);
void strip_trailing_slash(char *);