Changeset 1092

Show
Ignore:
Timestamp:
09/15/07 22:26:42 (1 year ago)
Author:
ahu
Message:

fix reloading of backends on TCP timeout, plus deal better with malformed web requests thanks Maikel Verheijen

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/pdns/pdns/tcpreceiver.cc

    r1032 r1092  
    8888        ret=waitForData(fd, 5); 
    8989        if(ret < 0) 
    90           throw AhuException("Waiting for data read"); 
     90          throw runtime_error("Waiting for data read"); 
    9191        if(!ret) 
    92           throw AhuException("Timeout reading data"); 
     92          throw runtime_error("Timeout reading data"); 
    9393        continue; 
    9494      } 
     
    121121        ret=waitForRWData(fd, false, 5, 0); 
    122122        if(ret < 0) 
    123           throw AhuException("Waiting for data write"); 
     123          throw runtime_error("Waiting for data write"); 
    124124        if(!ret) 
    125           throw AhuException("Timeout writing data"); 
     125          throw runtime_error("Timeout writing data"); 
    126126        continue; 
    127127      } 
  • trunk/pdns/pdns/webserver.cc

    r1049 r1092  
    5656    client->getLine(line); 
    5757    stripLine(line); 
     58    if(line.empty()) 
     59      throw Exception("Invalid web request"); 
    5860    //    L<<"page: "<<line<<endl; 
    5961