1 |
adcroft |
1.1 |
/* http.h |
2 |
|
|
**/ |
3 |
|
|
|
4 |
|
|
#ifndef __HasSeenModule_HTTP |
5 |
|
|
#define __HasSeenModule_HTTP 1 |
6 |
|
|
|
7 |
|
|
#define MAXPIDLEN 32 /* 32 is for the pid identifier and the trailing null */ |
8 |
|
|
|
9 |
|
|
/* |
10 |
|
|
-- module data |
11 |
|
|
*/ |
12 |
|
|
|
13 |
|
|
struct MOD_HTTP |
14 |
|
|
{ |
15 |
|
|
/* spider directory for index (HTTP method) */ |
16 |
|
|
int lenspiderdirectory; |
17 |
|
|
char *spiderdirectory; |
18 |
|
|
|
19 |
|
|
/* http system specific configuration parameters */ |
20 |
|
|
int maxdepth; |
21 |
|
|
int delay; |
22 |
|
|
struct multiswline *equivalentservers; |
23 |
|
|
|
24 |
|
|
struct url_info *url_hash[BIGHASHSIZE]; |
25 |
|
|
}; |
26 |
|
|
|
27 |
|
|
void initModule_HTTP (SWISH *); |
28 |
|
|
void freeModule_HTTP (SWISH *); |
29 |
|
|
int configModule_HTTP (SWISH *, StringList *); |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
char *url_method ( char *url, int *plen ); |
33 |
|
|
char *url_serverport (char *url, int *plen); |
34 |
|
|
char *url_uri (char *url, int *plen); |
35 |
|
|
int get(SWISH * sw, char *contenttype_or_redirect, time_t *last_modified, time_t * plastretrieval, char *file_prefix, char *url); |
36 |
|
|
int cmdf (int (*cmd)(const char *), char *fmt, char *,pid_t pid); |
37 |
|
|
char *readline (FILE *fp); |
38 |
|
|
pid_t lgetpid (); |
39 |
|
|
|
40 |
|
|
|
41 |
|
|
#endif |
42 |
|
|
|