Definition in file ws.c.
Go to the source code of this file.
Defines | |
#define | WEB_ROOT "/aup/webroot/" |
#define | NOTFOUND_PAGE "/aup/notfound.htm" |
#define | HEADER_OK |
#define | CONTENT_TEXT "Content-Type: text/html\r\n\r\n" |
#define | CONTENT_JPEG "Content-Type: image/jpeg\r\n\r\n" |
#define | HEADER_NOTFOUND |
#define | HTML_NOTFOUND |
Functions | |
void | send_header_OK (SSI *ssip, off_t len, const char *path, int fd) |
void | send_header_notfound (SSI *ssip, const char *path, int fd) |
bool | handle_request (SSI *ssip, const char *s, int fd) |
int | main (int argc, char *argv[]) |
|
|
|
|
|
Value: "HTTP/1.1 404 Not Found\r\n"\ "Server: AUP-ws\r\n"\ "Transfer-Encoding: chunked\r\n"\ "Content-Type: text/html\r\n\r\n" Definition at line 42 of file ws.c. Referenced by send_header_notfound(). |
|
Value: "HTTP/1.1 200 OK\r\n"\ "Server: AUP-ws\r\n"\ "Content-Length: %ld\r\n" Definition at line 31 of file ws.c. Referenced by send_header_OK(). |
|
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 page %s</h2>"\ "</body></html>\r\n" |
|
|
|
|
|
Definition at line 99 of file ws.c. References EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FLUSH, ec_neg1, send_header_notfound(), send_header_OK(), stat::st_mode, stat::st_size, stat(), WEB_ROOT, and writeall(). Referenced by main(). |
|
Definition at line 145 of file ws.c. References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_false, ec_neg1, ec_null, errno, exit(), gethostname(), handle_request(), read(), ssi_close(), ssi_open(), ssi_wait_server(), and syserr_print(). |
|
Definition at line 83 of file ws.c. References EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FLUSH, ec_neg1, HEADER_NOTFOUND, HTML_NOTFOUND, and writeall(). Referenced by handle_request(). |
|
Definition at line 56 of file ws.c. References CONTENT_JPEG, CONTENT_TEXT, ctime(), EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FLUSH, ec_neg1, HEADER_OK, time(), and writeall(). Referenced by handle_request(). |