mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
525 lines
30 KiB
HTML
525 lines
30 KiB
HTML
<!doctype html>
|
|
<html class="default no-js">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>util/HeaderUtil | Community Solid Server</title>
|
|
<meta name="description" content="Documentation for Community Solid Server">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="../assets/css/main.css">
|
|
<script async src="../assets/js/search.js" id="search-script"></script>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="tsd-page-toolbar">
|
|
<div class="container">
|
|
<div class="table-wrap">
|
|
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
|
<div class="field">
|
|
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
<input id="tsd-search-field" type="text" />
|
|
</div>
|
|
<ul class="results">
|
|
<li class="state loading">Preparing search index...</li>
|
|
<li class="state failure">The search index is not available</li>
|
|
</ul>
|
|
<a href="../index.html" class="title">Community Solid Server</a>
|
|
</div>
|
|
<div class="table-cell" id="tsd-widgets">
|
|
<div id="tsd-filter">
|
|
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
<div class="tsd-filter-group">
|
|
<div class="tsd-select" id="tsd-filter-visibility">
|
|
<span class="tsd-select-label">All</span>
|
|
<ul class="tsd-select-list">
|
|
<li data-value="public">Public</li>
|
|
<li data-value="protected">Public/Protected</li>
|
|
<li data-value="private" class="selected">All</li>
|
|
</ul>
|
|
</div>
|
|
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
<input type="checkbox" id="tsd-filter-externals" checked />
|
|
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
|
</div>
|
|
</div>
|
|
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tsd-page-title">
|
|
<div class="container">
|
|
<ul class="tsd-breadcrumb">
|
|
<li>
|
|
<a href="../modules.html">Community Solid Server</a>
|
|
</li>
|
|
<li>
|
|
<a href="util_headerutil.html">util/HeaderUtil</a>
|
|
</li>
|
|
</ul>
|
|
<h1>Module util/HeaderUtil</h1>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="container container-main">
|
|
<div class="row">
|
|
<div class="col-8 col-content">
|
|
<section class="tsd-panel-group tsd-index-group">
|
|
<h2>Index</h2>
|
|
<section class="tsd-panel tsd-index-panel">
|
|
<div class="tsd-index-content">
|
|
<section class="tsd-index-section ">
|
|
<h3>Interfaces</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/util_headerutil.accept.html" class="tsd-kind-icon">Accept</a></li>
|
|
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/util_headerutil.acceptcharset.html" class="tsd-kind-icon">Accept<wbr>Charset</a></li>
|
|
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/util_headerutil.acceptencoding.html" class="tsd-kind-icon">Accept<wbr>Encoding</a></li>
|
|
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/util_headerutil.acceptheader.html" class="tsd-kind-icon">Accept<wbr>Header</a></li>
|
|
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/util_headerutil.acceptlanguage.html" class="tsd-kind-icon">Accept<wbr>Language</a></li>
|
|
<li class="tsd-kind-interface tsd-parent-kind-module"><a href="../interfaces/util_headerutil.forwarded.html" class="tsd-kind-icon">Forwarded</a></li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-index-section ">
|
|
<h3>Functions</h3>
|
|
<ul class="tsd-index-list">
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#addheader" class="tsd-kind-icon">add<wbr>Header</a></li>
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#parseaccept" class="tsd-kind-icon">parse<wbr>Accept</a></li>
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#parseacceptcharset" class="tsd-kind-icon">parse<wbr>Accept<wbr>Charset</a></li>
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#parseacceptencoding" class="tsd-kind-icon">parse<wbr>Accept<wbr>Encoding</a></li>
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#parseacceptlanguage" class="tsd-kind-icon">parse<wbr>Accept<wbr>Language</a></li>
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#parseforwarded" class="tsd-kind-icon">parse<wbr>Forwarded</a></li>
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#parseparameters" class="tsd-kind-icon">parse<wbr>Parameters</a></li>
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#splitandclean" class="tsd-kind-icon">split<wbr>And<wbr>Clean</a></li>
|
|
<li class="tsd-kind-function tsd-parent-kind-module"><a href="util_headerutil.html#transformquotedstrings" class="tsd-kind-icon">transform<wbr>Quoted<wbr>Strings</a></li>
|
|
</ul>
|
|
</section>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<section class="tsd-panel-group tsd-member-group ">
|
|
<h2>Functions</h2>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="addheader" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> add<wbr>Header</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">add<wbr>Header<span class="tsd-signature-symbol">(</span>response<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ServerResponse</span>, name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L363">src/util/HeaderUtil.ts:363</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Adds a header value without overriding previous values.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>response: <span class="tsd-signature-type">ServerResponse</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>name: <span class="tsd-signature-type">string</span></h5>
|
|
</li>
|
|
<li>
|
|
<h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="parseaccept" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> parse<wbr>Accept</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">parse<wbr>Accept<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/util_headerutil.accept.html" class="tsd-signature-type" data-tsd-kind="Interface">Accept</a><span class="tsd-signature-symbol">[]</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L282">src/util/HeaderUtil.ts:282</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Parses an Accept header string.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>throws</dt>
|
|
<dd><p><a href="../classes/util_errors_badrequesthttperror.badrequesthttperror.html">BadRequestHttpError</a>
|
|
Thrown on invalid header syntax.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>input: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>The Accept header string.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="../interfaces/util_headerutil.accept.html" class="tsd-signature-type" data-tsd-kind="Interface">Accept</a><span class="tsd-signature-symbol">[]</span></h4>
|
|
<p>An array of <a href="../interfaces/util_headerutil.accept.html">Accept</a> objects, sorted by weight.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="parseacceptcharset" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> parse<wbr>Accept<wbr>Charset</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">parse<wbr>Accept<wbr>Charset<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/util_headerutil.acceptcharset.html" class="tsd-signature-type" data-tsd-kind="Interface">AcceptCharset</a><span class="tsd-signature-symbol">[]</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L300">src/util/HeaderUtil.ts:300</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Parses an Accept-Charset header string.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>throws</dt>
|
|
<dd><p><a href="../classes/util_errors_badrequesthttperror.badrequesthttperror.html">BadRequestHttpError</a>
|
|
Thrown on invalid header syntax.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>input: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>The Accept-Charset header string.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="../interfaces/util_headerutil.acceptcharset.html" class="tsd-signature-type" data-tsd-kind="Interface">AcceptCharset</a><span class="tsd-signature-symbol">[]</span></h4>
|
|
<p>An array of <a href="../interfaces/util_headerutil.acceptcharset.html">AcceptCharset</a> objects, sorted by weight.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="parseacceptencoding" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> parse<wbr>Accept<wbr>Encoding</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">parse<wbr>Accept<wbr>Encoding<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/util_headerutil.acceptencoding.html" class="tsd-signature-type" data-tsd-kind="Interface">AcceptEncoding</a><span class="tsd-signature-symbol">[]</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L323">src/util/HeaderUtil.ts:323</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Parses an Accept-Encoding header string.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>throws</dt>
|
|
<dd><p><a href="../classes/util_errors_badrequesthttperror.badrequesthttperror.html">BadRequestHttpError</a>
|
|
Thrown on invalid header syntax.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>input: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>The Accept-Encoding header string.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="../interfaces/util_headerutil.acceptencoding.html" class="tsd-signature-type" data-tsd-kind="Interface">AcceptEncoding</a><span class="tsd-signature-symbol">[]</span></h4>
|
|
<p>An array of <a href="../interfaces/util_headerutil.acceptencoding.html">AcceptEncoding</a> objects, sorted by weight.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="parseacceptlanguage" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> parse<wbr>Accept<wbr>Language</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">parse<wbr>Accept<wbr>Language<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/util_headerutil.acceptlanguage.html" class="tsd-signature-type" data-tsd-kind="Interface">AcceptLanguage</a><span class="tsd-signature-symbol">[]</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L344">src/util/HeaderUtil.ts:344</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Parses an Accept-Language header string.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>throws</dt>
|
|
<dd><p><a href="../classes/util_errors_badrequesthttperror.badrequesthttperror.html">BadRequestHttpError</a>
|
|
Thrown on invalid header syntax.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>input: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>The Accept-Language header string.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="../interfaces/util_headerutil.acceptlanguage.html" class="tsd-signature-type" data-tsd-kind="Interface">AcceptLanguage</a><span class="tsd-signature-symbol">[]</span></h4>
|
|
<p>An array of <a href="../interfaces/util_headerutil.acceptlanguage.html">AcceptLanguage</a> objects, sorted by weight.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="parseforwarded" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> parse<wbr>Forwarded</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">parse<wbr>Forwarded<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/util_headerutil.forwarded.html" class="tsd-signature-type" data-tsd-kind="Interface">Forwarded</a></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L403">src/util/HeaderUtil.ts:403</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Parses a Forwarded header value.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ''</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>The Forwarded header value.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <a href="../interfaces/util_headerutil.forwarded.html" class="tsd-signature-type" data-tsd-kind="Interface">Forwarded</a></h4>
|
|
<p>The parsed Forwarded header.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="parseparameters" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> parse<wbr>Parameters</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">parse<wbr>Parameters<span class="tsd-signature-symbol">(</span>parameters<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, replacements<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L162">src/util/HeaderUtil.ts:162</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Parses a list of split parameters and checks their validity.</p>
|
|
</div>
|
|
<dl class="tsd-comment-tags">
|
|
<dt>throws</dt>
|
|
<dd><p><a href="../classes/util_errors_badrequesthttperror.badrequesthttperror.html">BadRequestHttpError</a>
|
|
Thrown on invalid parameter syntax.</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>parameters: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>A list of split parameters (token [ "=" ( token / quoted-string ) ])</p>
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<h5>replacements: <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>The double quoted strings that need to be replaced.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
<p>An array of name/value objects corresponding to the parameters.</p>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="splitandclean" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> split<wbr>And<wbr>Clean</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">split<wbr>And<wbr>Clean<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L128">src/util/HeaderUtil.ts:128</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Splits the input string on commas, trims all parts and filters out empty ones.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>input: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>Input header string.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-module">
|
|
<a name="transformquotedstrings" class="tsd-anchor"></a>
|
|
<h3><span class="tsd-flag ts-flagConst">Const</span> transform<wbr>Quoted<wbr>Strings</h3>
|
|
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-module">
|
|
<li class="tsd-signature tsd-kind-icon">transform<wbr>Quoted<wbr>Strings<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>replacements<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>result<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></li>
|
|
</ul>
|
|
<ul class="tsd-descriptions">
|
|
<li class="tsd-description">
|
|
<aside class="tsd-sources">
|
|
<ul>
|
|
<li>Defined in <a href="https://github.com/solid/community-server/blob/4df11c1/src/util/HeaderUtil.ts#L106">src/util/HeaderUtil.ts:106</a></li>
|
|
</ul>
|
|
</aside>
|
|
<div class="tsd-comment tsd-typography">
|
|
<div class="lead">
|
|
<p>Replaces all double quoted strings in the input string with <code>"0"</code>, <code>"1"</code>, etc.</p>
|
|
</div>
|
|
</div>
|
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
<ul class="tsd-parameters">
|
|
<li>
|
|
<h5>input: <span class="tsd-signature-type">string</span></h5>
|
|
<div class="tsd-comment tsd-typography">
|
|
<p>The Accept header string.</p>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>replacements<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>result<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> }</span></h4>
|
|
<p>The transformed string and a map with keys <code>"0"</code>, etc. and values the original string that was there.</p>
|
|
<ul class="tsd-parameters">
|
|
<li class="tsd-parameter">
|
|
<h5>replacements<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h5>
|
|
</li>
|
|
<li class="tsd-parameter">
|
|
<h5>result<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
<nav class="tsd-navigation primary">
|
|
<ul>
|
|
<li class=" ">
|
|
<a href="../modules.html">Exports</a>
|
|
</li>
|
|
<li class="current tsd-kind-module">
|
|
<a href="util_headerutil.html">util/<wbr>Header<wbr>Util</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
<ul class="before-current">
|
|
<li class=" tsd-kind-interface tsd-parent-kind-module">
|
|
<a href="../interfaces/util_headerutil.accept.html" class="tsd-kind-icon">Accept</a>
|
|
</li>
|
|
<li class=" tsd-kind-interface tsd-parent-kind-module">
|
|
<a href="../interfaces/util_headerutil.acceptcharset.html" class="tsd-kind-icon">Accept<wbr>Charset</a>
|
|
</li>
|
|
<li class=" tsd-kind-interface tsd-parent-kind-module">
|
|
<a href="../interfaces/util_headerutil.acceptencoding.html" class="tsd-kind-icon">Accept<wbr>Encoding</a>
|
|
</li>
|
|
<li class=" tsd-kind-interface tsd-parent-kind-module">
|
|
<a href="../interfaces/util_headerutil.acceptheader.html" class="tsd-kind-icon">Accept<wbr>Header</a>
|
|
</li>
|
|
<li class=" tsd-kind-interface tsd-parent-kind-module">
|
|
<a href="../interfaces/util_headerutil.acceptlanguage.html" class="tsd-kind-icon">Accept<wbr>Language</a>
|
|
</li>
|
|
<li class=" tsd-kind-interface tsd-parent-kind-module">
|
|
<a href="../interfaces/util_headerutil.forwarded.html" class="tsd-kind-icon">Forwarded</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#addheader" class="tsd-kind-icon">add<wbr>Header</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#parseaccept" class="tsd-kind-icon">parse<wbr>Accept</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#parseacceptcharset" class="tsd-kind-icon">parse<wbr>Accept<wbr>Charset</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#parseacceptencoding" class="tsd-kind-icon">parse<wbr>Accept<wbr>Encoding</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#parseacceptlanguage" class="tsd-kind-icon">parse<wbr>Accept<wbr>Language</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#parseforwarded" class="tsd-kind-icon">parse<wbr>Forwarded</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#parseparameters" class="tsd-kind-icon">parse<wbr>Parameters</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#splitandclean" class="tsd-kind-icon">split<wbr>And<wbr>Clean</a>
|
|
</li>
|
|
<li class=" tsd-kind-function tsd-parent-kind-module">
|
|
<a href="util_headerutil.html#transformquotedstrings" class="tsd-kind-icon">transform<wbr>Quoted<wbr>Strings</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
<div class="container">
|
|
<h2>Legend</h2>
|
|
<div class="tsd-legend-group">
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<div class="overlay"></div>
|
|
<script src="../assets/js/main.js"></script>
|
|
</body>
|
|
</html> |