Lines Matching defs:header

73     #    3) print header(-nph=>1)
252 remote_user user_name header redirect import_names put
1165 return $self->header();
1451 # Return a Content-Type: style header for server-push
1472 return $self->header(
1482 # Return a Content-Type: style header for server-push, start of section
1489 my(@header);
1493 push(@header,"Content-Type: $type");
1499 next unless my($header,$value) = /([^ \r\n\t=]+)=\"?(.+?)\"?$/;
1500 ($_ = $header) =~ s/^(\w)(.*)/$1 . lc ($2) . ': '.$self->unescapeHTML($value)/e;
1502 push(@header,@other);
1503 my $header = join($CRLF,@header)."${CRLF}${CRLF}";
1504 return $header;
1536 #### Method: header
1537 # Return a Content-Type: style header
1540 'header' => <<'END_OF_FUNC',
1541 sub header {
1543 my(@header);
1554 for my $header ($type,$status,$cookie,$target,$expires,$nph,$charset,$attachment,$p3p,@other) {
1555 if (defined $header) {
1559 $header =~ s/$CRLF(\s)/$1/g;
1562 if ($header =~ m/$CRLF|\015|\012/) {
1564 $header = substr($header,0,72).'...' if (length $header > 72);
1565 die "Invalid header value contains a newline not followed by whitespace: $header";
1581 next unless my($header,$value) = /([^ \r\n\t=]+)=\"?(.+?)\"?$/s;
1582 ($_ = $header) =~ s/^(\w)(.*)/"\u$1\L$2" . ': '.$self->unescapeHTML($value)/e;
1593 push(@header,$protocol . ' ' . ($status || '200 OK')) if $nph;
1594 push(@header,"Server: " . &server_software()) if $nph;
1596 push(@header,"Status: $status") if $status;
1597 push(@header,"Window-Target: $target") if $target;
1600 push(@header,qq(P3P: policyref="/w3c/p3p.xml", CP="$p3p"));
1607 push(@header,"Set-Cookie: $cs") if $cs ne '';
1611 # both an Expires and a Date header (so that the browser is
1613 push(@header,"Expires: " . expires($expires,'http'))
1615 push(@header,"Date: " . expires(0,'http')) if $expires || $cookie || $nph;
1616 push(@header,"Pragma: no-cache") if $self->cache();
1617 push(@header,"Content-Disposition: attachment; filename=\"$attachment\"") if $attachment;
1618 push(@header,map {ucfirst $_} @other);
1619 push(@header,"Content-Type: $type") if $type ne '';
1620 my $header = join($CRLF,@header)."${CRLF}${CRLF}";
1622 $self->r->send_cgi_header($header);
1625 return $header;
1630 # Control whether header() will produce the no-cache
1646 # Return a Location: style header
1666 return $self->header((map {$self->unescapeHTML($_)} @o),@unescaped);
1672 # Canned HTML header
2900 # Cookie can then be passed to header().
3572 my(%header,$body);
3575 %header = $buffer->readHeader;
3577 unless (%header) {
3582 $header{'Content-Disposition'} ||= ''; # quench uninit variable warning
3584 my($param)= $header{'Content-Disposition'}=~/[\s;]name="([^"]*)"/;
3590 my ($filename) = $header{'Content-Disposition'}
3597 my($multipart) = ( defined( $header{'Content-Type'} ) &&
3598 $header{'Content-Type'} =~ /multipart\/mixed/ ) ?
3642 # if this is an multipart/mixed attachment, save the header
3646 for ( keys %header ) {
3647 print $filehandle "$_: $header{$_}${CRLF}";
3683 info => {%header},
3705 my(%header,$body);
3709 %header = $buffer->readHeader;
3711 unless (%header) {
3716 my($param) = $header{'Content-ID'}=~/\<([^\>]*)\>/;
3785 info => {%header},
4042 #EBCDIC NOTE: translate header into EBCDIC, but watch out for continuation lines!
4044 my($header) = substr($self->{BUFFER},0,$end+2);
4049 warn "untranslated header=$header\n" if DEBUG;
4050 $header = CGI::Util::ascii2ebcdic($header);
4051 warn "translated header=$header\n" if DEBUG;
4059 $header=~s/$CRLF\s+/ /og; # merge continuation lines
4061 while ($header=~/($token+):\s+([^$CRLF]*)/mgox) {
4339 print $q->header();
4340 print $q->header('application/json');
4344 print $q->header(
4387 print $q->header, # create the HTTP header
4389 $q->h1('hello world'), # level 1 header
4404 print header, # create the HTTP header
4406 h1('hello world'), # level 1 header
4419 print $q->header(-type=>'image/gif',-expires=>'+3d');
4429 argument name. header() happens to be one of these routines. In this
4432 print $q->header('text/html');
4474 print $q->header( {-type=>'image/gif',-expires=>'+3d'} );
4501 header fields by providing them as named arguments:
4503 print $q->header(-type => 'text/html',
4508 This will produce the following nonstandard HTTP header:
4830 print $q->header(-status=>$error),
4852 shows how to import the B<param()> and B<header()>
4855 use CGI 'param','header';
4856 print header('text/plain');
4935 header,
5063 This makes CGI.pm produce a header appropriate for an NPH (no
5064 parsed header) script. You may need to do other things as well
5093 than I<hr>, or add something like I<use subs qw/hr p header/>
5194 Generally you will produce the HTTP header first, followed by the
5206 HTTP header. This tells the browser what type of document to expect,
5208 date, and whether to cache the document. The header can also be
5212 print header;
5216 print header('image/gif');
5220 print header('text/html','204 No response');
5224 print header(-type=>'image/gif',
5233 header() returns the Content-type: header. You can provide your own
5243 header fields, allowing you to specify any HTTP header you desire.
5246 print header(-Content_length=>3002);
5265 The B<-cookie> parameter generates a header that tells the browser to provide
5272 headers to work with a NPH (no-parse-header) script. This is important
5285 The B<-p3p> parameter will add a P3P tag to the outgoing header. The
5289 print header(-p3p=>[qw(CAO DSP LAW CURa)]);
5290 print header(-p3p=>'CAO DSP LAW CURa');
5292 In either case, the outgoing header will be formatted as:
5299 print header( -ingredients => "ham\r\n\seggs\r\n\sbacon" );
5301 Invalid multi-line header input will trigger in an exception. When multi-line headers
5314 you use redirection like this, you should B<not> print out a header as
5327 All names arguments recognized by header() are also recognized by
5332 headers to work with a NPH (no-parse-header) script. This is important
5363 This method returns a canned HTML header and the opening <body> tag.
5385 You add arbitrary meta information to the header with the B<-meta>
5388 into a series of header <meta> tags that look something like this:
5426 will put a <?xml> declaration at the top of the HTML header. The sole
5461 HTTP) header. The block is placed in the header in order to give your
5475 print header;
5516 header. Just pass the list of script sections as an array reference.
5556 A 'true' flag if you want to include a <base> tag in the header. This
5865 passing a -charset argument to header(), then B<all> characters will
6046 block in the HTML header and -onSubmit points to one of these function
6309 print $q->header(-status=>$q->cgi_error);
7024 them to the browser in the HTTP header. The browser maintains a list
7079 print header(-cookie=>$cookie);
7114 in the section on the B<header()> method:
7126 header within the string returned by the header() method:
7129 print header(-cookie=>$my_cookie);
7131 To create multiple cookies, give header() an array reference:
7137 print header(-cookie=>[$cookie1,$cookie2]);
7180 After writing out the HTTP header, instead of creating a standard
7188 =item 2. Specify the destination for the document in the HTTP header
7190 You may provide a B<-target> parameter to the header() method:
7192 print header(-target=>'ResultsWindow');
7220 <SCRIPT> block inside the HTML header and then to register event
7409 print header();
7428 arbitrary formatting in the header, you may pass a -verbatim tag to
7435 This will generate an HTML header that contains this:
7676 like-named HTTP header fields in the request. Called with the name of
7677 an HTTP header field, returns its value. Capitalization and the use
7696 NPH, or "no-parsed-header", scripts bypass the server completely by
7697 sending the complete HTTP header directly to the browser. This has
7710 mode, CGI.pm will output the necessary extra header information when
7711 the header() and redirect() methods are
7743 in the B<header()> and B<redirect()> statements:
7745 print header(-nph=>1);
7902 print header(-status=>cgi_error());
8063 print header;