/[hydra]/hydra/src/cgi.c
ViewVC logotype

Diff of /hydra/src/cgi.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by nmav, Wed Sep 25 22:10:03 2002 UTC revision 1.8 by nmav, Fri Sep 27 10:35:20 2002 UTC
# Line 182  int add_cgi_env(request * req, char *key Line 182  int add_cgi_env(request * req, char *key
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:
# Line 213  int complete_env(request * req) Line 199  int complete_env(request * req)
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);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26