寫了一個input filter 用來得到所有用戶輸入的post請求,filter內代碼如下:if( r->method_number==M_POST ){if(ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK) == OK ){if( 1 == ap_should_client_block(r)){while ((nbytes = ap_get_client_block(r, cbuf, sizeof(cbuf))) > 0){cbuf[nbytes]='\0';ap_log_rerror(APLOG_MARK, APLOG_ERR,0,r,"get query string: %s ",cbuf); //輸出到error文件里}}}rv= ap_get_brigade(f->next,bb,mode,block,readbytes); //傳給下一個filterreturn rv;} }}}rv= ap_get_brigade(f->next,bb,mode,block,readbytes); //傳給下一個filterreturn rv;}但error文件中始終顯示exit signal Segmentation fault(11)無法讀到post。用的是Linux下的apache2.2麻煩大牛們幫忙改下代碼,或者解釋下原因也行,謝了~
文件中顯示 exit signal Segmentation fault(11) 無法讀到post?
慕運維8079593
2023-04-01 13:09:16