There is no guaranty that we receive Content-type right before Content-length, such sequences might vary from server to server so the function(s) parse_resp_hdrs and parse_hdr_content in parser.c not seems to implemented properly.
There is also problem with get_next_line because double CRLF not always mean end of text, It could be seen also in the middle of response text and in this case code wont work.
There is no guaranty that we receive Content-type right before Content-length, such sequences might vary from server to server so the function(s) parse_resp_hdrs and parse_hdr_content in parser.c not seems to implemented properly.
There is also problem with get_next_line because double CRLF not always mean end of text, It could be seen also in the middle of response text and in this case code wont work.