mendsley / tinyhttp

Minimal HTTP processing library
Other
149 stars 45 forks source link

HEAD command seems to not be supported #9

Open fdur opened 6 years ago

fdur commented 6 years ago

When a HEAD command is sent, the process is not fully made. In http.c file, in http_dataAPI, seems that after

--size; 
++data;

the following code needs to be added:

            if (!size)
            {
                // Case of HEAD (no body content)
                *read = 0;
                return 0;
            }