blob: b5fe6a3964530636b6724a01b249adf92f2c763f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
#if !defined (HTTP_REQUEST_H)
#define HTTP_REQUEST_H
#include "ace/OS.h"
class HTTP_Request
{
public:
HTTP_Request (void);
// Default construction.
void init (const char *buffer, int buflen);
// Initialize the request object with the buffer. This will parse
// the buffer and prepare for the accessors.
u_long type (void);
// GET or PUT.
char *data (void);
int data_length (void);
int content_length (void);
char *filename (void);
int status (void);
char *status_string (void);
void dump (void);
// Dump the state of the request.
enum
{
OK = 1,
NO_FILENAME,
NO_CONTENT_LENGTH,
NO_HEADER,
// **************
NO_TYPE,
GET,
PUT
};
protected:
void parse_GET (char *lasts);
void parse_PUT (char *lasts);
private:
char *data_;
int datalen_;
int content_length_;
char *filename_;
int status_;
u_long type_;
};
#endif /* HTTP_REQUEST_H */
|