28 |
28 |
29 #ifndef HTTP_H |
29 #ifndef HTTP_H |
30 #define HTTP_H |
30 #define HTTP_H |
31 |
31 |
32 #include "nsapi.h" |
32 #include "nsapi.h" |
33 |
33 #include "io.h" |
34 #include <sys/uio.h> |
34 #include <sys/uio.h> |
35 |
35 |
36 #ifdef __cplusplus |
36 #ifdef __cplusplus |
37 extern "C" { |
37 extern "C" { |
38 #endif |
38 #endif |
39 |
39 |
40 void protocol_status(Session *sn, Request *rq, int n, const char *m); |
40 void protocol_status(Session *sn, Request *rq, int n, const char *m); |
41 const char* protocol_status_message(int code); |
41 const char* protocol_status_message(int code); |
42 |
42 |
|
43 void add_http_status_line(iovec_buf_t *out, Request *rq); |
|
44 void add_http_response_header(iovec_buf_t *out, Request *rq); |
|
45 |
43 int http_start_response(Session *sn, Request *rq); |
46 int http_start_response(Session *sn, Request *rq); |
44 |
47 |
45 #ifdef __cplusplus |
48 #ifdef __cplusplus |
46 } |
49 } |
47 #endif |
50 #endif |