Skip to content
Snippets Groups Projects
Select Git revision
  • 70ae4e90fd417302b0f446c30e8ca3bd9755d627
  • master default protected
2 results

http-server.c

Blame
  • get.h 528 B
    /* Include guards */
    #ifndef GET_H_INCLUDED
    #define GET_H_INCLUDED
    
    /* Libraries used */
    #include "server.h"
    
    
    /* Prototypes for the functions */
    void parse_request_and_send_response(char* root, char* buffer, int newsockfd);
    int file_found(char* path_to_file);
    void respond_OK_and_send_file(char* full_path, int newsockfd);
    void respond_NOTFOUND(int newsockfd);
    void get_mime_type(char* path, char* mime);
    void make_response_header(char* response, char* full_path, size_t size);
    size_t get_size(int fd);
    
    #endif