📄 apache2::response.3
字号:
The current request.ie n .IP "ret: $status\fR ( \f(CW""Apache2::Const status constant"" )" 4.el .IP "ret: \f(CW$status\fR ( \f(CWApache2::Const status constant\fR )" 4.IX Item "ret: $status ( Apache2::Const status constant )"\&\f(CW\*(C`Apache2::Const::OK\*(C'\fR if the response fulfills the condition \s-1GET\s0rules. Otherwise some other status code (which should be returned toApache)..IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PPRefer to the Generating Correct \s-1HTTP\s0Headers documentfor an indepth discussion of this method..ie n .Sh """rationalize_mtime""".el .Sh "\f(CWrationalize_mtime\fP".IX Subsection "rationalize_mtime"Return the latest rational time from a request/mtime pair..PP.Vb 1\& $mtime_rat = $r\->rationalize_mtime($mtime);.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )"The current request.ie n .IP "arg1: $mtime ( time in seconds )" 4.el .IP "arg1: \f(CW$mtime\fR ( time in seconds )" 4.IX Item "arg1: $mtime ( time in seconds )"The last modified time.ie n .IP "ret: $mtime_rat ( time in seconds )" 4.el .IP "ret: \f(CW$mtime_rat\fR ( time in seconds )" 4.IX Item "ret: $mtime_rat ( time in seconds )"the latest rational time from a request/mtime pair. Mtime isreturned unless it's in the future, in which case we return thecurrent time..IP "since: 2.0.00" 4.IX Item "since: 2.0.00".ie n .Sh """send_cgi_header""".el .Sh "\f(CWsend_cgi_header\fP".IX Subsection "send_cgi_header"Parse the header.PP.Vb 1\& $r\->send_cgi_header($buffer);.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )".PD 0.ie n .IP "arg1: $buffer (string)" 4.el .IP "arg1: \f(CW$buffer\fR (string)" 4.IX Item "arg1: $buffer (string)".PDheaders and optionally a response body.IP "ret: no return value" 4.IX Item "ret: no return value".PD 0.IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.PPThis method is really for back-compatibility with mod_perl 1.0. It'svery inefficient to send headers this way, because of the parsingoverhead..PPIf there is a response body following the headers it'll be handled too(as if it was sent via\&\f(CW\*(C`print()\*(C'\fR)..PPNotice that if only \s-1HTTP\s0 headers are included they won't be sent untilsome body is sent (again the \*(L"send\*(R" part is retained from the mod_perl1.0 method)..ie n .Sh """set_content_length""".el .Sh "\f(CWset_content_length\fP".IX Subsection "set_content_length"Set the content length for this request..PP.Vb 1\& $r\->set_content_length($length);.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )"The current request.ie n .IP "arg1: $length (integer)" 4.el .IP "arg1: \f(CW$length\fR (integer)" 4.IX Item "arg1: $length (integer)"The new content length.IP "ret: no return value" 4.IX Item "ret: no return value".PD 0.IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.ie n .Sh """set_etag""".el .Sh "\f(CWset_etag\fP".IX Subsection "set_etag"Set the E\-tag outgoing header.PP.Vb 1\& $r\->set_etag();.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )".PD 0.IP "ret: no return value" 4.IX Item "ret: no return value".IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.ie n .Sh """set_keepalive""".el .Sh "\f(CWset_keepalive\fP".IX Subsection "set_keepalive"Set the keepalive status for this request.PP.Vb 1\& $ret = $r\->set_keepalive();.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )"The current request.ie n .IP "ret: $ret ( boolean )" 4.el .IP "ret: \f(CW$ret\fR ( boolean )" 4.IX Item "ret: $ret ( boolean )"true if keepalive can be set, false otherwise.IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PPIt's called by \f(CW\*(C`ap_http_header_filter()\*(C'\fR. For the completecomplicated logic implemented by this method see\&\fIhttpd\-2.0/server/http_protocol.c\fR..ie n .Sh """set_last_modified""".el .Sh "\f(CWset_last_modified\fP".IX Subsection "set_last_modified"sets the \f(CW\*(C`Last\-Modified\*(C'\fR response header field to the value of themtime field in the request structure \*(-- rationalized to keep it frombeing in the future..PP.Vb 1\& $r\->set_last_modified($mtime);.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )".PD 0.ie n .IP "opt arg1: $mtime ( time in seconds )" 4.el .IP "opt arg1: \f(CW$mtime\fR ( time in seconds )" 4.IX Item "opt arg1: $mtime ( time in seconds )".PDif the \f(CW$mtime\fR argument is passed,\&\f(CW$r\fR\->update_mtime will be first run with thatargument..IP "ret: no return value" 4.IX Item "ret: no return value".PD 0.IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.ie n .Sh """update_mtime""".el .Sh "\f(CWupdate_mtime\fP".IX Subsection "update_mtime"Set the\&\f(CW\*(C`$r\->mtime\*(C'\fR fieldto the specified value if it's later than what's already there..PP.Vb 1\& $r\->update_mtime($mtime);.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )"The current request.ie n .IP "arg1: $mtime ( time in seconds )" 4.el .IP "arg1: \f(CW$mtime\fR ( time in seconds )" 4.IX Item "arg1: $mtime ( time in seconds )".PD 0.IP "ret: no return value" 4.IX Item "ret: no return value".IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.PPSee also: \f(CW$r\fR\->set_last_modified..SH "Unsupported API".IX Header "Unsupported API"\&\f(CW\*(C`Apache2::Response\*(C'\fR also provides auto-generated Perl interface for afew other methods which aren't tested at the moment and thereforetheir \s-1API\s0 is a subject to change. These methods will be finalizedlater as a need arises. If you want to rely on any of the followingmethods please contact the the mod_perl development mailinglist so we can help each other take the steps necessaryto shift the method to an officially supported \s-1API\s0..ie n .Sh """send_error_response""".el .Sh "\f(CWsend_error_response\fP".IX Subsection "send_error_response"Send an \*(L"error\*(R" response back to client. It is used for any responsethat can be generated by the server from the request record. Thisincludes all 204 (no content), 3xx (redirect), 4xx (client error), and5xx (server error) messages that have not been redirected to anotherhandler via the ErrorDocument feature..PP.Vb 1\& $r\->send_error_response($recursive_error);.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )"The current request.ie n .IP "arg1: $recursive_error ( boolean )" 4.el .IP "arg1: \f(CW$recursive_error\fR ( boolean )" 4.IX Item "arg1: $recursive_error ( boolean )"the error status in case we get an error in the process of trying todeal with an \f(CW\*(C`ErrorDocument\*(C'\fR to handle some other error. In thatcase, we print the default report for the first thing that went wrong,and more briefly report on the problem with the \f(CW\*(C`ErrorDocument\*(C'\fR..IP "ret: no return value" 4.IX Item "ret: no return value".PD 0.IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PD.PP\&\s-1META:\s0 it's really an internal Apache method, I'm not quite sure howcan it be used externally..ie n .Sh """send_mmap""".el .Sh "\f(CWsend_mmap\fP".IX Subsection "send_mmap"\&\s-1META:\s0 Autogenerated \- needs to be reviewed/completed.PPSend an \s-1MMAP\s0'ed file to the client.PP.Vb 1\& $ret = $r\->send_mmap($mm, $offset, $length);.Ve.ie n .IP "obj: $r\fR ( \f(CW""Apache2::RequestRec object"" )" 4.el .IP "obj: \f(CW$r\fR ( \f(CWApache2::RequestRec object\fR )" 4.IX Item "obj: $r ( Apache2::RequestRec object )"The current request.ie n .IP "arg1: $mm\fR (\f(CW""APR::Mmap"")" 4.el .IP "arg1: \f(CW$mm\fR (\f(CWAPR::Mmap\fR)" 4.IX Item "arg1: $mm (APR::Mmap)"The \s-1MMAP\s0'ed file to send.ie n .IP "arg2: $offset (number)" 4.el .IP "arg2: \f(CW$offset\fR (number)" 4.IX Item "arg2: $offset (number)"The offset into the \s-1MMAP\s0 to start sending.ie n .IP "arg3: $length (integer)" 4.el .IP "arg3: \f(CW$length\fR (integer)" 4.IX Item "arg3: $length (integer)"The amount of data to send.ie n .IP "ret: $ret (integer)" 4.el .IP "ret: \f(CW$ret\fR (integer)" 4.IX Item "ret: $ret (integer)"The number of bytes sent.IP "since: 2.0.00" 4.IX Item "since: 2.0.00".PP\&\s-1META:\s0 requires a working APR::Mmap, which is not supported at themoment..SH "See Also".IX Header "See Also"mod_perl 2.0 documentation..SH "Copyright".IX Header "Copyright"mod_perl 2.0 and its core modules are copyrighted underThe Apache Software License, Version 2.0..SH "Authors".IX Header "Authors"The mod_perl development team and numerouscontributors.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -