283 if(rq->status_num == -1) { |
283 if(rq->status_num == -1) { |
284 protocol_status(sn, rq, 200, "OK"); |
284 protocol_status(sn, rq, 200, "OK"); |
285 } |
285 } |
286 |
286 |
287 // set socket blocking |
287 // set socket blocking |
288 int flags; |
288 //int flags; |
289 flags = fcntl(fd, F_GETFL, 0); |
289 //flags = fcntl(fd, F_GETFL, 0); |
290 fcntl(fd, F_SETFL, flags ^ O_NONBLOCK); |
290 //fcntl(fd, F_SETFL, flags ^ O_NONBLOCK); |
291 |
291 |
292 // output buffer |
292 // output buffer |
293 sbuf_t *out = sbuf_new(512); |
293 sbuf_t *out = sbuf_new(512); |
294 |
294 |
295 // add the http status line to the output buffer |
295 // add the http status line to the output buffer |