From bb9c6e8afeba1ce712921357ad0a4745553ef6c8 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Mon, 10 Sep 2018 18:12:41 -0400 Subject: [PATCH] Rename get_file_from_url to get_file_from_Uri --- server/request_handling.c | 2 +- server/request_handling.h | 2 +- server/socket_server.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/request_handling.c b/server/request_handling.c index 413e7ec..9c1d3ef 100644 --- a/server/request_handling.c +++ b/server/request_handling.c @@ -106,7 +106,7 @@ void free_request_line_items(struct request_line *parsed_line) { * * @return -1 For an I/O error, 0 if successful. */ -int get_file_from_url(const char *uri, struct requested_file *req_file) { +int get_file_from_uri(const char *uri, struct requested_file *req_file) { // If our uri starts with a slash, we can ignore it. if (*uri == '/') { uri++; diff --git a/server/request_handling.h b/server/request_handling.h index 3d214c9..b2d5cb6 100644 --- a/server/request_handling.h +++ b/server/request_handling.h @@ -16,6 +16,6 @@ struct requested_file { int parse_request_line(const char *line, struct request_line *parsed_line); void free_request_line_items(struct request_line *parsed_line); -int get_file_from_url(const char *uri, struct requested_file *req_file); +int get_file_from_uri(const char *uri, struct requested_file *req_file); #endif diff --git a/server/socket_server.c b/server/socket_server.c index 764b03d..5a016a1 100644 --- a/server/socket_server.c +++ b/server/socket_server.c @@ -246,7 +246,7 @@ enum socket_result serve_one_request(int sock_fd) { } // Attempt to read the file and return it. struct requested_file file = {}; - int file_result = get_file_from_url(parsed_request_line.uri, &file); + int file_result = get_file_from_uri(parsed_request_line.uri, &file); if (file_result == -1) { int send_result = 0; if (errno == ENOENT) {