initial load of upstream version 1.06.32
[xmlrpc-c] / lib / abyss / src / session.h
1 #ifndef SESSION_H_INCLUDED
2 #define SESSION_H_INCLUDED
3
4 #include "xmlrpc-c/abyss.h"
5 #include "date.h"
6 #include "data.h"
7
8 typedef struct {
9     uint8_t major;
10     uint8_t minor;
11 } httpVersion;
12
13 struct _TSession {
14     abyss_bool validRequest;
15         /* Client has sent, and server has recognized, a valid HTTP request.
16            This is false when the session is new.  If and when the server
17            reads the request from the client and finds it to be valid HTTP,
18            it becomes true.
19         */
20     TRequestInfo request_info;
21     uint32_t nbfileds;
22     TList cookies;
23     TList ranges;
24
25     uint16_t status;
26         /* Response status from handler.  Zero means handler has not
27            set it.
28         */
29     TString header;
30
31     abyss_bool serverDeniesKeepalive;
32         /* Server doesn't want keepalive for this session, regardless of
33            what happens in the session.  E.g. because the connection has
34            already been kept alive long enough.
35         */
36     abyss_bool responseStarted;
37         /* Handler has at least started the response (i.e. called
38            ResponseWrite())
39         */
40
41     struct _TConn * conn;
42
43     httpVersion version;
44
45     TTable request_headers;
46     TTable response_headers;
47
48     TDate date;
49
50     abyss_bool chunkedwrite;
51     abyss_bool chunkedwritemode;
52
53     abyss_bool continueRequired;
54         /* This client must receive 100 (continue) status before it will
55            send more of the body of the request.
56         */
57 };
58
59
60 #endif