|
|
| version 1.82, 2019/11/24 23:46:22 | version 1.83, 2020/09/30 20:01:08 |
|---|---|
| Line 129 public: | Line 129 public: |
| return true; | return true; |
| } | } |
| size_t status_size(){ | size_t first_line(){ |
| char *headers=strchr(buf, '\n'); | char *headers=strchr(buf, '\n'); |
| if(!headers) | if(!headers) |
| return false; | return false; |
| Line 207 static int http_read_response(HTTP_respo | Line 207 static int http_read_response(HTTP_respo |
| while(response.read(sock, chunk_size)){ | while(response.read(sock, chunk_size)){ |
| switch(state){ | switch(state){ |
| case HTTP_STATUS_CODE: { | case HTTP_STATUS_CODE: { |
| size_t status_size=response.status_size(); | size_t status_size=response.first_line(); |
| if(!status_size) | if(!status_size) |
| break; | break; |