backup
This commit is contained in:
parent
9d94c4d4e2
commit
2255bfc2e2
1 changed files with 3 additions and 3 deletions
|
|
@ -117,15 +117,15 @@ struct http_request *parse_request(struct string *req)
|
|||
// TODO handle logs and free adequately
|
||||
struct http_response *generate_response(struct http_request *req)
|
||||
{
|
||||
// Path
|
||||
|
||||
// Check filename
|
||||
if (!check_filename(req->path))
|
||||
return NULL;
|
||||
|
||||
int err = is_directory(req->path->data);
|
||||
if (err == -1)
|
||||
return NULL;
|
||||
|
||||
if (err == 1)
|
||||
else if (err == 1)
|
||||
{
|
||||
string_concat_str(req->path, "/", 1);
|
||||
string_concat_str(req->path, config->servers->default_file,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue