10 |
|
#include <iostream> |
11 |
|
#include <fstream> |
12 |
|
#include <string> |
13 |
+ |
#include <sstream> |
14 |
|
#include <set> |
15 |
< |
#include <cgicc/Cgicc.h> |
15 |
> |
#include <map> |
16 |
> |
#include <cstdlib> |
17 |
> |
|
18 |
> |
using namespace std; |
19 |
|
|
20 |
|
#include <sys/types.h> |
21 |
|
#include <sys/stat.h> |
36 |
|
|
37 |
|
#endif |
38 |
|
|
39 |
< |
using namespace std; |
40 |
< |
using namespace cgicc; |
39 |
> |
inline string sgetenv(const string& name) |
40 |
> |
{ |
41 |
> |
char* value = getenv(name.c_str()); |
42 |
> |
|
43 |
> |
return value != NULL ? value : ""; |
44 |
> |
} |
45 |
|
|
46 |
|
class HostUpdate |
47 |
|
{ |
48 |
|
private: |
49 |
< |
Cgicc cgi; |
50 |
< |
void update(CgiEnvironment& env, const string& agent); |
51 |
< |
void display(CgiEnvironment& env); |
49 |
> |
multimap<string, string> cgi; |
50 |
> |
void parse(const string& method); |
51 |
> |
void update(const string& agent); |
52 |
> |
void display(); |
53 |
|
public: |
54 |
|
HostUpdate(); |
55 |
|
~HostUpdate(); |