83 vfs_close(fd); |
83 vfs_close(fd); |
84 return NULL; |
84 return NULL; |
85 } |
85 } |
86 |
86 |
87 // sets last-modified, content-length and checks conditions |
87 // sets last-modified, content-length and checks conditions |
88 if(http_set_finfo(sn, rq, s) != REQ_PROCEED) { |
88 const char *etag = vfs_getetag(fd); // optionally, get etag from file |
|
89 if(http_set_finfo_etag(sn, rq, s, etag) != REQ_PROCEED) { |
89 vfs_close(fd); |
90 vfs_close(fd); |
90 return NULL; |
91 return NULL; |
91 } |
92 } |
92 |
93 |
93 // TODO: check if vfs can seek |
94 // TODO: check if vfs can seek |