182 |
if (!ok) return 0; \ |
if (!ok) return 0; \ |
183 |
} |
} |
184 |
|
|
185 |
/* |
const char* hydra_method_str( int method) |
|
* Name: complete_env |
|
|
* |
|
|
* Description: adds the known client header env variables |
|
|
* and terminates the environment array |
|
|
*/ |
|
|
|
|
|
int complete_env(request * req) |
|
186 |
{ |
{ |
|
int i; |
|
|
char buf[22]; |
|
|
|
|
|
for (i = 0; common_cgi_env[i]; i++) |
|
|
req->cgi_env[i] = common_cgi_env[i]; |
|
|
|
|
|
{ |
|
187 |
char *w; |
char *w; |
188 |
switch (req->method) { |
switch (req->method) { |
189 |
case M_POST: |
case M_POST: |
199 |
w = "UNKNOWN"; |
w = "UNKNOWN"; |
200 |
break; |
break; |
201 |
} |
} |
202 |
my_add_cgi_env(req, "REQUEST_METHOD", w); |
return w; |
203 |
} |
} |
204 |
|
|
205 |
|
/* |
206 |
|
* Name: complete_env |
207 |
|
* |
208 |
|
* Description: adds the known client header env variables |
209 |
|
* and terminates the environment array |
210 |
|
*/ |
211 |
|
|
212 |
|
int complete_env(request * req) |
213 |
|
{ |
214 |
|
int i; |
215 |
|
char buf[22]; |
216 |
|
char* w; |
217 |
|
|
218 |
|
for (i = 0; common_cgi_env[i]; i++) |
219 |
|
req->cgi_env[i] = common_cgi_env[i]; |
220 |
|
|
221 |
|
w = hydra_method_str( req->method); |
222 |
|
my_add_cgi_env(req, "REQUEST_METHOD", w); |
223 |
|
|
224 |
if (req->secure) { |
if (req->secure) { |
225 |
simple_itoa(ssl_port, buf); |
simple_itoa(ssl_port, buf); |