怎样使DELPHI7支持APACHE2.0.48/49(200分)

  • 主题发起人 主题发起人 cosher
  • 开始时间 开始时间
打开 HTTPD2.pas (在c:/ Program Files/borland/delphi7/source/ Internet下)
修改一下常数:
· MODULE_MAGIC_NUMBER_MAJOR = 20020628;
{ Apache 2.0.40 }
· 如果是Apache 2.0.48 的话,应该修改为
· MODULE_MAGIC_NUMBER_MAJOR = 20020903;
{ Apache 2.0.43 } MODULE_MAGIC_NUMBER_MINOR = 4;
(* 0...n *)
在结构 conn_rec 的定义里加入以下:
· ap_conn_keepalive_e = (AP_CONN_UNKNOWN, AP_CONN_CLOSE, AP_CONN_KEEPALIVE);
在结构 conn_rec 的定义里替换:
· (** Are we still talking? *)
· flags: Cardinal;
· { The following are in the flags bitset:
· unsigned aborted:1;
·
· (** Are we going to keep the connection alive for another request?
· * -1 fatal error, 0 undecided, 1 yes *)
· signed int keepalive:2;
·
· (** have wedo
nedo
uble-reverse DNS? -1 yes/failure, 0 not yet,
· * 1 yes/success *)
· signed intdo
uble_reverse:2;
· }
为:
(** Are we still talking? *)
flags1: Cardinal;
{ The following are in the flags bitset:
unsigned aborted:1;
}

(** Are we going to keep the connection alive for another request?
* @see ap_conn_keepalive_e *)
keepalive: ap_conn_keepalive_e;

flags2: Cardinal;
{ The following are in the flags bitset:
(** have wedo
nedo
uble-reverse DNS? -1 yes/failure, 0 not yet,
* 1 yes/success *)
signed intdo
uble_reverse:2;
}
然后删掉lib中的ApacheTwoHTTP.duc, ApacheTwoApp.duc, HTTPD2.duc文件
再将ApacheTwoHTTP.pas, ApacheTwoApp.pas, HTTPD2.pas考到lib目录中,重新编译一下就OK了
 
后退
顶部