-Tewi HTTPd version 1.08C
+Tewi HTTPd version 1.08D
Original by Nishi <nishi@nishi.boats>
char* mime = tw_get_mime(ext, vhost_entry);
if(ext != NULL) free(ext);
FILE* f = fopen(path, "rb");
- tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime, cmtime);
- fclose(f);
+ if(f == NULL) {
+ tw_http_error(s, sock, 403, name, port, vhost_entry);
+ } else {
+ tw_process_page(s, sock, tw_http_status(200), mime, f, NULL, st.st_size, st.st_mtime, cmtime);
+ fclose(f);
+ }
}
} else {
if(!rej) {
extern "C" {
#endif
-#define TW_VERSION "1.08C\0"
+#define TW_VERSION "1.08D\0"
const char* tw_get_version(void);
const char* tw_get_platform(void);