84 return fd; |
84 return fd; |
85 } |
85 } |
86 |
86 |
87 // add content-length header |
87 // add content-length header |
88 char contentLength[32]; |
88 char contentLength[32]; |
89 int len = snprintf(contentLength, 32, "%lld", s->st_size); |
89 int len = snprintf(contentLength, 32, "%jd", s->st_size); |
90 |
90 |
91 pblock_kvinsert(pb_key_content_length, contentLength, len, rq->srvhdrs); |
91 pblock_kvinsert(pb_key_content_length, contentLength, len, rq->srvhdrs); |
92 |
92 |
93 // start response |
93 // start response |
94 protocol_status(sn, rq, 200, NULL); |
94 protocol_status(sn, rq, 200, NULL); |