⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apr::request::param.3

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 3
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings.  \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote.  \*(C+ will.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\.    ds -- \(*W-.    ds PI pi.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch.    ds L" "".    ds R" "".    ds C` "".    ds C' ""'br\}.el\{\.    ds -- \|\(em\|.    ds PI \(*p.    ds L" ``.    ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el       .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD.  Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\.    de IX.    tm Index:\\$1\t\\n%\t"\\$2"...    nr % 0.    rr F.\}.el \{\.    de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear.  Run.  Save yourself.  No user-serviceable parts..    \" fudge factors for nroff and troff.if n \{\.    ds #H 0.    ds #V .8m.    ds #F .3m.    ds #[ \f1.    ds #] \fP.\}.if t \{\.    ds #H ((1u-(\\\\n(.fu%2u))*.13m).    ds #V .6m.    ds #F 0.    ds #[ \&.    ds #] \&.\}.    \" simple accents for nroff and troff.if n \{\.    ds ' \&.    ds ` \&.    ds ^ \&.    ds , \&.    ds ~ ~.    ds /.\}.if t \{\.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u".    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}.    \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E.    \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'.    \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\.    ds : e.    ds 8 ss.    ds o a.    ds d- d\h'-1'\(ga.    ds D- D\h'-1'\(hy.    ds th \o'bp'.    ds Th \o'LP'.    ds ae ae.    ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "Param 3".TH Param 3 "2008-01-23" "perl v5.10.0" "User Contributed Perl Documentation".\" For nroff, turn off justification.  Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"APR::Request::Param \- wrapper for libapreq2's param API..PPfirst\&\-\-\-XYZ\-Content\-Disposition: form\-data; name="beta" filename="foo.txt"Content\-Type: text/plain; charset=us\-ascii.PPsecond\&\-\-\-XYZ\-Content\-Disposition: form\-data; name="gamma"Content\-Type: text/plain; charset=us\-ascii.PPthird\&\-\-\-XYZ\-\-\-EOT    s/(?<!\e015)\e012/\e015\e012/g for $content;    $bb\->insert_tail(APR::Bucket\->new($ba, $content));    $parser = APR::Request::Parser\->multipart($pool, $ba,                                    "multipart/form\-data; boundary=\-XYZ\-");    $req = APR::Request::Custom\->handle($pool, "alpha=arg1&beta=arg2",                                                "foo=bar",                                                $parser, 1e6, $bb);.SH "SYNOPSIS".IX Header "SYNOPSIS".Vb 1\&  use APR::Request::Param;\&\&  $arg1 = $req\->args(\*(Aqalpha\*(Aq);\&  $body = $req\->body;\&  $body\->param_class("APR::Request::Param");\&  ok $_\->isa("APR::Request::Param") for values %$body;\&\&  @uploads = grep {$_\->upload} values %$body;\&  $param = $body\->get(\*(Aqbeta\*(Aq);\&  $param\->upload_slurp(my $content);.Ve.SH "DESCRIPTION".IX Header "DESCRIPTION"The \f(CW\*(C`APR::Request::Param\*(C'\fR module provides base methodsfor interfacing with libapreq2's param \s-1API\s0.  It also providesa few utility functions and constants..PPThis manpage documents version 2.08of the APR::Request::Param, APR::Request::Brigade,and APR::Request::Brigade::IO packages..SH "OVERLOADS".IX Header "OVERLOADS"APR::Request::Param.ie n .Sh """""".el .Sh "``''".IX Subsection """""".Vb 1\&    "$param".Ve.PPThe double-quote interpolation operator maps to\&\f(CW\*(C`APR::Request::Param::value()\*(C'\fR..SH "METHODS".IX Header "METHODS"APR::Request::Param.Sh "name".IX Subsection "name".Vb 1\&    $param\->name().Ve.PPReturns the param's name.This attribute cannot be modified..Sh "value".IX Subsection "value".Vb 1\&    $param\->value().Ve.PPReturns the param's value.This attribute cannot be modified..Sh "is_tainted".IX Subsection "is_tainted".Vb 2\&    $param\->is_tainted()\&    $param\->is_tainted($set).Ve.PPGet/set the param's internal tainted flag.Note: if the param's charset is \s-1APREQ_CHARSET_UTF8\s0 (8),this also activates the SvUTF8_on flag during callsto \fIname()\fR and/or \fIvalue()\fR..PP.Vb 3\&    $tainted = $param\->is_tainted;\&    $param\->is_tainted(0);\&    ok $param\->is_tainted == 0;.Ve.Sh "charset".IX Subsection "charset".Vb 2\&    $param\->charset()\&    $param\->charset($set).Ve.PPGet/set the param's internal charset.  The charsetis a number between 0 and 255; the current recognizedvalues are.IP "0 \s-1APREQ_CHARSET_ASCII\s0    (7\-bit us-ascii)" 4.IX Item "0 APREQ_CHARSET_ASCII    (7-bit us-ascii)".PD 0.IP "1 \s-1APREQ_CHARSET_LATIN1\s0   (8\-bit iso\-8859\-1)" 4.IX Item "1 APREQ_CHARSET_LATIN1   (8-bit iso-8859-1)".IP "2 \s-1APREQ_CHARSET_CP1252\s0   (8\-bit Windows\-1252)" 4.IX Item "2 APREQ_CHARSET_CP1252   (8-bit Windows-1252)".IP "8 \s-1APREQ_CHARSET_UTF8\s0     (utf8 encoded Unicode)" 4.IX Item "8 APREQ_CHARSET_UTF8     (utf8 encoded Unicode)".PD.PPSee is_tainted above for info about how \s-1APREQ_CHARSET_UTF8\s0relates to perl's \s-1UTF\-8\s0 flag..PP.Vb 3\&    $charset = $param\->charset;\&    $param\->charset(2);\&    ok $param\->charset == 2;.Ve.Sh "make".IX Subsection "make".Vb 1\&    APR::Request::Param\->make($pool, $name, $value).Ve.PPFast \s-1XS\s0 param constructor..Sh "info".IX Subsection "info".Vb 2\&    $param\->info()\&    $param\->info($set).Ve.PPGet/set the APR::Table headers for this param..Sh "upload".IX Subsection "upload".Vb 2\&    $param\->upload()\&    $param\->upload($set).Ve.PPGet/set the APR::Brigade file-upload content for this param..Sh "upload_filename".IX Subsection "upload_filename".Vb 1\&    $param\->upload_filename().Ve.PPReturns the client-side filename associated with this param..Sh "upload_link".IX Subsection "upload_link".Vb 1\&    $param\->upload_link($path).Ve.PPLinks the file-upload content with the local file named \f(CW$path\fR.Creates a hard-link if the spoolfile's (see upload_tempname)temporary directory is on the same device as \f(CW$path\fR;otherwise this writes a copy..Sh "upload_slurp".IX Subsection "upload_slurp".Vb 1\&    $param\->upload_slurp($data).Ve.PPReads the entire file-upload content into \f(CW$data\fR..Sh "upload_size".IX Subsection "upload_size".Vb 1\&    $param\->upload_size().Ve.PPReturns the size of the param's file-upload content..Sh "upload_type".IX Subsection "upload_type".Vb 1\&    $param\->upload_type().Ve.PPReturns the MIME-type of the param's file-upload content..Sh "upload_tempname".IX Subsection "upload_tempname".Vb 1\&    $param\->upload_tempname().Ve.PPReturns the name of the local spoolfile for this param..Sh "upload_io".IX Subsection "upload_io".Vb 1\&    $param\->upload_io().Ve.PPReturns an APR::Request::Brigade::IO object, which canbe treated as a non-seekable \s-1IO\s0 stream..Sh "upload_fh".IX Subsection "upload_fh".Vb 1\&    $param\->upload_fh().Ve.PPReturns a seekable filehandle representing the file-upload content..SH "METHODS".IX Header "METHODS"APR::Request::Brigade.PPThis class is derived from APR::Brigade, providing additionalmethods for \s-1TIEHANDLE\s0, \s-1READ\s0 and \s-1READLINE\s0.  To be memory efficient,these methods delete buckets from the brigade as soon as theirdata is actually read, so you cannot \f(CW\*(C`seek\*(C'\fR on handles tied tothis class.  Such handles have semantics similar to that of aread-only socket..Sh "new, \s-1TIEHANDLE\s0".IX Subsection "new, TIEHANDLE".Vb 1\&    APR::Request::Brigade\->TIEHANDLE($bb).Ve.PPCreates a copy of the bucket brigade represented by \f(CW$bb\fR, andblesses that copy into the APR::Request::Brigade class.  Thisprovides syntactic sugar for using perl's builtin \f(CW\*(C`read\*(C'\fR, \f(CW\*(C`readline\*(C'\fR,and \f(CW\*(C`<>\*(C'\fR operations on handles tied to this package:.PP.Vb 4\&    use Symbol;\&    $fh = gensym;\&    tie *$fh, "APR::Request::Brigade", $bb;\&    print while <$fh>;.Ve.Sh "\s-1READ\s0".IX Subsection "READ".Vb 3\&    $bb\->READ($contents)\&    $bb\->READ($contents, $length)\&    $bb\->READ($contents, $length, $offset).Ve.PPReads data from the brigade \f(CW$bb\fR into \f(CW$contents\fR.  When omitted\&\f(CW$length\fR defaults to \f(CW\*(C`\-1\*(C'\fR, which reads the first bucket into \f(CW$contents\fR.A positive \f(CW$length\fR will read in \f(CW$length\fR bytes, or the remainder of thebrigade, whichever is greater. \f(CW$offset\fR represents the index in \f(CW$context\fRto read the new data..Sh "\s-1READLINE\s0".IX Subsection "READLINE".Vb 1\&    $bb\->READLINE().Ve.PPReturns the first line of data from the bride. Lines are terminated bylinefeeds (the '\e012' character), but we may eventually use \f(CW$/\fR instead..SH "METHODS".IX Header "METHODS"APR::Request::Brigade::IO.Sh "read".IX Subsection "read"\&\s-1OO\s0 interface to APR::Request::Brigade::READ..Sh "readline".IX Subsection "readline"\&\s-1OO\s0 interface to APR::Request::Brigade::READLINE..SH "SEE ALSO".IX Header "SEE ALSO"APR::Request, APR::Table, APR::Brigade..SH "COPYRIGHT".IX Header "COPYRIGHT".Vb 1\&  Copyright 2003\-2006  The Apache Software Foundation\&\&  Licensed under the Apache License, Version 2.0 (the "License");\&  you may not use this file except in compliance with the License.\&  You may obtain a copy of the License at\&\&      http://www.apache.org/licenses/LICENSE\-2.0\&\&  Unless required by applicable law or agreed to in writing, software\&  distributed under the License is distributed on an "AS IS" BASIS,\&  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\&  See the License for the specific language governing permissions and\&  limitations under the License..Ve.SH "POD ERRORS".IX Header "POD ERRORS"Hey! \fBThe above document had some coding errors, which are explained below:\fR.IP "Around line 6:" 4.IX Item "Around line 6:"\&'=begin' only takes one parameter, not several as in '=begin testing     use APR::Pool;     use APR::Brigade;     use APR::Bucket;     use APR::BucketAlloc;     use APR::Request;     use APR::Request::Parser;     \f(CW$pool\fR = APR::Pool\->new;     \f(CW$ba\fR = APR::BucketAlloc\->new($pool);     \f(CW$bb\fR = APR::Brigade\->new($pool, \f(CW$ba\fR);     \f(CW$content\fR = <<\s-1EOT\s0; \-\-\-XYZ\- Content-Disposition: form-data; name=\*(L"alpha\*(R" Content-Type: text/plain; charset=us\-ascii'.IP "Around line 42:" 4.IX Item "Around line 42:"=end testing without matching =begin.  (Stack: [empty])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -