Ignore:
File:
1 edited

Legend:

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

    re95a117 rc82af9f  
    2525};
    2626
    27 _Static_assert( KNOWN_CODES == (sizeof(http_msgs ) / sizeof(http_msgs [0])));
    28 
    29 const int http_codes[] = {
    30         200,
    31         400,
    32         404,
    33         413,
    34         414,
    35 };
    36 
    37 _Static_assert( KNOWN_CODES == (sizeof(http_codes) / sizeof(http_codes[0])));
    38 
    39 int code_val(HttpCode code) {
    40         return http_codes[code];
    41 }
     27_Static_assert( KNOWN_CODES == (sizeof(http_msgs) / sizeof(http_msgs[0])));
    4228
    4329static inline int answer( int fd, const char * it, int len) {
     
    7561        for() {
    7662                int ret = cfa_read(fd, it, count);
    77                 if(ret == 0 ) return [OK200, true, 0p, 0];
    7863                if(ret < 0 ) {
     64                        if( errno ) return [OK200, true, 0p, 0];
    7965                        if( errno == EAGAIN || errno == EWOULDBLOCK) continue READ;
    8066                        abort( "read error: (%d) %s\n", (int)errno, strerror(errno) );
Note: See TracChangeset for help on using the changeset viewer.