Definition in file miniws.c.
Go to the source code of this file.
Defines | |
#define | HEADER |
#define | CONTENT_TEXT "Content-Type: text/html\r\n\r\n" |
#define | CONTENT_JPEG "Content-Type: image/jpeg\r\n\r\n" |
#define | HTML_NOTFOUND |
#define | DEFAULT_DOC "index.html" |
#define | WEB_ROOT "/aup/webroot/" |
#define | PORT ":8000" |
Functions | |
void | send_header (SSI *ssip, const char *msg, off_t len, const char *path, int fd) |
bool | handle_request (SSI *ssip, char *s, int fd) |
int | main (void) |
|
Definition at line 34 of file miniws.c. Referenced by send_header(), and send_header_OK(). |
|
Definition at line 31 of file miniws.c. Referenced by send_header(), and send_header_OK(). |
|
Definition at line 64 of file miniws.c. Referenced by handle_request(). |
|
Value: "HTTP/1.0 %s\r\n"\ "Server: AUP-ws\r\n"\ "Content-Length: %ld\r\n" Definition at line 26 of file miniws.c. Referenced by send_header(). |
|
Value: "<!DOCTYPE html PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"\ "<html><head><title>Error 404</title>\n"\ "</head><body>\n"\ "<h2>AUP-ws server can't find document</h2>"\ "</body></html>\r\n" Definition at line 37 of file miniws.c. Referenced by handle_request(), and send_header_notfound(). |
|
Definition at line 114 of file miniws.c. Referenced by main(). |
|
Definition at line 65 of file miniws.c. Referenced by handle_request(). |
|
Definition at line 67 of file miniws.c. References DEFAULT_DOC, EC_CLEANUP_BGN, EC_CLEANUP_END, ec_eof, EC_FLUSH, ec_neg1, HTML_NOTFOUND, send_header(), stat::st_mode, stat::st_size, stat(), WEB_ROOT, and writeall(). |
|
Definition at line 116 of file miniws.c. References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_false, ec_neg1, ec_null, exit(), gethostname(), handle_request(), PORT, read(), ssi_close(), ssi_close_fd(), ssi_open(), and ssi_wait_server(). |
|
Definition at line 44 of file miniws.c. References CONTENT_JPEG, CONTENT_TEXT, EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FLUSH, ec_neg1, HEADER, and writeall(). Referenced by handle_request(). |