Changeset 64 in Main for trunk/Server/http.c


Ignore:
Timestamp:
Sep 19, 2024, 5:58:17 AM (2 months ago)
Author:
Nishi
Message:

fix stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/http.c

    r46 r64  
    3333        if(req->body != NULL) free(req->body);
    3434        if(req->version != NULL) free(req->version);
     35
     36        req->method = NULL;
     37        req->path = NULL;
     38        req->query = NULL;
     39        req->headers = NULL;
     40        req->body = NULL;
     41        req->version = NULL;
    3542}
    3643
     
    7683#endif
    7784                int len = tw_read(ssl, sock, buffer, 512);
    78                 if(len <= 0) break;
     85                if(len <= 0){
     86                        bad = true;
     87                        break;
     88                }
    7989                int i;
    8090                for(i = 0; i < len; i++) {
Note: See TracChangeset for help on using the changeset viewer.