Skip to content

Commit

Permalink
Remove some unused functions in NO_FILES build
Browse files Browse the repository at this point in the history
  • Loading branch information
bel2125 committed Aug 6, 2015
1 parent 2c5025f commit 6194402
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/civetweb.c
Original file line number Diff line number Diff line change
Expand Up @@ -4767,6 +4767,8 @@ static void send_authorization_request(struct mg_connection *conn)
}
}


#if !defined(NO_FILES)
static int is_authorized_for_put(struct mg_connection *conn)
{
if (conn) {
Expand All @@ -4783,6 +4785,8 @@ static int is_authorized_for_put(struct mg_connection *conn)
}
return 0;
}
#endif


int mg_modify_passwords_file(const char *fname,
const char *domain,
Expand Down Expand Up @@ -8425,12 +8429,14 @@ static void handle_request(struct mg_connection *conn)
return;
}

#if !defined(NO_FILES)
/* 6.1.2. Check if put authorization for static files is available.
*/
if (!is_authorized_for_put(conn)) {
send_authorization_request(conn);
return;
}
#endif

} else {
/* 6.2. This is either a OPTIONS, GET, HEAD or POST request,
Expand Down

0 comments on commit 6194402

Please sign in to comment.