Ключевые слова:patch, apache, ssi, (найти похожие документы)
Date: Tue, 5 Dec 2000 13:11:27 +0200
From: Valery Tuinov <[email protected]>
To: [email protected]Subject: Патч для mod_include для передачи параметров методом POST
Я вот в очередной раз надругался над mod_include. После этого заработало.
===mod include.c ====
/* находим этот фрагмент (функция send_parsed_file)*/
/* r->allowed |= (1 << M_GET);
if (r->method_number != M_GET) {
return DECLINED;
}
*/
/* и заменяем его на вот это*/
//////////////////////////////
r->allowed |= (1 << M_GET);
r->allowed |= (1 << M_POST);
if (r->method_number == M_GET) {
/*do nothing*/
}
else if (r->method_number == M_POST) {
char argsbuffer[HUGE_STRING_LEN];
int retval;
/* Transfer any put/post args, CERN style...*/
if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
return retval;
if (ap_should_client_block(r)) {
int len_read;
ap_hard_timeout("copy script args", r);
/*init ""*/
r->args = "";
while ((len_read =
ap_get_client_block(r, argsbuffer, HUGE_STRING_LEN)) > 0) {
if (len_read < HUGE_STRING_LEN)
argsbuffer[len_read] = (char) 0;
r->args =
ap_psprintf(r->pool,
"%s%s",r->args,argsbuffer) ;
ap_reset_timeout(r);
}
/* for subrequest - let they mean, that is not POST but GET*/
r->method_number = M_GET;
/* ap_kill_timeout(r);*/
}
}
else return DECLINED;
///////////////////////////////
= [email protected] mailing list =
Mail "unsubscribe apache-talk" to [email protected] if you want to quit.
= Archive avaliable at http://www.lexa.ru/apache-talk =