Result:
found more than 754 distributions - search limited to the first 2001 files matching your query ( run in 0.535 )


HTTP-Parser2-XS

 view release on metacpan or  search on metacpan

lib/HTTP/Parser2/XS.pm  view on Meta::CPAN

    } else {
        # $rv contains the length of the response header on success
    }


    if (exists $r->{'content-type'} && 
        $r->{'content-type'}->[0] eq 'text/html') 
    {
        # ...
    }


 view all matches for this distribution


HTTP-Promise

 view release on metacpan or  search on metacpan

lib/HTTP/Promise/Body/Form/Data.pm  view on Meta::CPAN


Each key represents a C<form-data> field and its value can either be a simple string or a C<HTTP::Promise::Body::Form::Field> object.

C<multipart/form-data> is the only valid Content-Type for sending multiple data. L<rfc7578 in section 4.3|https://tools.ietf.org/html/rfc7578#section-4.3> states: "[RFC2388] suggested that multiple files for a single form field be transmitted using a...

See also this L<Stackoverflow discussion|https://stackoverflow.com/questions/36674161/http-multipart-form-data-multiple-files-in-one-input/41204533#41204533> and L<this one too|https://stackoverflow.com/questions/51575746/http-header-content-type-mul...

=head1 CONSTRUCTOR

=head2 new

 view all matches for this distribution


HTTP-Proxy

 view release on metacpan or  search on metacpan

eg/README  view on Meta::CPAN

   Filter: HTTP::Proxy::HeaderFilter::simple

 * logger.pl

   This filter outputs the important information out of GET and POST
   requests: method, URI, cookies, content-type (text/*) and POST
   request parameters.

   Filter: HTTP::Proxy::HeaderFilter::simple

 * adblock.pl

 view all matches for this distribution


HTTP-Request-AsCurl

 view release on metacpan or  search on metacpan

lib/HTTP/Request/AsCurl.pm  view on Meta::CPAN

    my @data    = split '&', $content;
    my $method  = $request->method;
    my $uri     = $request->uri;
    my $headers = $request->headers;
    my $user    = $headers->authorization_basic;
    my @h       = grep { $_ !~ /(authorization|content-length|content-type)/i }
        $headers->header_field_names;

    my @cmd = (["curl"]);
    push(@cmd, ["--request", $method, $uri]);
    push(@cmd, ["--dump-header", "-"]);

 view all matches for this distribution


HTTP-Response-Parser

 view release on metacpan or  search on metacpan

t/01_basic.t  view on Meta::CPAN

hogehoge
----------
{
 '_content' => "hogehoge\n",
 '_protocol' => 'HTTP/1.0',
 '_headers' => { "content-type" => "text/html"},
 '_rc' => 200,
 '_msg' => 'OK'
}
----------
HTTP/1.0 200 OK

t/01_basic.t  view on Meta::CPAN

hogehoge
----------
{
 '_content' => "hogehoge\n",
 '_protocol' => 'HTTP/1.0',
 '_headers' => { "content-type" => "text/html", "x-test" => [1,2]},
 '_rc' => 200,
 '_msg' => 'OK'
}
----------
HTTP/1.0 200 OK

t/01_basic.t  view on Meta::CPAN

hogehoge
----------
{
 '_content' => "hogehoge\n",
 '_protocol' => 'HTTP/1.0',
 '_headers' => { "content-type" => "text/html", "x-test" => "1\n X-Test: 2"},
 '_rc' => 200,
 '_msg' => 'OK'
}
----------
HTTP/1.0 200 OK
Content-Type: text/html
----------
{
 '_content' => "",
 '_protocol' => 'HTTP/1.0',
 '_headers' => { "content-type" => "text/html"},
 '_rc' => 200,
 '_msg' => 'OK'
}
----------
HTTP/1.1 200 OK
Content-Type: text/html
----------
{
 '_content' => "",
 '_protocol' => 'HTTP/1.1',
 '_headers' => { "content-type" => "text/html"},
 '_rc' => 200,
 '_msg' => 'OK'
}
----------
HTTP/1.1 404 Not Found
Content-Type: text/html
----------
{
 '_content' => "",
 '_protocol' => 'HTTP/1.1',
 '_headers' => { "content-type" => "text/html"},
 '_rc' => 404,
 '_msg' => 'Not Found'
}
----------
HTTP/1.1 200 OK

t/01_basic.t  view on Meta::CPAN

FOO_BAR: 42
----------
{
 '_content' => "",
 '_protocol' => 'HTTP/1.1',
 '_headers' => { "content-type" => "text/html", "foo-bar" => 42},
 '_rc' => 200,
 '_msg' => 'OK'
}
__HEADERS

 view all matches for this distribution


HTTP-SecureHeaders

 view release on metacpan or  search on metacpan

lib/HTTP/SecureHeaders.pm  view on Meta::CPAN

    # ALLOW-FROM # deprecated
}

# refs https://www.adobe.com/devnet-docs/acrobatetk/tools/AppSec/CrossDomain_PolicyFile_Specification.pdf
sub check_x_permitted_cross_domain_policies {
    $_[0] =~ m!\A(?:none|master-only|by-content-type|by-ftp-filename|all)\z!
}

# refs https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection
sub check_x_xss_protection {
    $_[0] eq '0' or

 view all matches for this distribution


HTTP-Server-Simple-Static

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - Switched to using IO::File for the file handling, also
          turned on binmode to help those on Windows serve images, etc.

0.02  Wed Mar 29 12:00:00 2005
	- close fh after reading content. (Max Maischein)
	- fixed content-type header (Kang-min Liu & Max)
	
0.01  Thu Jan 06 21:40:02 2005
	- forked from patch to HTTP::Server::Simple

 view all matches for this distribution


HTTP-Session

 view release on metacpan or  search on metacpan

lib/HTTP/Session/State/Mixin/ResponseFilter.pm  view on Meta::CPAN

            }
            $res->[1] = \@new_headers;
            return $res;
        } elsif (my $body = $res->[2]) {
            if ( ref $body eq 'ARRAY' ) {
                # TODO: look the content-type header.
                my $content = '';
                for my $line (@$body) {
                    $content .= $line if length $line;
                }
                $res->[2] = [$self->html_filter($session_id, $content)];

 view all matches for this distribution


HTTP-Thin-UserAgent

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

 - bring in changes from usage at Followerwonk (Chris Prather)
 - add on_error handling and structured exceptions (Chris Prather)
 - s/decode/decoded_content/ to match HTTP::Message (Chris Prather)

0.003 2013-02-18T23:43:47
 - Fix it so that the content-type is set also with add_json (Chris
   Prather)

0.002 2013-02-18T23:07:26
 - Add a warning about API breakage (Chris Prather)
 - split the API out a little (Chris Prather)

 view all matches for this distribution


HTTP-Throwable

 view release on metacpan or  search on metacpan

lib/HTTP/Throwable/Role/Status/RequestedRangeNotSatisfiable.pm  view on Meta::CPAN

than the current length of the selected resource.)

When this status code is returned for a byte-range request, the
response SHOULD include a Content-Range entity-header field specifying
the current length of the selected resource. This response MUST NOT
use the multipart/byteranges content-type.

=head1 PERL VERSION

This library should run on perls released even a long time ago.  It should work
on any version of perl released in the last five years.

lib/HTTP/Throwable/Role/Status/RequestedRangeNotSatisfiable.pm  view on Meta::CPAN

#pod than the current length of the selected resource.)
#pod
#pod When this status code is returned for a byte-range request, the
#pod response SHOULD include a Content-Range entity-header field specifying
#pod the current length of the selected resource. This response MUST NOT
#pod use the multipart/byteranges content-type.
#pod

 view all matches for this distribution


HTTP-Tiny-Bandwidth

 view release on metacpan or  search on metacpan

lib/HTTP/Tiny/Bandwidth.pm  view on Meta::CPAN

            binmode $fh;
        }
        my $upload_limit_bps = $args->{upload_limit_bps};
        $args->{content} = $self->_upload_data_callback($fh, $upload_limit_bps);
        ($args->{headers} ||= +{})->{'content-length'} = -s $fh;
        # XXX set content-type via Plack::MIME?
    }

    my $set_bandwidth_data_callback;
    my ($download_content, $download_content_fh);
    if (my $download_limit_bps = $args->{download_limit_bps}) {

 view all matches for this distribution


HTTP-Tiny-FileProtocol

 view release on metacpan or  search on metacpan

lib/HTTP/Tiny/FileProtocol.pm  view on Meta::CPAN

        success => $success,
        status  => $status,
        ( !$success ? (reason  => $reason) : () ),
        content => $content // '',
        headers => {
            'content-type'   => $content_type,
            'content-length' => $bytes // 0,
        },
    };

    return $response;

 view all matches for this distribution


HTTP-Tiny-Multipart

 view release on metacpan or  search on metacpan

lib/HTTP/Tiny/Multipart.pm  view on Meta::CPAN

    }
 
    # Add boundary to Content-Type header
    my $before = 'multipart/form-data';
    my $after  = '';
    if( defined $headers->{'content-type'} ) {
        if( $headers->{'content-type'} =~ m!^(.*multipart/[^;]+)(.*)$! ) {
            $before = $1;
            $after  = $2;
        }
    }

    $headers->{'content-type'} = "$before; boundary=$boundary$after";
 
    return "--$boundary\x0d\x0a";
}

sub _build_content {

 view all matches for this distribution


HTTP-Tiny

 view release on metacpan or  search on metacpan

eg/post.pl  view on Meta::CPAN

  push @params, join("=", map { uri_escape_utf8($_) } @pair);
}

my $response = HTTP::Tiny->new->request('POST', $url, {
  content => join("&", @params),
  headers => { 'content-type' => 'application/x-www-form-urlencoded' }
});

print "$response->{status} $response->{reason}\n";

print $response->{content};

 view all matches for this distribution


HTTP-Tinyish

 view release on metacpan or  search on metacpan

lib/HTTP/Tinyish/Base.pm  view on Meta::CPAN

sub internal_error {
    my($self, $url, $message) = @_;

    return {
        content => $message,
        headers => { "content-length" => length($message), "content-type" => "text/plain" },
        reason  => "Internal Exception",
        status  => 599,
        success => "",
        url     => $url,
    };

 view all matches for this distribution


HTTP-WebTest

 view release on metacpan or  search on metacpan

lib/HTTP/WebTest/Plugin/SetRequest.pm  view on Meta::CPAN


    # set request method (with default GET)
    if(defined $method) {
	if($method =~ /^POST$/i) {
	    $request->method('POST');
	    # ensure correct default value for content-type header
	    $request->header(Content_Type =>
			     'application/x-www-form-urlencoded');
	} else {
	    $request->method('GET');
	}

 view all matches for this distribution


HTTP-XSHeaders

 view release on metacpan or  search on metacpan

lib/HTTP/XSHeaders.pm  view on Meta::CPAN

    HTTP::Date::str2time($old);
}

sub content_type {
    my $self = shift;
    my $ct   = $self->header('content-type');
    $self->header('content-type', shift) if @_;
    $ct = $ct->[0] if ref($ct) eq 'ARRAY';
    return '' unless defined($ct) && length($ct);
    my @ct = split( /;\s*/, $ct, 2 );
    for ( $ct[0] ) {
        s/\s+//g;

lib/HTTP/XSHeaders.pm  view on Meta::CPAN

    return @res;
}

sub content_type_charset {
    my $self = shift;
    my $h = $self->header('content-type');
    $h = $h->[0] if ref($h);
    $h = "" unless defined $h;
    my @v = _split_header_words($h);
    if (@v) {
        my($ct, undef, %ct_param) = @{$v[0]};

 view all matches for this distribution


Haineko

 view release on metacpan or  search on metacpan

lib/Haineko/SMTPD/Relay/AmazonSES.pm  view on Meta::CPAN

        'timeout' => $self->{'timeout'},
        'ssl_opts' => { 'SSL_verify_mode' => 0 },
        'headers' => [
            'date' => $datestring,
            'host' => SES_ENDPOINT,
            'content-type' => 'application/x-www-form-urlencoded',
            'if-ssl-cert-subject' => sprintf( "/CN=%s", SES_ENDPOINT ),
            'x-amzn-authorization' => sprintf( "AWS3-HTTPS %s", $authheader ),
        ],
    };
    my $httpclient = Furl->new( %$methodargv );

 view all matches for this distribution


HiD

 view release on metacpan or  search on metacpan

t/jekyll_test_source/_layouts/default.html  view on Meta::CPAN

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   <title>{{ page.title }}</title>
   <meta name="author" content="<%= @page.author %>" />

   <!-- CodeRay syntax highlighting CSS -->
   <link rel="stylesheet" href="/css/coderay.css" type="text/css" />

 view all matches for this distribution


Hopkins-Plugin-HMI

 view release on metacpan or  search on metacpan

share/root/wrapper.tt  view on Meta::CPAN


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>hopkins HMI[% IF page.title %] - [% page.title %][% END %]</title>

		<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
		<meta name="description" content="hopkins HMI" />
		<meta name="robots" content="index, follow, noarchive" />
		<meta name="googlebot" content="noarchive" />
		[% IF 0 && page.refresh %]
		<meta http-equiv="refresh" content="[% page.refresh %];url=[% c.req.uri %]" />

 view all matches for this distribution


Horris

 view release on metacpan or  search on metacpan

lib/Horris/Connection/Plugin/PeekURL.pm  view on Meta::CPAN

                        channel => $msg->channel,
                        message => "Request failed: $headers->{Reason} ($headers->{Status})",
                    });
                    return;
                }
                @ct = split(/\s*,\s*/, $headers->{'content-type'});
                if (grep { /^image\/.+$/i } @ct) {
                    $ct = 1;
                } elsif ( grep { !/^text\/.+$/i } @ct) {
                    # otherwise it's something we don't know about.
                    # don't spend the time and memory to load this guy

 view all matches for this distribution


Hubot-Scripts-Bundle

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.1.9    Mon Jul 21 13:42:23 2014 KST
    - update dzil profile
    - added jira web hook event listner
    - updated readme
    - added <3 script
    - using content-type application/json

0.1.8    Fri Feb 14 01:46:35 2014 KST
    - [bugzilla] speak quicksearch url
    - [githubissue] added
    - perltidy all scripts

 view all matches for this distribution


Hubot

 view release on metacpan or  search on metacpan

lib/Hubot/Scripts/shorten.pm  view on Meta::CPAN

                )->get(
                sub {
                    my ( $body, $hdr ) = @_;
                    return if ( !$body || !$hdr->{Status} =~ /^2/ );

                    ## content-type
                    my @ct = split( /\s*,\s*/, $hdr->{'content-type'} );
                    if ( grep {/^image\/.+$/i} @ct || grep { !/text/i } @ct ) {
                        return $msg->send("[$ct[0]] - $bitly");
                    }

                    ### charset

 view all matches for this distribution


Hyper-Developer

 view release on metacpan or  search on metacpan

lib/Hyper/Developer/Server.pm  view on Meta::CPAN

    eval {
        my $svg = Hyper::Developer::Model::Viewer->new({
            for_class => $class,
        })->create_graph()->as_svg();
        print <<"EOT";
content-type:image/svg+xml

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"

lib/Hyper/Developer/Server.pm  view on Meta::CPAN

    my $namespace = $config->get_namespace();
    my $base_path = $config->get_base_path();

    eval {
        # Child
        print "content-type:text/html; charset=utf-8\n\n";
        my @flow_controls;
        my @container_controls;
        find(
            sub {
                m{.ini\Z} or return;

 view all matches for this distribution


Hypothesis-API

 view release on metacpan or  search on metacpan

lib/Hypothesis/API.pm  view on Meta::CPAN

    }
    
    my $data = $json->encode($payload_out);
    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
        'X-Annotator-Auth-Token' => $self->token, 
    );
    $self->ua->default_headers( $h );
    my $url = URI->new( "${\$self->api_url}/annotations" );

lib/Hypothesis/API.pm  view on Meta::CPAN

        warn "No id given to delete.\n";
        return 0;
    }
    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
        'X-Annotator-Auth-Token' => $self->token, 
    );
    $self->ua->default_headers( $h );
    my $url = URI->new( "${\$self->api_url}/annotations/$id" );

lib/Hypothesis/API.pm  view on Meta::CPAN

        return -1;
    }

    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
    );
    $self->ua->default_headers( $h );
    my $payload = {
        username => $self->username,

lib/Hypothesis/API.pm  view on Meta::CPAN

sub search {
    my ($self, $query, $page_size) = @_;

    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
    );
    if (not defined $query) {
        $query = {};
    }

lib/Hypothesis/API.pm  view on Meta::CPAN

    #
    my ($self, $query, $page_size) = @_;

    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
    );
    if (not defined $query) {
        $query = {};
    }

lib/Hypothesis/API.pm  view on Meta::CPAN

        die "Can only call update if given an id.";
    }
    my $data = $json->encode($payload);
    my $h = HTTP::Headers->new;
    $h->header(
        'content-type' => 'application/json;charset=UTF-8', 
        'x-csrf-token' => $self->csrf_token,
        'X-Annotator-Auth-Token' => $self->token, 
    );
    $self->ua->default_headers( $h );
    my $url = URI->new( "${\$self->api_url}/annotations/$id" );

 view all matches for this distribution


IDS-HTTP

 view release on metacpan or  search on metacpan

lib/IDS/DataSource/HTTP.pm  view on Meta::CPAN

	    # 14.12 Content-Language; simple and already handled by key+value
    'content-length'		=> 'IDS::DataSource::HTTP::Int',		# 14.13
	    # 14.14 Content-Location likely to be server->client
    'content-md5'		=> 'IDS::DataSource::HTTP::MD5',		# 14.15
	    # 14.16 Content-Range is server->client
    'content-type'		=> 'IDS::DataSource::HTTP::Accept',		# 14.17
    'date'			=> 'IDS::DataSource::HTTP::Date',		# 14.18
    'etag'			=> 'IDS::DataSource::HTTP::ETag',		# 14.19
    'expect'			=> 'IDS::DataSource::HTTP::Expectation',	# 14.20
    'expires'			=> 'IDS::DataSource::HTTP::Date',		# 14.21
    'from'			=> 'IDS::DataSource::HTTP::EmailAddr',	# 14.22

 view all matches for this distribution


IMAP-Client

 view release on metacpan or  search on metacpan

t/09annotations.t  view on Meta::CPAN


use IMAP::Client;

my $client = IMAP::Client->new;

my @getannotation_response = ('* ANNOTATION "user.emailj" "/vendor/cmu/cyrus-imapd/lastupdate" ("value.shared" "19-Sep-2006 12:51:07 -0400" "content-type.shared" "text/plain" "size.shared" "26")'."\r\n",
'* ANNOTATION "user.emailj" "/vendor/cmu/cyrus-imapd/size" ("value.shared" "4424" "content-type.shared" "text/plain" "size.shared" "4")'."\r\n",
'* ANNOTATION "user.emailj" "/vendor/cmu/cyrus-imapd/partition" ("value.shared" "default" "content-type.shared" "text/plain" "size.shared" "7")'."\r\n",
'* ANNOTATION "user.emailj" "/vendor/cmu/cyrus-imapd/server" ("value.shared" "imapbackend.server1.com" "content-type.shared" "text/plain" "size.shared" "23")'."\r\n",
'. OK Completed'."\r\n",);

my %resp = IMAP::Client::parse_annotation(\@getannotation_response ,'user.emailj',$client);

is (scalar (keys %resp), 1);

 view all matches for this distribution


IO-HTML

 view release on metacpan or  search on metacpan

lib/IO/HTML.pm  view on Meta::CPAN

      } # Skip comment
      elsif (m!\G<meta(?=[\x09\x0A\x0C\x0D /])!gic) {
        my ($got_pragma, $need_pragma, $charset);

        while (my ($name, $value) = &_get_attribute) {
          if ($name eq 'http-equiv' and $value eq 'content-type') {
            $got_pragma = 1;
          } elsif ($name eq 'content' and not defined $charset) {
            $need_pragma = $expect_pragma
                if defined($charset = _get_charset_from_meta($value));
          } elsif ($name eq 'charset') {

 view all matches for this distribution


IO-HyCon

 view release on metacpan or  search on metacpan

lib/IO/HyCon.html  view on Meta::CPAN

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:support@citrusperl.org" />
</head>

<body>

 view all matches for this distribution


IO-Moose

 view release on metacpan or  search on metacpan

html/lib/IO/Moose.html  view on Meta::CPAN

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>IO::Moose - Reimplementation of IO::* with improvements</title>
<link rel="stylesheet" href="../../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:support@ActiveState.com" />
</head>

<body>
<table border="0" width="100%" cellspacing="0" cellpadding="3">

 view all matches for this distribution


( run in 0.535 second using v1.01-cache-2.11-cpan-0d8aa00de5b )