Rename get_file_from_url to get_file_from_Uri

master
Nick Krichevsky 2018-09-10 18:12:41 -04:00
parent cda1b1ae29
commit bb9c6e8afe
3 changed files with 3 additions and 3 deletions

View File

@ -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++;

View File

@ -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

View File

@ -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) {