feat: dissociate timeouts and empty pastes
feuille was handling those two errors the same way, by sending `Timeout'd.' even if the client just sent an EOF.
This commit is contained in:
parent
6a20fa7e61
commit
24da772e56
2 changed files with 10 additions and 2 deletions
|
@ -354,9 +354,12 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
} else {
|
||||
if (errno == EFBIG)
|
||||
send_response(connection, "File too big.\n");
|
||||
send_response(connection, "Paste too big.\n");
|
||||
|
||||
if (errno == ENOENT)
|
||||
send_response(connection, "Empty paste.\n");
|
||||
|
||||
if (errno == EAGAIN)
|
||||
send_response(connection, "Timeout'd.\n");
|
||||
|
||||
error("error %d while reading paste from incoming connection.", errno);
|
||||
|
|
Reference in a new issue