sister
i4httools.h
Go to the documentation of this file.
1 
9 #ifndef I4HTTOOLS_H
10 #define I4HTTOOLS_H
11 
12 #include <stdio.h>
13 
14 
28 int checkPath(const char path[]);
29 
38 void httpOK(FILE *tx);
39 
53 void httpMovedPermanently(FILE *tx, const char newRelPath[]);
54 
64 void httpBadRequest(FILE *tx);
65 
76 void httpForbidden(FILE *tx, const char relPath[]);
77 
88 void httpNotFound(FILE *tx, const char relPath[]);
89 
101 void httpInternalServerError(FILE *tx, const char relPath[]);
102 
103 #endif /* I4HTTOOLS_H */
void httpForbidden(FILE *tx, const char relPath[])
Outputs a "forbidden" HTTP response and error page to a stream.
void httpMovedPermanently(FILE *tx, const char newRelPath[])
Outputs a "moved permanently" HTTP response and error page to a stream.
int checkPath(const char path[])
Checks if a path leaves the webserver's document-root (wwwpath).
void httpNotFound(FILE *tx, const char relPath[])
Outputs a "not found" HTTP response and error page to a stream.
void httpOK(FILE *tx)
Outputs an "OK" HTTP response to a stream.
void httpInternalServerError(FILE *tx, const char relPath[])
Outputs an "internal server error" HTTP response and error page to a stream.
void httpBadRequest(FILE *tx)
Outputs a "bad request" HTTP response and error page to a stream.