@@ -2807,10 +2807,44 @@ consideration for the security consequences. New exceptions can be proposed by
2807
2807
<a href=https://github.com/whatwg/fetch/issues/new>filing an issue</a> .
2808
2808
2809
2809
2810
+ <h3 id=content-length-header>`<code>Content-Length</code>` header</h3>
2811
+
2812
+ <p> The `<code> Content-Length</code> ` header is largely defined in HTTP. Its processing model is
2813
+ defined here as the model defined in HTTP is not compatible with web content. [[HTTP]]
2814
+
2815
+ <p> To <dfn export for="header list" lt="extract a length|extracting a length">extract a length</dfn>
2816
+ from a <a for=/>header list</a> <var> headers</var> , run these steps:
2817
+
2818
+ <ol>
2819
+ <li><p> Let <var> values</var> be the result of
2820
+ <a for="header list">getting, decoding, and splitting</a> `<code> Content-Length</code> ` from
2821
+ <var> headers</var> .
2822
+
2823
+ <li><p> If <var> values</var> is null, then return null.
2824
+
2825
+ <li><p> Let <var> candidateValue</var> be null.
2826
+
2827
+ <li>
2828
+ <p> <a for=list>For each</a> <var> value</var> of <var> values</var> :
2829
+
2830
+ <ol>
2831
+ <li><p> If <var> candidateValue</var> is null, then set <var> candidateValue</var> to
2832
+ <var> value</var> .
2833
+
2834
+ <li><p> Otherwise, if <var> value</var> is not <var> candidateValue</var> , then return failure.
2835
+ </ol>
2836
+
2837
+ <li><p> If <var> candidateValue</var> is the empty string or has a <a for=/>code point</a> that is
2838
+ not an <a for=/>ASCII digit</a> , then return null.
2839
+
2840
+ <li><p> Return <var> candidateValue</var> , interpreted as decimal number.
2841
+ </ol>
2842
+
2843
+
2810
2844
<h3 id=content-type-header>`<code>Content-Type</code>` header</h3>
2811
2845
2812
2846
<p> The `<code> Content-Type</code> ` header is largely defined in HTTP. Its processing model is
2813
- defined here as the ABNF defined in HTTP is not compatible with web content. [[HTTP]]
2847
+ defined here as the model defined in HTTP is not compatible with web content. [[HTTP]]
2814
2848
2815
2849
<p> To
2816
2850
<dfn export for="header list" lt="extract a MIME type|extracting a MIME type" id=concept-header-extract-mime-type>extract a MIME type</dfn>
0 commit comments