Optimize code

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2017-12-29 16:09:47 +08:00
parent 8a8680f92a
commit 70f5016e61
4 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ err:
return -1;
}
bool handle_action_request(struct uh_client *cl, char *path)
bool handle_action_request(struct uh_client *cl, const char *path)
{
struct uh_action *a;

View File

@ -34,7 +34,7 @@ struct uh_action {
int uh_add_action(struct uh_server *srv, const char *path, action_cb_t cb);
bool handle_action_request(struct uh_client *cl, char *url);
bool handle_action_request(struct uh_client *cl, const char *path);
void uh_action_free(struct uh_server *srv);

View File

@ -394,7 +394,7 @@ error:
cl->send_error(cl, 403, "Forbidden", "You don't have permission to access %s on this server.", path);
}
bool handle_file_request(struct uh_client *cl, char *path)
bool handle_file_request(struct uh_client *cl, const char *path)
{
struct path_info *pi;

View File

@ -34,6 +34,6 @@ struct mimetype {
const char *mime;
};
bool handle_file_request(struct uh_client *cl, char *url);
bool handle_file_request(struct uh_client *cl, const char *path);
#endif