view release on metacpan or search on metacpan
lib/EveOnline/SSO/Client.pm view on Meta::CPAN
$body = $json->encode( $params );
$request->content( $body );
}
$request->header( 'content-type' => 'application/json; charset=UTF-8' );
$request->header( 'content-length' => length( $body ) );
$request->header( 'X-User-Agent' => $self->x_user_agent );
$request->header( 'Authorization' => 'Bearer ' . $self->token );
return 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Excel/ValueWriter/XLSX.pm view on Meta::CPAN
my @tables_xml
= map {qq{ <Override PartName="/xl/tables/table$_.xml" ContentType="$spreadsheetml.table+xml"/>}} 1 .. $self->n_tables;
my @xml = (
qq{<?xml version="1.0" encoding="UTF-8" standalone="yes"?>},
qq{<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">},
qq{<Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>},
qq{<Default Extension="xml" ContentType="application/xml"/>},
qq{<Override PartName="/xl/workbook.xml" ContentType="$spreadsheetml.sheet.main+xml"/>},
qq{<Override PartName="/xl/styles.xml" ContentType="$spreadsheetml.styles+xml"/>},
qq{<Override PartName="/xl/sharedStrings.xml" ContentType="$spreadsheetml.sharedStrings+xml"/>},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Excel/Writer/XLSX/Package/ContentTypes.pm view on Meta::CPAN
#
sub _add_vba_project {
my $self = shift;
# Change the workbook.xml content-type from xlsx to xlsm.
for my $aref ( @{ $self->{_overrides} } ) {
if ( $aref->[0] eq '/xl/workbook.xml' ) {
$aref->[1] = 'application/vnd.ms-excel.sheet.macroEnabled.main+xml';
}
}
lib/Excel/Writer/XLSX/Package/ContentTypes.pm view on Meta::CPAN
# Write the <Types> element.
#
sub _write_types {
my $self = shift;
my $xmlns = 'http://schemas.openxmlformats.org/package/2006/content-types';
my @attributes = ( 'xmlns' => $xmlns, );
$self->xml_start_tag( 'Types', @attributes );
}
view all matches for this distribution
view release on metacpan or search on metacpan
public/javascripts/vendor/jquery/jquery-1.7.2.min.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
view release on metacpan or search on metacpan
bin/fb3_to_fb2.pl view on Meta::CPAN
$Img->{NewId} = $ImgRels{$Img->{'Id'}} = $NewImgId;
next if exists $ImgReverse{$NewImgId}; #иногда опиÑÐ°Ð½Ð¸Ñ ÐºÐ°ÑÑинок ÑовпадаÑÑ. напÑÐ¸Ð¼ÐµÑ Ð¾Ð±Ð»Ð¾Ð¶ÐºÐ° залеÑÐ°ÐµÑ Ð´Ð²Ð°Ð¶Ð´Ñ Ð¸Ð· опиÑаний
$ImgReverse{$NewImgId} = 1;
push @FB2ImgXML, '<binary content-type="'.$ImgType.'" id="'.$NewImgId.'">'.MIME::Base64::encode($ImgContent).'</binary>';
}
#ÑабоÑаем Ñ DESCRIPTION
my $DescrXML = $FB3Package->PartContents($DescrRelsPartName);
my $xc = XML::LibXML::XPathContext->new($Parser->parse_string($DescrXML));
view all matches for this distribution
view release on metacpan or search on metacpan
share/FictionBook.xsd view on Meta::CPAN
<xs:documentation>Any binary data that is required for the presentation of this book in base64 format. Currently only images are used.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:base64Binary">
<xs:attribute name="content-type" type="xs:string" use="required"/>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FCGI/Buffer.pm view on Meta::CPAN
my $self = shift;
my $headers = shift;
foreach my $header (split(/\r?\n/, $headers)) {
my ($header_name, $header_value) = split /\:\s*/, $header, 2;
if (lc($header_name) eq 'content-type') {
my @content_type = split /\//, $header_value, 2;
$self->{content_type} = \@content_type;
return;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FCGI/IIS.pm view on Meta::CPAN
With this mode eval is used instead of the do operator. Slower run time, but allows
you to trap errors.
=item perl -MFCGI::IIS=evalhead
With this mode eval is used instead of the do operator, also the content-type
text/html header is returned first. Allowing you to trap wrong header errors.
=item perl -MFCGI::IIS=do
This is the default mode, and will be called if no arguments are given, i.e.
view all matches for this distribution
view release on metacpan or search on metacpan
log_write(sprintf "%.0fms%s %s-%s %d-%s\n", $proc_ms,
$REQ->{trace_nsql} ?
sprintf ' (sql %.0f+%.0fms, %d/%d/%d)',
($REQ->{trace_sqlexec}||0)*1000, ($REQ->{trace_sqlprep}||0)*1000,
$REQ->{trace_nsqldirect}||0, $REQ->{trace_nsqlprep}||0, $REQ->{trace_nsql} : '',
$REQ->{status}, ($REQ->{reshdr}{'content-type'}//'-') =~ s/;.+$//r,
length($REQ->{resbody}), substr($REQ->{reshdr}{'content-encoding'}//'r', 0, 1)
) if FU::debug || $proc_ms > (FU::log_slow_reqs||1e10);
}
_getfield $FU::REQ->{cookie}, @_;
}
sub json {
shift;
fu->error(400, "Invalid content type for json") if (fu->header('content-type')||'') !~ m{^application/json(?:;\s*charset=utf-?8)?$}i;
return FU::Util::utf8_decode(my $x = $FU::REQ->{body}) if !@_;
$FU::REQ->{json} ||= eval {
FU::Util::json_parse($FU::REQ->{body}, utf8 => 1)
} || fu->error(400, "JSON parse error: $@");
_getfield $FU::REQ->{json}, @_;
}
sub formdata {
shift;
fu->error(400, "Invalid content type for form data") if (fu->header('content-type')||'') ne 'application/x-www-form-urlencoded';
return FU::Util::utf8_decode(my $x = $FU::REQ->{body}) if !@_;
$FU::REQ->{formdata} ||= eval {
FU::Util::query_decode($FU::REQ->{body});
} || fu->error(400, $@);
_getfield $FU::REQ->{formdata}, @_;
}
sub multipart {
require FU::MultipartFormData;
$FU::REQ->{multipart} ||= eval {
FU::MultipartFormData->parse(fu->header('content-type')||'', $FU::REQ->{body})
} || fu->error(400, $@);
}
sub reset {
fu->status(200);
fu->set_body('');
$FU::REQ->{reshdr} = {
'content-type', 'text/html',
};
delete $FU::REQ->{rescookie};
}
}
$FU::REQ->{rescookie}{$name} = $c;
}
sub send_json($, $data) {
fu->set_header('content-type', 'application/json');
fu->set_body(FU::Util::json_format($data, canonical => 1, utf8 => 1));
fu->done;
}
sub send_file($, $root, $path) {
local $/=undef;
my $body = <$fh>;
$ctype ||= substr($body, 0, 1024) =~ /[\x00-\x08\x0e-\x1f]/ ? 'application/octet-stream' : 'text/plain';
fu->set_body($body);
}
fu->set_header('content-type', $ctype);
fu->done;
}
sub redirect($, $code, $location) {
state $alias = {qw/ perm 301 temp 302 tempget 303 tempsame 307 permsame 308 /};
fu->status($alias->{$code} // $code);
fu->set_header(location => "$location");
fu->set_header('content-type', 'text/plain');
fu->set_body("Redirecting to $location\n");
fu->done;
}
sub _error_page($, $code, $title, $msg) {
fu->add_header('set-cookie', $_) for $r->{rescookie} ? sort values $r->{rescookie}->%* : ();
if ($r->{status} == 204 || $r->{status} == 304) {
delete $r->{reshdr}{'content-length'};
delete $r->{reshdr}{'content-encoding'};
delete $r->{reshdr}{'content-type'};
$r->{resbody} = '';
} else {
my @vary = ref $r->{reshdr}{vary} eq 'ARRAY' ? $r->{reshdr}{vary}->@* : defined $r->{reshdr}{vary} ? ($r->{reshdr}{vary}) : ();
if (($hasgzip || $hasbrotli) && length($r->{resbody}) > 256
&& !defined $r->{reshdr}{'content-encoding'}
&& FU::compress_mimes->{$r->{reshdr}{'content-type'}}
) {
push @vary, 'accept-encoding';
if ($hasbrotli && ($r->{hdr}{'accept-encoding'}||'') =~ /\bbr\b/) {
$r->{resbody_orig} = $r->{resbody};
$r->{resbody} = FU::Util::brotli_compress(6, $r->{resbody});
$r->{reshdr}{vary} = @vary ? join ', ', @vary : undef;
$r->{reshdr}{'content-length'} = length $r->{resbody};
$r->{resbody} = '' if (fu->method//'') eq 'HEAD';
}
$r->{reshdr}{'content-type'} .= '; charset=UTF-8' if FU::utf8_mimes->{ $r->{reshdr}{'content-type'}||'' };
}
sub _flush($, $sock) {
_finalize;
This method loads the entire file contents in memory and does not support range
requests, so DO NOT use it to send large files. Actual web servers are much
more efficient at serving static files.
The content-type header is determined from the file extension in C<$path>,
using the configured C<FU::mime_types>. As fallback, files that look like they
might be text get C<text/plain> and binary files are served with
C<application/octet-stream>.
This method sets an appropriate C<last-modified> header and supports
view all matches for this distribution
view release on metacpan or search on metacpan
t/004_response/01_basic.t view on Meta::CPAN
subtest 'accessor' => sub {
my $headers = [
'etag',
'"a376a57cb3a4bd3a3c6a53fca06b0fd5badee50b"',
'content-type',
'text/javascript; charset=UTF-8',
'pragma',
'no-cache',
'access-control-allow-origin',
'*',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Farabi/files/public/assets/codemirror/addon/hint/html-hint.js view on Meta::CPAN
meta: {
attrs: {
content: null,
charset: charsets,
name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
"http-equiv": ["content-language", "content-type", "default-style", "refresh"]
}
},
meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
nav: s,
noframes: s,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Feersum/Connection.pm view on Meta::CPAN
an array of headers if form of [name, value, name, value, ...]
normalization_style is one of:
0 - skip normalization (default)
HEADER_NORM_LOCASE - "content-type"
HEADER_NORM_UPCASE - "CONTENT-TYPE"
HEADER_NORM_LOCASE_DASH - "content_type"
HEADER_NORM_UPCASE_DASH - "CONTENT_TYPE" (like PSGI, but without "HTTP_" prefix)
One can export these constants via c<<use Feersum 'HEADER_NORM_LOCASE'>>
=item C<< my $value = $req->header(name) >>
simple lookup for header value, name should be in lowercase, eg. 'content-type'
=item C<< my $env = $req->remote_address >>
remote address (psgi REMOTE_ADDR)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Fetch/Image.pm view on Meta::CPAN
my $head = $ua->head( $url );
$head->is_error && Exception::Simple->throw("transfer error");
exists( $self->{'config'}->{'allowed_types'}->{ $head->header('content-type') } )
|| Exception::Simple->throw("invalid content-type");
if (
$head->header('content-length')
&& ( $head->header('content-length') > $self->{'config'}->{'max_filesize'} )
){
view all matches for this distribution
view release on metacpan or search on metacpan
lib/File/HTTP.pod view on Meta::CPAN
If set to follow redirections, $request_headers and $response_headers
will correspond to the last emitted request.
=item post URL TYPE BODY
Similar to C<get> but with a post request, with a content-type,and a body.
Always ignore redirections.
=item open_at URL OFFSET
Similar to to C<open>, but with an offset. It is more efficient than using
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>File::Log - A simple Object Orientated Logger</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
view release on metacpan or search on metacpan
"pread"/"pwrite" via "IO::FD") will need to be performed to set the
position for correct IO operation.
Each cached entry contains a "USER" field, which allows the user to
store associated meta data with the entry. For example this could be
used to store pre rendered HTTP headers (content-type, content-length,
etag, modification headers, etc), which only need to be computed when
the file was opened.
Note this module is tuned for performance rather than nice programming
style. Thus fields within a cache entry are accessible by their position
view all matches for this distribution
view release on metacpan or search on metacpan
script/rsybak view on Meta::CPAN
# return $self->request('POST', $url, {
# %$args,
# content => $self->www_form_urlencode($data),
# headers => {
# %$headers,
# 'content-type' => 'application/x-www-form-urlencoded'
# },
# }
# );
#}
#
script/rsybak 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}) : () ),
# };
# }
script/rsybak view on Meta::CPAN
# $request->{headers}{'connection'} = "close"
# unless $self->{keep_alive};
#
# if ( defined $args->{content} ) {
# if (ref $args->{content} eq 'CODE') {
# $request->{headers}{'content-type'} ||= "application/octet-stream";
# $request->{headers}{'transfer-encoding'} = 'chunked'
# unless $request->{headers}{'content-length'}
# || $request->{headers}{'transfer-encoding'};
# $request->{cb} = $args->{content};
# }
script/rsybak 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, '' };
# }
script/rsybak view on Meta::CPAN
# }
# my %headers = (
# "x-riap-v" => $self->{riap_version},
# "x-riap-action" => $action,
# "x-riap-fmt" => "json",
# "content-type" => "application/json",
# );
# my $args = $extra->{args} // {};
# for (keys %$extra) {
# next if /\Aargs\z/;
# $headers{"x-riap-$_"} = $extra->{$_};
script/rsybak view on Meta::CPAN
# headers => \%headers,
# content => $json->encode($args),
# });
# return [500, "Network error: $htres->{status} - $htres->{reason}"]
# if $htres->{status} != 200;
# return [500, "Server error: didn't return JSON (".$htres->{headers}{'content-type'}.")"]
# unless $htres->{headers}{'content-type'} eq 'application/json';
# return [500, "Server error: didn't return Riap 1.1 response (".$htres->{headers}{'x-riap-v'}.")"]
# unless $htres->{headers}{'x-riap-v'} =~ /\A1\.1(\.\d+)?\z/;
# $res = $json->decode($htres->{content});
# } else {
# return [501, "Unsupported scheme or bad URL '$url'"];
view all matches for this distribution
view release on metacpan or search on metacpan
html/SortedSeek.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>SortedSeek.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:" />
</head>
<body>
<table border="0" width="100%" cellspacing="0" cellpadding="3">
view all matches for this distribution
view release on metacpan or search on metacpan
README.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>File::Takeput - Slurp style file IO with locking.</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body>
view all matches for this distribution
view release on metacpan or search on metacpan
t/02-maintenance.html view on Meta::CPAN
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="content-language" content="de"/>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" media="screen,projection,print" href="/iob3/common/css/main.css" />
<link rel="stylesheet" type="text/css" media="screen,projection,print" href="/iob3/common/css/formular.css" />
<!--[if gte IE 5]>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Finance/CoinbasePro/Lite.pm view on Meta::CPAN
(content => $body) x !!defined($body),
};
my $res = $self->{_http}->request($method, $url, $options);
if ($res->{headers}{'content-type'} =~ m!application/json!) {
$res->{content} = $self->{_json}->decode($res->{content});
}
log_trace("API response [%s]: %s", $time, $res->{content});
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/page-2022-02-26.html view on Meta::CPAN
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Finance/GDAX/Lite.pm view on Meta::CPAN
$res->{content} =~ s/\R/ /g;
$res->{reason} .= ": $res->{content}";
undef $res->{content};
}
if ($res->{headers}{'content-type'} =~ m!application/json!) {
$res->{content} = $self->{_json}->decode($res->{content});
log_trace("API response [%s]: JSON: %s", $time, $res->{content});
} else {
log_trace("API response [%s]: non-JSON: %s", $time, $res->{content});
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Finance/Quote/ASX.pm view on Meta::CPAN
$error = "Unable to fetch data from the ASX server '$url'. Status: " . $response->status_line;
### ASX.pm Error: $error
return $status, $error, undef;
}
if ($response->header('content-type') !~ m|application/json|i) {
$status = 0;
$error = "Invalid content-type from ASX server '$url'. Expected: application/json, received: " . $response->header('content-type');
### ASX.pm Error: $error
return $status, $error, undef;
}
$json = $response->content;
view all matches for this distribution
view release on metacpan or search on metacpan
FirstGoodURL.pm view on Meta::CPAN
sub import { $ua ||= LWP::UserAgent->new }
sub with {
my $class = shift;
carp "no content-type or status given" if not @_;
$status = { 200 => 1 };
$ctype = {};
(/\D/ ? $ctype->{$_} : $status->{$_}) = $_ for @_;
view all matches for this distribution
view release on metacpan or search on metacpan
doc/code.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">
<title>FLAP - Flash Remoting in Perl</title>
<style>
body {
scrollbar-3d-light-color: #000000;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Flea.pm view on Meta::CPAN
your app, because it will still behave if you mount your app somewhere other
than C</>.
=head2 json($str)
Returns a full C<200 OK>, C<content-type application/json; charset=UTF-8>
response. Pass it something that JSON::encode_json can turn into a string.
=head2 text($str)
text/plain; charset=UTF-8.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Flickr/API/Request.pm view on Meta::CPAN
=head1 DESCRIPTION
This object encapsulates a request to the Flickr API.
C<Flickr::API::Request> is a subclass of L<HTTP::Request>, so you can access
any of the request parameters and tweak them yourself. The content, content-type
header and content-length header are all built from the 'args' list by the
C<Flickr::API::execute_request()> method.
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Flickr/API2/Request.pm view on Meta::CPAN
=head1 DESCRIPTION
This object encapsulates a request to the Flickr API.
C<Flickr::API2::Request> is a subclass of C<HTTP::Request>, so you can access
any of the request parameters and tweak them yourself. The content, content-type
header and content-length header are all built from the 'args' list by the
C<Flickr::API2::execute_request()> method.
=head1 METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
public/assets/js/jquery.js view on Meta::CPAN
}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223
}catch(e){}return false
},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");
return xhr.status==304||xhrRes==jQuery.lastModified[url]
}catch(e){}return false
},httpData:function(xhr,type,s){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"
}if(s&&s.dataFilter){data=s.dataFilter(data,type)
}if(typeof data==="string"){if(type=="script"){jQuery.globalEval(data)
}if(type=="json"){data=window["eval"]("("+data+")")
}}return data
view all matches for this distribution