~ubuntu-branches/ubuntu/vivid/haproxy/vivid

« back to all changes in this revision

Viewing changes to include/types/proto_http.h

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2008-06-20 00:38:50 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080620003850-hvvx94g2xz2l2xbg
Tags: 1.3.15.1-1
* New Upstream Version
* Upgrade standards version to 3.8.0 (no change needed).
* Build with TARGET=linux26 on linux, TARGET=generic on other systems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
/*
31
31
 * FIXME: break this into HTTP state and TCP socket state.
32
 
 * See server.h for the other end.
33
 
 */
34
 
 
35
 
/* different possible states for the client side */
36
 
#define CL_STHEADERS    0
37
 
#define CL_STDATA       1
38
 
#define CL_STSHUTR      2
39
 
#define CL_STSHUTW      3
40
 
#define CL_STCLOSE      4
41
 
 
42
 
/*
43
 
 * FIXME: break this into HTTP state and TCP socket state.
44
32
 * See client.h for the other end.
45
33
 */
46
34
 
47
35
/* different possible states for the server side */
48
36
#define SV_STIDLE       0
49
 
#define SV_STCONN       1
50
 
#define SV_STHEADERS    2
51
 
#define SV_STDATA       3
52
 
#define SV_STSHUTR      4
53
 
#define SV_STSHUTW      5
54
 
#define SV_STCLOSE      6
 
37
#define SV_STANALYZE    1  /* this server state is set by the client to study the body for server assignment */
 
38
#define SV_STCONN       2
 
39
#define SV_STHEADERS    3
 
40
#define SV_STDATA       4
 
41
#define SV_STSHUTR      5
 
42
#define SV_STSHUTW      6
 
43
#define SV_STCLOSE      7
55
44
 
56
45
/*
57
46
 * Transaction flags moved from session
204
193
 *                             which marks the end of the line (LF or CRLF).
205
194
 */
206
195
struct http_msg {
207
 
        int msg_state;                  /* where we are in the current message parsing */
208
 
        char *sol;                      /* start of line, also start of message when fully parsed */
209
 
        char *eol;                      /* end of line */
210
 
        int som;                        /* Start Of Message, relative to buffer */
211
 
        int col, sov;                   /* current header: colon, start of value */
212
 
        int eoh;                        /* End Of Headers, relative to buffer */
213
 
        char **cap;                     /* array of captured headers (may be NULL) */
214
 
        union {                         /* useful start line pointers, relative to buffer */
215
 
                struct {
216
 
                        int l;          /* request line length (not including CR) */
217
 
                        int m_l;        /* METHOD length (method starts at ->som) */
218
 
                        int u, u_l;     /* URI, length */
219
 
                        int v, v_l;     /* VERSION, length */
220
 
                } rq;                   /* request line : field, length */
221
 
                struct {
222
 
                        int l;          /* status line length (not including CR) */
223
 
                        int v_l;        /* VERSION length (version starts at ->som) */
224
 
                        int c, c_l;     /* CODE, length */
225
 
                        int r, r_l;     /* REASON, length */
226
 
                } st;                   /* status line : field, length */
227
 
        } sl;                           /* start line */
 
196
        unsigned int msg_state;                /* where we are in the current message parsing */
 
197
        char *sol;                             /* start of line, also start of message when fully parsed */
 
198
        char *eol;                             /* end of line */
 
199
        unsigned int som;                      /* Start Of Message, relative to buffer */
 
200
        unsigned int col, sov;                 /* current header: colon, start of value */
 
201
        unsigned int eoh;                      /* End Of Headers, relative to buffer */
 
202
        char **cap;                            /* array of captured headers (may be NULL) */
 
203
        union {                                /* useful start line pointers, relative to buffer */
 
204
                struct {
 
205
                        int l;                 /* request line length (not including CR) */
 
206
                        int m_l;               /* METHOD length (method starts at ->som) */
 
207
                        int u, u_l;            /* URI, length */
 
208
                        int v, v_l;            /* VERSION, length */
 
209
                } rq;                          /* request line : field, length */
 
210
                struct {
 
211
                        int l;                 /* status line length (not including CR) */
 
212
                        int v_l;               /* VERSION length (version starts at ->som) */
 
213
                        int c, c_l;            /* CODE, length */
 
214
                        int r, r_l;            /* REASON, length */
 
215
                } st;                          /* status line : field, length */
 
216
        } sl;                                  /* start line */
 
217
        unsigned long long hdr_content_len;    /* cache for parsed header value */
228
218
};
229
219
 
230
220
/* This is an HTTP transaction. It contains both a request message and a