src/server/daemon/error.c

changeset 70
4e6e812c1d97
parent 47
ce9790523346
child 92
382bff43c6eb
equal deleted inserted replaced
69:4a10bc0ee80d 70:4e6e812c1d97
91 break; 91 break;
92 } 92 }
93 } 93 }
94 94
95 char buf[512]; 95 char buf[512];
96 int len = snprintf(buf, 512, "HTTP/1.1 %d %s\r\nServer: webserver\r\nContent-type: text/html\r\nContent-length: %d\r\n\r\n", status, statusmsg, msg.length); 96 int len = snprintf(buf, 512, "HTTP/1.1 %d %s\r\nServer: webserver\r\nContent-type: text/html\r\nContent-length: %zd\r\n\r\n", status, statusmsg, msg.length);
97 97
98 // set socket blocking 98 // set socket blocking
99 int flags; 99 int flags;
100 if (-1 == (flags = fcntl(req->connection->fd, F_GETFL, 0))) { 100 if (-1 == (flags = fcntl(req->connection->fd, F_GETFL, 0))) {
101 flags = 0; 101 flags = 0;

mercurial