698 |
698 |
699 typedef struct ServerConfiguration ServerConfiguration; |
699 typedef struct ServerConfiguration ServerConfiguration; |
700 typedef struct ConfigNode WSConfigNode; |
700 typedef struct ConfigNode WSConfigNode; |
701 typedef enum WSConfigNodeType WSConfigNodeType; |
701 typedef enum WSConfigNodeType WSConfigNodeType; |
702 |
702 |
|
703 // new |
|
704 typedef struct HttpResponseWriter HttpResponseWriter; |
|
705 |
703 #ifndef PR_AF_INET |
706 #ifndef PR_AF_INET |
704 typedef union PRNetAddr PRNetAddr; |
707 typedef union PRNetAddr PRNetAddr; |
705 #endif |
708 #endif |
706 |
709 |
707 typedef struct Session Session; |
710 typedef struct Session Session; |
1509 |
1512 |
1510 void protocol_status(Session *sn, Request *rq, int n, const char *m); |
1513 void protocol_status(Session *sn, Request *rq, int n, const char *m); |
1511 |
1514 |
1512 int http_start_response(Session *sn, Request *rq); |
1515 int http_start_response(Session *sn, Request *rq); |
1513 #define protocol_start_response http_start_response |
1516 #define protocol_start_response http_start_response |
|
1517 |
|
1518 HttpResponseWriter *http_create_response(Session *sn, Request *rq); |
|
1519 |
|
1520 /* |
|
1521 * return: -1: error |
|
1522 * 0: finished |
|
1523 * 1: EWOULDBLOCK |
|
1524 */ |
|
1525 int http_send_response(HttpResponseWriter *writer); |
|
1526 |
1514 int request_header(char *name, char **value, Session *sn, Request *rq); |
1527 int request_header(char *name, char **value, Session *sn, Request *rq); |
1515 |
1528 |
1516 char *http_uri2url(const char *prefix, const char *suffix); |
1529 char *http_uri2url(const char *prefix, const char *suffix); |
1517 char *http_uri2url_dynamic(const char *prefix, const char *suffix, |
1530 char *http_uri2url_dynamic(const char *prefix, const char *suffix, |
1518 Session *sn, Request *rq); |
1531 Session *sn, Request *rq); |