Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/protocol.cfa

    r644162a ra7026b4  
    332332        wait(this.f);
    333333
     334        // Did something crazy happen?
     335        if(this.f.result > this.len) {
     336                mutex(serr) serr | "SPLICE IN spliced too much!";
     337                return error(this.res, -ERANGE);
     338        }
     339
    334340        // Something failed?
    335341        if(this.f.result < 0) {
     
    345351                        return error(this.res, -ECONNRESET);
    346352                }
    347         }
    348 
    349         // Did something crazy happen?
    350         if(this.f.result > this.len) {
    351                 mutex(serr) serr | "SPLICE IN spliced too much!";
    352                 return error(this.res, -ERANGE);
    353353        }
    354354
     
    401401        wait(this.f);
    402402
     403        // Did something crazy happen?
     404        if(this.f.result > this.len) {
     405                mutex(serr) serr | "SPLICE OUT spliced too much!";
     406                return error(this.res, -ERANGE);
     407        }
     408
    403409        // Something failed?
    404410        if(this.f.result < 0) {
     
    414420                        return error(this, -ECONNRESET);
    415421                }
    416         }
    417 
    418         // Did something crazy happen?
    419         if(this.f.result > this.len) {
    420                 mutex(serr) serr | "SPLICE OUT spliced too much!" | this.f.result | ">" | this.len;
    421                 return error(this.res, -ERANGE);
    422422        }
    423423
     
    544544const char * original_http_msgs[] = {
    545545        "HTTP/1.1 200 OK\nServer: HttpForall\nDate: %s \nContent-Type: text/plain\nContent-Length: ",
    546         "HTTP/1.1 200 OK\r\nServer: HttpForall\r\nConnection: keep-alive\r\nContent-Length: 15\r\nContent-Type: text/html\r\nDate: %s \r\n\r\nHello, World!\r\n",
     546        "HTTP/1.1 200 OK\r\nServer: HttpForall\r\nDate\r\nConnection: keep-alive\r\nContent-Length: 15\r\nContent-Type: text/html: %s \r\n\r\nHello, World!\r\n",
    547547        "HTTP/1.1 400 Bad Request\nServer: HttpForall\nDate: %s \nContent-Type: text/plain\nContent-Length: 0 \n\n",
    548548        "HTTP/1.1 404 Not Found\nServer: HttpForall\nDate: %s \nContent-Type: text/plain\nContent-Length: 0 \n\n",
Note: See TracChangeset for help on using the changeset viewer.