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


CPAN-Testers-ParseReport

 view release on metacpan or  search on metacpan

t/ctgetreports.t  view on Meta::CPAN

          (
           "t/var/nntp-testers/$id",
           $dumpvars,
           %Opt,
          );
    is $extract->{'fail:t/20-content-types.t'}, 1;
}

{
    BEGIN {
        $plan += 2;

 view all matches for this distribution


CPAN-Testers-WWW-Admin

 view release on metacpan or  search on metacpan

vhost/html/index.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-US" lang="en-US">

<head>
<title>CPAN Testers Administration System</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="refresh" content="0;url=/cgi-bin/pages.cgi" />
</head>

<body>
<p>1..2...1..2...check...check

 view all matches for this distribution


CPAN-Testers-WWW-Blog

 view release on metacpan or  search on metacpan

vhost/html/js/tiny_mce/plugins/fullpage/js/fullpage.js  view on Meta::CPAN

			selectByValue(f, 'metarobots', tinymce.trim(va), true, true);
			return;
		}

		switch (eq.toLowerCase()) {
			case "content-type":
				tmp = getReItem(/charset\s*=\s*(.*)\s*/gi, va, 1);

				// Override XML encoding
				if (tmp != "")
					xmlEnc = tmp;

 view all matches for this distribution


CPAN-Testers-WWW-Preferences

 view release on metacpan or  search on metacpan

vhost/html/index.html  view on Meta::CPAN

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb">
<head>
<title>The CPAN Testers Preferences Website</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="refresh" content="0;url=/cgi-bin/pages.cgi" />
</head>

<body>
<p>1..2...1..2...check...check

 view all matches for this distribution


CPAN-Testers-WWW-Reports

 view release on metacpan or  search on metacpan

vhost/html/index.html  view on Meta::CPAN

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb">
<head>
<title>CPAN Testers Reports</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="refresh" content="0;url=/cgi-bin/pages.cgi" />
</head>

<body>
<p>1..2...1..2...check...check

 view all matches for this distribution


CPAN-Testers-WWW-Wiki

 view release on metacpan or  search on metacpan

vhost/html/js/tiny_mce/plugins/fullpage/js/fullpage.js  view on Meta::CPAN

			selectByValue(f, 'metarobots', tinymce.trim(va), true, true);
			return;
		}

		switch (eq.toLowerCase()) {
			case "content-type":
				tmp = getReItem(/charset\s*=\s*(.*)\s*/gi, va, 1);

				// Override XML encoding
				if (tmp != "")
					xmlEnc = tmp;

 view all matches for this distribution


CPANPLUS-Shell-Wx

 view release on metacpan or  search on metacpan

html/Base.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>Base.pm</title>
<link rel="stylesheet" href="../html/docs.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

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

 view all matches for this distribution


CPANPLUS

 view release on metacpan or  search on metacpan

inc/bundle/HTTP/Tiny.pm  view on Meta::CPAN

#pod
#pod     $response = $http->post_form($url, $form_data);
#pod     $response = $http->post_form($url, $form_data, \%options);
#pod
#pod This method executes a C<POST> request and sends the key/value pairs from a
#pod form data hash or array reference to the given URL with a C<content-type> of
#pod C<application/x-www-form-urlencoded>.  If data is provided as an array
#pod reference, the order is preserved; if provided as a hash reference, the terms
#pod are sorted by key for consistency.  See documentation for the
#pod C<www_form_urlencode> method for details on the encoding.
#pod
#pod The URL must have unsafe characters escaped and international domain names
#pod encoded.  See C<request()> for valid options and a description of the response.
#pod Any C<content-type> header or content in the options hashref will be ignored.
#pod
#pod The C<success> field of the response will be true if the status code is 2XX.
#pod
#pod =cut

inc/bundle/HTTP/Tiny.pm  view on Meta::CPAN

            # normalized version below.
            %$args,
            content => $self->www_form_urlencode($data),
            headers => {
                %$headers,
                'content-type' => 'application/x-www-form-urlencoded'
            },
        }
    );
}

inc/bundle/HTTP/Tiny.pm  view on Meta::CPAN

#pod
#pod If the C<content> option is a code reference, it will be called iteratively
#pod to provide the content body of the request.  It should return the empty
#pod string or undef when the iterator is exhausted.
#pod
#pod If the C<content> option is the empty string, no C<content-type> or
#pod C<content-length> headers will be generated.
#pod
#pod If the C<data_callback> option is provided, it will be called iteratively until
#pod the entire response body is received.  The first argument will be a string
#pod containing a chunk of the response body, the second argument will be the

inc/bundle/HTTP/Tiny.pm  view on Meta::CPAN

            success => q{},
            status  => 599,
            reason  => 'Internal Exception',
            content => $e,
            headers => {
                'content-type'   => 'text/plain',
                'content-length' => length $e,
            },
            ( @{$args->{_redirects} || []} ? (redirects => delete $args->{_redirects}) : () ),
        };
    }

inc/bundle/HTTP/Tiny.pm  view on Meta::CPAN

        if ( ref $args->{content} eq 'CODE' ) {
            if ( exists $request->{'content-length'} && $request->{'content-length'} == 0 ) {
                $request->{cb} = sub { "" };
            }
            else {
                $request->{headers}{'content-type'} ||= "application/octet-stream";
                $request->{headers}{'transfer-encoding'} = 'chunked'
                  unless exists $request->{headers}{'content-length'}
                  || $request->{headers}{'transfer-encoding'};
                $request->{cb} = $args->{content};
            }

inc/bundle/HTTP/Tiny.pm  view on Meta::CPAN

            my $content = $args->{content};
            if ( $] ge '5.008' ) {
                utf8::downgrade($content, 1)
                    or die(qq/Wide character in request message body\n/);
            }
            $request->{headers}{'content-type'} ||= "application/octet-stream";
            $request->{headers}{'content-length'} = length $content
              unless $request->{headers}{'content-length'}
                  || $request->{headers}{'transfer-encoding'};
            $request->{cb} = sub { substr $content, 0, length $content, '' };
        }

inc/bundle/HTTP/Tiny.pm  view on Meta::CPAN


    $response = $http->post_form($url, $form_data);
    $response = $http->post_form($url, $form_data, \%options);

This method executes a C<POST> request and sends the key/value pairs from a
form data hash or array reference to the given URL with a C<content-type> of
C<application/x-www-form-urlencoded>.  If data is provided as an array
reference, the order is preserved; if provided as a hash reference, the terms
are sorted by key for consistency.  See documentation for the
C<www_form_urlencode> method for details on the encoding.

The URL must have unsafe characters escaped and international domain names
encoded.  See C<request()> for valid options and a description of the response.
Any C<content-type> header or content in the options hashref will be ignored.

The C<success> field of the response will be true if the status code is 2XX.

=head2 mirror

inc/bundle/HTTP/Tiny.pm  view on Meta::CPAN


If the C<content> option is a code reference, it will be called iteratively
to provide the content body of the request.  It should return the empty
string or undef when the iterator is exhausted.

If the C<content> option is the empty string, no C<content-type> or
C<content-length> headers will be generated.

If the C<data_callback> option is provided, it will be called iteratively until
the entire response body is received.  The first argument will be a string
containing a chunk of the response body, the second argument will be the

 view all matches for this distribution


CSS-Inliner

 view release on metacpan or  search on metacpan

lib/CSS/Inliner.pm  view on Meta::CPAN

treated as ASCII.

Input Parameters:
 content - scalar presumably containing both html and css
 charset - (optional) programmer specified charset for the passed content
 ctcharset - (optional) content-type specified charset for content retrieved via a url

=cut

sub detect_charset {
  my ($self,$params) = @_;

lib/CSS/Inliner.pm  view on Meta::CPAN


  my $meta_charset;
  if ($head) {
    # pull key header meta elements
    my $meta_charset_elem = $head->look_down('_tag','meta','charset',qr/./);
    my $meta_equiv_charset_elem = $head->look_down('_tag','meta','http-equiv',qr/content-type/i,'content',qr/./);

    # assign meta charset, we give precedence to meta http_equiv content type
    if ($meta_equiv_charset_elem) {
      my $meta_equiv_content = $meta_equiv_charset_elem->attr('content');

 view all matches for this distribution


CTKlib

 view release on metacpan or  search on metacpan

lib/CTK/Util.pm  view on Meta::CPAN

        Subject  => $subject, # to_base64($subject),
        Type     => $type,
        Encoding => 'base64',
        Data     => Encode::encode('UTF-8', $message)
    );
    $msg->attr('content-type.charset' => 'UTF-8');
    $msg->attr('Content-Transfer-Encoding' => 'base64');

    # Attaches
    if ($att) {
        if (ref($att) =~ /HASH/i) {

 view all matches for this distribution


CVS-Metrics

 view release on metacpan or  search on metacpan

bin/cgi_cvs_evolr  view on Meta::CPAN

                my $filename;
                if ($file->{state} eq 'dead') {
                    $filename = basename($file->{filename});
                }
                else {
                    $filename = "<a class='filename' href='" . $viewcvs . $module . $file->{filename} . "?rev=" . $file->{revision} . "\&content-type=text\%2Fplain\&root=cvs:" . $repository . "'>" . basename($file->{filename}) . "</a>";
                }
                push @files, {
                    filename    => $filename,
                    revision    => $file->{revision},
                    date        => $file->{date},

 view all matches for this distribution


CaCORE

 view release on metacpan or  search on metacpan

html/ApplicationService.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>CaCORE::ApplicationService</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>

<body style="background-color: white">

 view all matches for this distribution


Cache-KyotoTycoon

 view release on metacpan or  search on metacpan

lib/TSVRPC/Client.pm  view on Meta::CPAN

sub call {
    my ( $self, $method, $args, $req_encoding ) = @_;
    $req_encoding ||= 'B'; # default encoding is base64. because base64 is very fast.
    my $content      = TSVRPC::Parser::encode_tsvrpc($args, $req_encoding);
    my $furl = $self->{furl};
    my %special_headers = ('content-type' => undef);
    my ( $minor_version, $code, $msg, $headers, $body ) = $furl->request(
        url     => $self->{base} . $method,
        headers => [
            "Content-Type" => "text/tab-separated-values; colenc=$req_encoding",
            "Content-Length" => length($content),

lib/TSVRPC/Client.pm  view on Meta::CPAN

        method          => 'POST',
        content         => $content,
        special_headers => \%special_headers,
    );
    my $decoded_body;
    if (my $content_type = $special_headers{'content-type'}) {
        my $res_encoding = TSVRPC::Util::parse_content_type( $content_type );
        $decoded_body = defined($res_encoding) ? TSVRPC::Parser::decode_tsvrpc( $body, $res_encoding ) : undef;
    }
    return ($code, $decoded_body, $msg);
}

 view all matches for this distribution


CallBackery

 view release on metacpan or  search on metacpan

lib/CallBackery.pm  view on Meta::CPAN

has securityHeaders => sub { {
    # prevent click jacking
    'X-Frame-Options' => 'SAMEORIGIN',
    # some magic browser based anti xss action
    'X-XSS-Protection' => '1; mode=block',
    # the browser should obej the servers settings regarding content-type
    'X-Content-Type-Options' => 'nosniff',
    # do not store our data ever
    'Pragma' => 'private',
}};

 view all matches for this distribution


Captcha-Peoplesign

 view release on metacpan or  search on metacpan

examples/basic_example.pl  view on Meta::CPAN

            $h->meta({
                'http-equiv'    => 'expires',
                'content'       => '-1',
            }),
            $h->meta({
                'http-equiv'    => 'content-type',
                'content'       => 'text/html; charset=UTF-8',
            }),
            $h->title('Peoplesign Perl integration demo'),
        ]),
        $h->body([

 view all matches for this distribution


Captive-Portal

 view release on metacpan or  search on metacpan

static/orig/js/jquery.js  view on Meta::CPAN

/*! jQuery v1.7.2 jquery.com | jquery.org/license */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("ifram...
a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3]....
.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(argumen...

 view all matches for this distribution


Catalyst-Action-Fixup-XHTML

 view release on metacpan or  search on metacpan

t/live-test.t  view on Meta::CPAN

my $mech = Test::WWW::Mechanize::Catalyst->new;

# 2-4
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'text/html; charset=utf-8',
  'No Accept header = text/html';

$mech->add_header( Accept => 'text/html' );

# 5-7
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'text/html; charset=utf-8',
  'Accept header of text/html = text/html';

$mech->add_header( Accept => 'application/xhtml+xml' );

# 8-10
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'application/xhtml+xml; charset=utf-8',
  'Accept xhtml gives content type application/xhtml+xml';

# 11-13
$mech->get_ok('http://localhost/nothtml', 'get nothtml page');
$mech->content_like(qr/not html/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'application/json',
  'application/json is unmolested';

# 14-16
$mech->add_header( Accept => 'text/html, application/xhtml+xml');
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'application/xhtml+xml; charset=utf-8',
  'Accept xhtml AND html gives content type application/xhtml+xml';


# 17-19
$mech->add_header( Accept => 'text/html, application/xhtml+xml;q=0');
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'text/html; charset=utf-8',
  'Accept header of application/xhtml+xml with q value of 0 and text/html = text/html';

# 20-22
$mech->add_header( Accept => 'text/html;q=0, application/xhtml+xml');
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'application/xhtml+xml; charset=utf-8',
  'Accept html with a q value of 0 gives content type application/xhtml+xml';

# 23-25
$mech->add_header( Accept => '*/*');
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'text/html; charset=utf-8',
  'Accept */* content type text/html';

# 26-28
$mech->add_header( Accept => '*/*, application/xhtml+xml');
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
is $mech->response->headers->{'content-type'}, 'application/xhtml+xml; charset=utf-8',
  'Accept */* and application/xhtml+xml gives content type application/xhtml+xml';
 

 view all matches for this distribution


Catalyst-Action-REST

 view release on metacpan or  search on metacpan

lib/Catalyst/Action/Deserialize.pm  view on Meta::CPAN


=head1 DESCRIPTION

This action will deserialize HTTP POST, PUT, OPTIONS and DELETE requests.
It assumes that the body of the HTTP Request is a serialized object.
The serializer is selected by introspecting the requests content-type
header.

If you want deserialize any other HTTP method besides POST, PUT,
OPTIONS and DELETE you can do this by setting the
C<< deserialize_http_methods >> list via C<< action_args >>.

lib/Catalyst/Action/Deserialize.pm  view on Meta::CPAN

        }
    );

See also L<Catalyst::Controller/action_args>.

The specifics of deserializing each content-type is implemented as
a plugin to L<Catalyst::Action::Deserialize>.  You can see a list
of currently implemented plugins in L<Catalyst::Controller::REST>.

The results of your Deserializing will wind up in $c->req->data.
This is done through the magic of L<Catalyst::Request::REST>.

 view all matches for this distribution


Catalyst-Action-Serialize-SimpleExcel

 view release on metacpan or  search on metacpan

lib/Catalyst/Action/Serialize/SimpleExcel.pm  view on Meta::CPAN

In your javascript, to initiate a file download:

    // this uses jQuery
    function export_to_excel() {
        $('<iframe '
         +'src="/rest/books?content-type=application%2Fvnd.ms-excel">')
        .hide().appendTo('body');
    }

Note, the content-type query param is required if you're just linking to the
action. It tells L<Catalyst::Controller::REST> what you're serializing the data
as.

=head1 DESCRIPTION

 view all matches for this distribution


Catalyst-Action-Serialize-SimpleXLSX

 view release on metacpan or  search on metacpan

lib/Catalyst/Action/Serialize/SimpleXLSX.pm  view on Meta::CPAN


  <script>
  $(document).ready(function () {

  function export_to_excel() {
    $('<iframe ' + 'src="/item?content-type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">').hide().appendTo('body');
  }
  $("#books").on("click", export_to_excel);

  });
  </script>


Note, the content-type query param is required if you're just linking to the
action. It tells L<Catalyst::Controller::REST> what you're serializing the data
as.

=head1 DESCRIPTION

 view all matches for this distribution


Catalyst-ActionRole-Public

 view release on metacpan or  search on metacpan

lib/Catalyst/ActionRole/Public.pm  view on Meta::CPAN


  $ctx->stash(public_file => 
    (my $full_path = $ctx->config->{root}->file(@path_parts)));

  unless($self->path_is_allowed_content_type($full_path)) {
    $ctx->log->debug("File '$full_path' is not allowed content-type") if $ctx->debug;
    return 0;
  }
  
  if($self->is_real_file($full_path)) {
    $ctx->log->debug("Serving File: $full_path for action $self") if $ctx->debug;

 view all matches for this distribution


Catalyst-Controller-Imager

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Catalyst-Controller-Imager

0.06    2014-01-12
        * added a mocked $c->stash() method to make failing tests work again
        * stringified MIME content-type value to avoid errors in latest
          Catalyst version

0.05    2013-02-22
        * added the requested file path to the error message in case a file
          was not found [Alexander Kohsiek]

 view all matches for this distribution


Catalyst-Controller-SOAP

 view release on metacpan or  search on metacpan

lib/Catalyst/Action/SOAP.pm  view on Meta::CPAN

          };
          if ($@) {
              $c->stash->{soap}->fault({ code => 'SOAP-ENV:Client', reason => 'Bad XML Message', detail => $@});
          }
      } else {
          $c->stash->{soap}->fault({ code => 'SOAP-ENV:Client', reason => 'Bad content-type/method'});
      }
  }
};

1;

 view all matches for this distribution


Catalyst-Engine-XMPP2

 view release on metacpan or  search on metacpan

lib/Catalyst/Engine/XMPP2.pm  view on Meta::CPAN


=item Content-Type

XMPP has no support for MIME types. Every message is, by definition, a
XML document. So every request will have the "application/xml" MIME
type. If the response content-type is also "application/xml", it will
be written as raw into the XMPP stream. This will allow SOAP
responses, for instance, to be sent as in XEP-0072.

On the other hand, if the content type is of some other type, it will
be sent as literal string inside a <body> tag, as described by XMPP

 view all matches for this distribution


Catalyst-Model-REST

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.09    11 October 2010
 - Allow for no data to be sent
 - Include all methods, including DELETE

0.08    7 October 2010
 - *NB* The attribute "type" now uses the content-type, so valid values are
   application/json, application/xml, application/yaml.
   More may come if needed.

0.07    5 October 2010
 - Data::Serializable needs to be 0.40.1 for XML tests to pass

 view all matches for this distribution


Catalyst-Plugin-CustomErrorMessage

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/CustomErrorMessage.pm  view on Meta::CPAN

	use Catalyst qw( CustomErrorMessage );
	
	# optional (values in this example are the defaults)
	__PACKAGE__->config->{'custom-error-message'}->{'uri-for-not-found'} = '/';
	__PACKAGE__->config->{'custom-error-message'}->{'error-template'}    = 'error.tt2';
	__PACKAGE__->config->{'custom-error-message'}->{'content-type'}      = 'text/html; charset=utf-8';
	__PACKAGE__->config->{'custom-error-message'}->{'view-name'}         = 'TT';
	__PACKAGE__->config->{'custom-error-message'}->{'response-status'}   = 500;

=head1 DESCRIPTION

lib/Catalyst/Plugin/CustomErrorMessage.pm  view on Meta::CPAN


	$c->config->{'custom-error-message'}->{'view-name'} = 'Mason';

Content-type and response status can be configured via: 

	$c->config->{'custom-error-message'}->{'content-type'}    = 'text/plain; charset=utf-8';
	$c->config->{'custom-error-message'}->{'response-status'} = 500;

=cut

sub finalize_error {

lib/Catalyst/Plugin/CustomErrorMessage.pm  view on Meta::CPAN

	
	# render the template
	my $action_name = $c->action->reverse;
	$c->stash->{'finalize_error'} = $action_name.': '.$error;
	$c->response->content_type(
		$config->{'content-type'}
		||
		'text/html; charset=utf-8'
	);
	my $view_name = $config->{'view-name'} || 'TT';
	eval {

 view all matches for this distribution


Catalyst-Plugin-OpenIDConnect

 view release on metacpan or  search on metacpan

t/07_security_headers.t  view on Meta::CPAN

# HTTP/1.0 compatibility header required alongside Cache-Control
is( $headers->{'pragma'}, 'no-cache',
    'begin sets Pragma: no-cache' );

# Prevent MIME-type sniffing (MED-6)
is( $headers->{'x-content-type-options'}, 'nosniff',
    'begin sets X-Content-Type-Options: nosniff' );

# Clickjacking protection on the authorize endpoint (MED-6)
is( $headers->{'x-frame-options'}, 'DENY',
    'begin sets X-Frame-Options: DENY' );

t/07_security_headers.t  view on Meta::CPAN

is( $headers->{'content-security-policy'}, "frame-ancestors 'none'",
    "begin sets Content-Security-Policy: frame-ancestors 'none'" );

# Confirm all five expected headers are present (no extras silently swallowing them)
is( scalar( grep { defined $headers->{$_} }
        qw( cache-control pragma x-content-type-options
            x-frame-options content-security-policy ) ),
    5, 'All five security headers are set by begin()' );

done_testing();

 view all matches for this distribution


Catalyst-Plugin-PageCache

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.10    2005-09-13 14:00:00
        - Fixed bug in cache key generation that ignored duplicate key names.
        - Fixed bug where clear_cached_page called with a regex did not
          properly remove the page from cache.
        - Fixed bug where cache metadata was not set properly if
          content-type or content-encoding was missing.
        - Added test suite.
        - Code cleanup per Best Practices.

0.09    2005-06-27 11:25:00
        - Removed dependence on HTTP::Date.

 view all matches for this distribution


Catalyst-Plugin-ServeFile

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/ServeFile.pm  view on Meta::CPAN

  my $full_path = File::Spec->catfile($root, $file_proto);
  my $content_type = Plack::MIME->mime_type($full_path) || 'application/octet';

  if(my $allowed_content_types = $settings{allowed_content_types}) {
    unless(scalar( grep { lc($content_type) eq lc($_) } @$allowed_content_types)) {
      $c->log->debug("Static file has disallowed content-type of '$content_type'") if $c->debug;
      return;
    }
  }

  my ($fh, @stat) = $c->$get_asset_from_filesystem($full_path);

 view all matches for this distribution


Catalyst-Plugin-Session-CGISession

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/Session/CGISession.pm  view on Meta::CPAN


# QUESTIONS:
#
#
#   Shouldn't the body text rewrite in finalize be limited to
#       content-type qr{text/x?html} ?
#
#   Should extracting embedded session ids from paths be conditional
#       on {rewrite}?  That is, we shouldn't do it unless allowed
#       by config.
#

 view all matches for this distribution


( run in 3.274 seconds using v1.01-cache-2.11-cpan-800906f7e73 )