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
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
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
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
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
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
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/'/'/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
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
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
view release on metacpan or search on metacpan
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
view release on metacpan or search on metacpan
<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
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
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
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
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
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
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
view release on metacpan or search on metacpan
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)
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
view release on metacpan or search on metacpan
<?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>LaTeX::Easy::Templates - Easily format content into PDF/PS/DVI with LaTeX templates.</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:andreas@fedora.(none)" />
</head>
<body>
view all matches for this distribution
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
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>
</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>
</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>
</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>
</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
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
view release on metacpan or search on metacpan
lib/Langertha/Engine/Anthropic.pm view on Meta::CPAN
sub _build_api_version { '2023-06-01' }
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);
}
has '+url' => (
lazy => 1,
view all matches for this distribution
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
view release on metacpan or search on metacpan
site/htdocs/static/bwr/angular/angular.js view on Meta::CPAN
function serverRequest(config) {
var headers = config.headers;
var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
// strip content-type if data is undefined
if (isUndefined(reqData)) {
forEach(headers, function(value, header) {
if (lowercase(header) === 'content-type') {
delete headers[header];
}
});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lemonldap/NG/Portal/Main/Display.pm view on Meta::CPAN
}
##@method public void printImage(string file, string type)
# Print image to STDOUT
# @param $file The path to the file to print
# @param $type The content-type to use (ie: image/png)
# @return void
sub staticFile {
my ( $self, $req, $file, $type ) = @_;
require Plack::Util;
require Cwd;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Lemonldap/Portal/Script.pm view on Meta::CPAN
}
sub add_header {
my $self = shift;
my $_line = shift;
my %STORE = ( 'content-type' => 1, );
my %TEST_STORE = (
'location' => "%LOCATION%",
'set-cookie' => "%SETCOOKIE%",
);
view all matches for this distribution
view release on metacpan or search on metacpan
doc/html/Jemplate.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>Jemplate - JavaScript Templating with Template Toolkit</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@omen.apple.com" />
</head>
<body style="background-color: white">
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Leyland/Negotiator.pm view on Meta::CPAN
return $all_routes unless my $ct = $c->content_type;
# will hold all routes with acceptable receive types
my $routes = [];
# remove charset from content-type
if ($ct =~ m/^([^;]+)/) {
$ct = $1;
}
$c->log->debug("I have received $ct");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Limper/Engine/PSGI.pm view on Meta::CPAN
(request->{scheme}, request->{authority}, request->{path}, request->{query}, request->{fragment}) =
request->{uri} =~ m|(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?|; # from https://metacpan.org/pod/URI
request->{headers} = {};
request->{headers}{'content-length'} = $env->{CONTENT_LENGTH} if exists $env->{CONTENT_LENGTH};
request->{headers}{'content-type'} = $env->{CONTENT_TYPE} if exists $env->{CONTENT_TYPE};
for my $header (grep { /^HTTP_/ } keys %$env) {
my $name = lc $header;
$name =~ s/^http_//;
$name =~ s/_/-/g;
my @values = split /, /, $env->{$header};
view all matches for this distribution