*** mod_pcgi.c-01 Sun Jun 20 19:23:37 1999 --- mod_pcgi.c Fri Jun 25 19:54:18 1999 *************** *** 52,57 **** --- 52,58 ---- #include "http_protocol.h" #include "http_request.h" #include "http_core.h" + #include "http_main.h" #define UNIX 1 #define APACHE 1 *************** *** 250,256 **** server_rec *pcgi_req_server; /* Utility function used to sum up the lengths of the strings in a table */ ! static int env_adder(void *p, char *key, char *value) { int *sz_env = (int *) p; (*sz_env) += strlen(key) + 1 + strlen(value) + 1; --- 251,257 ---- server_rec *pcgi_req_server; /* Utility function used to sum up the lengths of the strings in a table */ ! static int env_adder(void *p, const char *key, const char *value) { int *sz_env = (int *) p; (*sz_env) += strlen(key) + 1 + strlen(value) + 1; *************** *** 258,264 **** } /* Utility function used to append key/value pairs from the environment */ ! static int env_pair_append(void *ptr, char *key, char *value) { /*pcgiResource *pcgi = (pcgiResource *)p;*/ char **pp = (char **)ptr; --- 259,265 ---- } /* Utility function used to append key/value pairs from the environment */ ! static int env_pair_append(void *ptr, const char *key, const char *value) { /*pcgiResource *pcgi = (pcgiResource *)p;*/ char **pp = (char **)ptr; *************** *** 344,350 **** /* Add the 'Authorization' header */ { ! char *auth = ap_table_get(req->headers_in, "Authorization"); if (auth) ap_table_setn(req->subprocess_env, "HTTP_CGI_AUTHORIZATION", auth); } --- 345,351 ---- /* Add the 'Authorization' header */ { ! char *auth = (char *)ap_table_get(req->headers_in, "Authorization"); if (auth) ap_table_setn(req->subprocess_env, "HTTP_CGI_AUTHORIZATION", auth); } *************** *** 383,389 **** /* Now send the contents of standard input */ { ! char *p = ap_table_get(req->subprocess_env, "CONTENT_LENGTH"); int sz_input; char *p_input; --- 384,390 ---- /* Now send the contents of standard input */ { ! char *p = (char *)ap_table_get(req->subprocess_env, "CONTENT_LENGTH"); int sz_input; char *p_input; *************** *** 416,422 **** if (ap_should_client_block(req)) { char buffer[HUGE_STRING_LEN]; ! int rsize, len_read, rpos; long length = req->remaining; ap_hard_timeout("pcgi_read_stdin", req); --- 417,423 ---- if (ap_should_client_block(req)) { char buffer[HUGE_STRING_LEN]; ! int rsize, len_read, rpos = 0; long length = req->remaining; ap_hard_timeout("pcgi_read_stdin", req); *************** *** 461,467 **** { char header[10]; int sz_output, sz_error, l; ! char *p_output, *p_error; header[0] = '\0'; --- 462,468 ---- { char header[10]; int sz_output, sz_error, l; ! char *p_output, *p_error = NULL; header[0] = '\0'; *************** *** 561,567 **** */ if (sz_output != 0) { ! int sent, i; char buffer[HUGE_STRING_LEN+1]; r->p_output = p_output; r->sz_output = sz_output; --- 562,568 ---- */ if (sz_output != 0) { ! int sent; char buffer[HUGE_STRING_LEN+1]; r->p_output = p_output; r->sz_output = sz_output;