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


Jemplate

 view release on metacpan or  search on metacpan

lib/Jemplate/Runtime.pm  view on Meta::CPAN

        if (hdrName != null) {
          this._headers[this._headers.length] = {h:hdrName, v:hdrValue};
          switch (hdrName.toLowerCase()) {
            case 'content-encoding': gotContentEncoding = true; break;
            case 'content-length'  : gotContentLength   = true; break;
            case 'content-type'    : gotContentType     = true; break;
            case 'date'            : gotDate            = true; break;
            case 'expires'         : gotExpiration      = true; break;
            case 'last-modified'   : gotLastModified    = true; break;
          }
        }

 view all matches for this distribution


Jifty

 view release on metacpan or  search on metacpan

lib/Jifty/I18N.pm  view on Meta::CPAN

=head2 promote_encoding STRING [CONTENT-TYPE]

Return STRING promoted to our best-guess of an appropriate
encoding. STRING should B<not> have the UTF-8 flag set when passed in.

Optionally, you can pass a MIME content-type string as a second
argument. If it contains a charset= parameter, we will use that
encoding. Failing that, we use Encode::Guess to guess between UTF-8
and iso-latin-1. If that fails, and the string validates as UTF-8, we
assume that. Finally, we fall back on returning the string as is.

 view all matches for this distribution


Juno

 view release on metacpan or  search on metacpan

t/check/http.t  view on Meta::CPAN


    my $exp_body = $goodbody;
    my %results  = (
          'cache-control' => 'max-age=0',
          'connection'    => 'Keep-Alive',
          'content-type'  => 'text/html',
          'HTTPVersion'   => '1.0',
    );

    if ( $type eq 'fail' ) {
        $exp_body = $badbody;

 view all matches for this distribution


KSx-IndexManager

 view release on metacpan or  search on metacpan

eg/us_constitution/amend1.html  view on Meta::CPAN

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>
    <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
    <link rel="stylesheet" type="text/css" href="uscon.css">
    <title>Amendment I</title>
  </head>

  <body>

 view all matches for this distribution


Kelp-Module-YAML

 view release on metacpan or  search on metacpan

lib/Kelp/Module/YAML/KelpExtensions.pm  view on Meta::CPAN

{
	my ($self, $expected, $test_name) = @_;
	local $Test::Builder::Level = $Test::Builder::Level + 1;

	$test_name ||= "YAML structure matches";
	like $self->res->header('content-type'), qr/yaml/, 'Content-Type is YAML'
		or return $self;
	my $json = $self->yaml_content;
	cmp_deeply($json, $expected, $test_name) or diag explain $json;
	return $self;
}

 view all matches for this distribution


Kelp

 view release on metacpan or  search on metacpan

lib/Kelp/Request.pm  view on Meta::CPAN

attr -charset => sub {
    my $self = shift;

    return undef unless $self->content_type;
    return undef unless $self->content_type =~ m{
        ^(?:                  # only on some content-types
            text/ | application/
        )
        .+
        ;\s*charset=([^;\$]+) # get the charset
    }xi;

 view all matches for this distribution


Keystone-Resolver

 view release on metacpan or  search on metacpan

lib/Keystone/Resolver/Utils.pm  view on Meta::CPAN

Because the Apache/Perl project people saw fit to totally change the
API between C<mod_perl> versions 1 and 2, and because the environment
variables that might tell you what version is in use are undocumented
and obscure, it is pretty painful getting hold of the Apache request
object in a portable way -- which you need for things like setting the
content-type.  C<apache_request()> does this, returning the Apache 1
or 2 request object if running under Apache, and otherwise returning
the fallback object which is passed in, if any.

=cut

 view all matches for this distribution


KinoSearch

 view release on metacpan or  search on metacpan

sample/us_constitution/index.html  view on Meta::CPAN

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="uscon.css">
    <title>US Constitution</title>
  </head>

  <body>

 view all matches for this distribution


KinoSearch1

 view release on metacpan or  search on metacpan

t/us_constitution/amend1.html  view on Meta::CPAN

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

  <head>
    <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
    <link rel="stylesheet" type="text/css" href="uscon.css">
    <title>Amendment I</title>
  </head>

  <body>

 view all matches for this distribution


KiokuDB-Navigator

 view release on metacpan or  search on metacpan

share/js/jquery-1.2.6.js  view on Meta::CPAN

		} catch(e){}
		return false;
	},

	httpData: function( xhr, type, filter ) {
		var ct = xhr.getResponseHeader("content-type"),
			xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
			data = xml ? xhr.responseXML : xhr.responseText;

		if ( xml && data.documentElement.tagName == "parsererror" )
			throw "parsererror";

 view all matches for this distribution


Klonk

 view release on metacpan or  search on metacpan

lib/Klonk/Routes.pm  view on Meta::CPAN

                ? -s $body || undef
                : length $body;
            return [
                $status,
                [
                    'content-type' => $type,
                    defined $length
                        ? ('content-length' => $length)
                        : (),
                    map {
                        my $k = $_;

 view all matches for this distribution


Koha-Contrib-Tamil

 view release on metacpan or  search on metacpan

lib/Koha/Contrib/Tamil/Overdue.pm  view on Meta::CPAN

        my $content = $self->tx->render($template , $context);
        $content =~ s/&#39;/'/g; #FIXME: why?
        my $letter = {
            title => $cycle->{title},
            content => $content,
            'content-type' => $has_email ? 'text/plain; charset="UTF-8"' : 'text/html; charset="UTF-8"', 
        };
        if ( $self->verbose ) {
            say $letter->{title}, ": borrower #", $borr->{borrowernumber}, " ",
                $borr->{surname}, " ", $borr->{firstname};
        }

 view all matches for this distribution


Konstrukt

 view release on metacpan or  search on metacpan

lib/Konstrukt/Handler/Apache.pm  view on Meta::CPAN

		if (MODPERL == 1) { #weird...
			$request->header_out($field => $headers->{$field});
		} else {
			$request->headers_out->add($field => $headers->{$field});
		}
		#special case for content-type and content-encoding, which have to be defined explicitly
		if ($field eq 'Content-Type') {
			$request->content_type($headers->{$field});
		} elsif ($field eq 'Content-Encoding') {
			$request->content_encoding($headers->{$field});
		}

 view all matches for this distribution


Kossy

 view release on metacpan or  search on metacpan

lib/Kossy.pm  view on Meta::CPAN

    sub {
        my $env = shift;
        $Kossy::Response::SECURITY_HEADER = $security_header_local;
        try {
            my $header = bless {
                'content-type' => 'text/html; charset=UTF-8',
                $security_header_local ? ('x-frame-options' => 'DENY') : (),
            }, 'HTTP::Headers::Fast';
            my $c = Kossy::Connection->new({
                tx => $tx,
                req => Kossy::Request->new($env),

 view all matches for this distribution


Kwiki-RecentChangesRSS

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


date: 2004/07/17 16:55:24;  author: peregrin;  state: Exp;  lines: +4 -1
turned off warnings of redefined content_type subroutine

date: 2004/07/17 00:02:09;  author: peregrin;  state: Exp;  lines: +35 -20
minor code layout changes, better content-type override, ack ingy

date: 2004/07/15 17:01:59;  author: peregrin;  state: Exp;  lines: +100 -13
required and optional channel elments, with POD

date: 2004/07/15 15:56:40;  author: peregrin;  state: Exp;  lines: +14 -24

 view all matches for this distribution


LEOCHARRE-HTML-Text

 view release on metacpan or  search on metacpan

t/bbc.html  view on Meta::CPAN

<meta name="OriginalPublicationDate" content="2008/11/14 20:04:00" />

    <meta name="UKFS_URL" content="/2/hi/default.stm" />
    <meta name="IFS_URL" content="/2/hi/default.stm" />

<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />

<link href="http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml" rel="alternate" type="application/rss+xml" title="BBC NEWS | News Front Page" />
<link href="/2/low/default.stm" rel="alternate" type="text/html" title="Low Graphics" />

<!-- IFS V4 index_fp -->

 view all matches for this distribution


LLM-API

 view release on metacpan or  search on metacpan

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


  die "ERROR: usage: send_prompt(array-ref)\n"
    if !ref $content || reftype($content) ne 'ARRAY';

  my $req = {
    headers => $self->headers( 'content-type' => 'application/json' ),
    content => encode_json(
      { model    => $self->get_model,
        messages => [
          { role    => $self->get_role,
            content => $content,

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


  die "ERROR: usage: send_prompt(array-ref)\n"
    if !ref $content || reftype($content) ne 'ARRAY';

  my $req = {
    headers => $self->headers( 'content-type' => 'application/json' ),
    content => encode_json(
      { model      => $self->get_model,
        max_tokens => $self->get_max_tokens,
        messages   => [
          { role    => $self->get_role,

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

See L<https://platform.claude.com/docs/en/api/admin/cost_report/retrieve> for more detail.

=head2 headers

    my $headers = $llm->headers;
    my $headers = $llm->headers( 'content-type' => 'application/json' );

Builds and returns a hash reference of HTTP request headers. Always includes
the x-api-key and anthropic-version headers. Additional header key-value pairs
may be supplied as a flat list and are merged into the returned hash.

 view all matches for this distribution


LWP-ConsoleLogger

 view release on metacpan or  search on metacpan

t/test-data/unicode.html  view on Meta::CPAN

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  </head>
  <body>
    😄
  </body>
</html>

 view all matches for this distribution


LWP-JSON-Tiny

 view release on metacpan or  search on metacpan

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

     {
         self_destruct_mechanism   => 'disabled',
         users_allowed_to_override => [],
     }
 );
 # Request content is JSON-encoded, and the content-type is set.

=head1 DESCRIPTION

This is a simple subclass of HTTP::Request that does two things.
First of all, it sets the Accept header to C<application/json> as soon

 view all matches for this distribution


LWP-MediaTypes

 view release on metacpan or  search on metacpan

lib/LWP/MediaTypes.pm  view on Meta::CPAN

	if (exists $suffixEncoding{lc $_}) {
	    unshift(@encoding, $suffixEncoding{lc $_});
	    next;
	}

	# check content-type
	if (exists $suffixType{$_}) {
	    $ct = $suffixType{$_};
	    last;
	}
	if (exists $suffixType{lc $_}) {

 view all matches for this distribution


LWP-Simple-Post

 view release on metacpan or  search on metacpan

lib/LWP/Simple/Post.pm  view on Meta::CPAN

=head2 post_xml

 my $content = post_xml( string $url, string $data );

Having written this module, it turned out that 99% of what I needed it
for required a content-type of C<text/xml>. This does exactly what C<post>
does, only the content-type header is set to C<text/html>.	

=cut

sub post_xml {
	my ( $url, $data ) = @_;

 view all matches for this distribution


LWP-UserAgent-msgraph

 view release on metacpan or  search on metacpan

lib/LWP/UserAgent/msgraph.pm  view on Meta::CPAN


   #Response code is a keeper
   $self->{code}=$res->code;

   if ($res->is_success) {
      if ($res->header('content-type') =~ /^application\/json/) {
         
         my $data=from_json($res->decoded_content);

         #Here we save the nextLink for further use
         if (exists $data->{'@odata.nextLink'}) {

 view all matches for this distribution


LWPx-Profile

 view release on metacpan or  search on metacpan

t/lwpx-profile.tape  view on Meta::CPAN

                                                          'accept-ranges' => 'none',
                                                          'client-peer' => '74.125.225.16:80',
                                                          'alternate-protocol' => '80:quic,p=0.08',
                                                          'vary' => 'Accept-Encoding',
                                                          'date' => 'Thu, 19 Feb 2015 15:09:55 GMT',
                                                          'content-type' => 'text/html; charset=ISO-8859-1',
                                                          'client-response-num' => 1,
                                                          'expires' => '-1',
                                                          'x-meta-description' => 'Search the world\'s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you\'re looking for.',
                                                          'title' => 'Google',
                                                          '::std_case' => {

t/lwpx-profile.tape  view on Meta::CPAN

                                                          'cache-control' => 'private, max-age=0',
                                                          'server' => 'gws',
                                                          'x-meta-robots' => 'noodp',
                                                          'x-xss-protection' => '1; mode=block',
                                                          'x-frame-options' => 'SAMEORIGIN',
                                                          'content-type' => 'text/html; charset=ISO-8859-1',
                                                          'client-response-num' => 1,
                                                          'vary' => 'Accept-Encoding',
                                                          'date' => 'Thu, 19 Feb 2015 15:09:55 GMT',
                                                          'expires' => '-1',
                                                          'x-meta-description' => 'Search the world\'s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you\'re looking for.',

t/lwpx-profile.tape  view on Meta::CPAN

                                                          'x-meta-description' => 'Search the world\'s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you\'re looking for.',
                                                          'expires' => '-1',
                                                          'date' => 'Thu, 19 Feb 2015 15:09:55 GMT',
                                                          'vary' => 'Accept-Encoding',
                                                          'client-response-num' => 1,
                                                          'content-type' => 'text/html; charset=ISO-8859-1',
                                                          'client-peer' => '74.125.225.16:80',
                                                          'alternate-protocol' => '80:quic,p=0.08',
                                                          'accept-ranges' => 'none',
                                                          'set-cookie' => [
                                                                            'PREF=ID=421e54fc3a1220ec:FF=0:TM=1424358595:LM=1424358595:S=vkkKNRlblQn2dpxq; expires=Sat, 18-Feb-2017 15:09:55 GMT; path=/; domain=.google.com',

t/lwpx-profile.tape  view on Meta::CPAN

                                                          'cache-control' => 'private, max-age=0',
                                                          'server' => 'gws',
                                                          'x-meta-robots' => 'noodp',
                                                          'x-xss-protection' => '1; mode=block',
                                                          'x-frame-options' => 'SAMEORIGIN',
                                                          'content-type' => 'text/html; charset=ISO-8859-1',
                                                          'client-response-num' => 1,
                                                          'vary' => 'Accept-Encoding',
                                                          'date' => 'Thu, 19 Feb 2015 15:09:55 GMT',
                                                          'expires' => '-1',
                                                          'x-meta-description' => 'Search the world\'s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you\'re looking for.',

t/lwpx-profile.tape  view on Meta::CPAN

                                                          'cache-control' => 'private, max-age=0',
                                                          'server' => 'gws',
                                                          'x-meta-robots' => 'noodp',
                                                          'date' => 'Thu, 19 Feb 2015 15:09:55 GMT',
                                                          'vary' => 'Accept-Encoding',
                                                          'content-type' => 'text/html; charset=ISO-8859-1',
                                                          'client-response-num' => 1,
                                                          'expires' => '-1',
                                                          'x-meta-description' => 'Search the world\'s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you\'re looking for.',
                                                          'accept-ranges' => 'none',
                                                          'client-peer' => '74.125.225.16:80',

t/lwpx-profile.tape  view on Meta::CPAN

                                                          'x-meta-description' => 'The Perl Programming Language at Perl.org. Links and other helpful resources for new and experienced Perl programmers.',
                                                          'x-proxy' => 'proxy2',
                                                          'vary' => 'Accept-Encoding',
                                                          'date' => 'Thu, 19 Feb 2015 15:09:56 GMT',
                                                          'client-response-num' => 1,
                                                          'content-type' => 'text/html; charset=utf-8',
                                                          'age' => '0',
                                                          'client-peer' => '108.161.188.196:80',
                                                          'via' => '1.1 varnish'
                                                        }, 'HTTP::Headers' ),
                                   '_msg' => 'OK'

 view all matches for this distribution


LaBrea-Tarpit

 view release on metacpan or  search on metacpan

Get/Get.pm  view on Meta::CPAN

  rc		 => 200
  msg		 => OK
  date		 => Wed, 24 Apr 2002 21:46:30 GMT
  server	 => Apache/1.3.22
  protocol	 => HTTP/1.1
  content-type	 => text/plain
  content-length => 92
  last-modified	 => Wed, 24 Apr 2002 21:46:34 GMT
  expires	 => Wed, 24 Apr 2002 21:47:04 GMT
  connection	 => close
  content	 => (complete text buffer)

Get/Get.pm  view on Meta::CPAN

	unless $buffer;
  
  return $rsp->{rc} . ' ' . $rsp->{msg}
	unless parse_http_response(\$buffer,$rsp);

  return 'invalid content-type ' . $rsp->{'content-type'}
	unless $rsp->{'content-type'} =~ m|text/plain|i;

  %$cnt = split(/[=\n]/,$rsp->{content});
  return 'invalid data in short response'
	unless	exists $cnt->{LaBrea} &&
		exists $cnt->{Tarpit} &&

 view all matches for this distribution


LaTeXML-Plugin-LtxMojo

 view release on metacpan or  search on metacpan

lib/LaTeXML/Plugin/LtxMojo.pm  view on Meta::CPAN

################################################
my $r = $app->routes;
$r->post('/convert' => sub {
  my $self = shift;
  my $type = $self->req->headers->header('x-file-type');
  if ($type && $type =~ 'zip' && ($self->req->headers->header('content-type') eq 'multipart/form-data')) {
    $self->convert_zip;
  } else {
    $self->convert_string;
  }
});

lib/LaTeXML/Plugin/LtxMojo.pm  view on Meta::CPAN


$r->post('/upload' => sub {
  my $self = shift;
  # TODO: Need a session?
  my $type = $self->req->headers->header('x-file-type');
  if ($type && $type =~ 'zip' && ($self->req->headers->header('content-type') eq 'multipart/form-data')) {
    $self->convert_zip;
  } else {
    #.tex , .sty , .jpg and so on - write to filesystem (when are we done?)
    $self->render(text=>"Uploaded, but ignored!");
  }

 view all matches for this distribution


LaTeXML

 view release on metacpan or  search on metacpan

lib/LaTeXML/resources/XSLT/LaTeXML-webpage-xhtml.xsl  view on Meta::CPAN


  <xsl:template match="/" mode="head">
    <xsl:text>&#x0A;</xsl:text>
    <xsl:element name="head" namespace="{$html_ns}">
      <xsl:apply-templates select="." mode="head-begin"/>
      <xsl:apply-templates select="." mode="head-content-type"/>
      <xsl:apply-templates select="." mode="head-title"/>
      <xsl:apply-templates select="." mode="head-generator-identifier"/>
      <xsl:apply-templates select="." mode="head-icon"/>
      <xsl:apply-templates select="." mode="head-resources"/>
      <xsl:apply-templates select="." mode="head-viewport"/>

lib/LaTeXML/resources/XSLT/LaTeXML-webpage-xhtml.xsl  view on Meta::CPAN

      <xsl:text>&#x0A;</xsl:text>
    </xsl:element>
  </xsl:template>

  <!-- Note: if you override the head-begin template in a plain HTML5 (non-XML)
       document, you must ensure that the content of the head-content-type
       declaration appears in full within the first 1024 bytes of the document,
       or the output will not comply with the HTML5 standard.
      -->
  <xsl:template match="/" mode="head-begin"/>
  <xsl:template match="/" mode="head-end"/>

lib/LaTeXML/resources/XSLT/LaTeXML-webpage-xhtml.xsl  view on Meta::CPAN

  <xsl:template match="/" mode="head-generator-identifier">
    <xsl:text>&#x0A;</xsl:text>
    <xsl:call-template name="LaTeXML_identifier"/>
  </xsl:template>

  <!-- Generate a meta indicating the content-type -->
  <xsl:template match="/" mode="head-content-type">
    <xsl:text>&#x0A;</xsl:text>
    <xsl:choose>
      <!-- HTML5 in XML syntax: content-type and charset not allowed -->
      <xsl:when test="$USE_NAMESPACES='true' and $USE_HTML5='true'" />
      <xsl:otherwise>
        <xsl:element name="meta" namespace="{$html_ns}">
          <!-- HTML(4|5) or XHTML1.1: content-type and charset -->
          <xsl:attribute name="http-equiv">content-type</xsl:attribute>
          <xsl:attribute name="content">
            <xsl:value-of select="f:if($USE_NAMESPACES,'application/xhtml+xml','text/html')"/>
            <xsl:text>; charset=UTF-8</xsl:text>
          </xsl:attribute>
        </xsl:element>

 view all matches for this distribution


Labyrinth-Demo

 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>[% iname %]</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


Langertha

 view release on metacpan or  search on metacpan

lib/Langertha/Engine/AnthropicBase.pm  view on Meta::CPAN



sub update_request {
  my ( $self, $request ) = @_;
  $request->header('x-api-key', $self->api_key);
  $request->header('content-type', 'application/json');
  $request->header('anthropic-version', $self->api_version);
}

sub default_model { croak "".(ref $_[0])." requires model to be set" }

 view all matches for this distribution


Language-LispPerl

 view release on metacpan or  search on metacpan

share/lisp/quoi/default_template.clp  view on Meta::CPAN

  (defmacro default-template [title xml]
    `(fn [S]
      #[html
      ^{:xmlns "http://www.w3.org/1999/xhtml"}
      #[head
         #[meta ^{:http-equiv "content-type" :content "text/html; charset=UTF-8"}]
         #[meta ^{:name "description" :content ""}]
         #[meta ^{:name "keywords" :content ""}]
         #[title ~title]
         #[script ^{:id "jquery"
                    :src "/javascripts/jquery-1.9.1.min.js"

 view all matches for this distribution


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