@@ -1502,6 +1502,18 @@ is an error in decompression,
invoked.</p>
<p>The <em>name</em> may be <ttclass="docutils literal"><spanclass="pre">NULL</span></tt> if the <em>namelen</em> is 0. The same thing
can be said about the <em>value</em>.</p>
<p>Please note that nghttp2 library does not perform any validity
check against the <em>name</em> and the <em>value</em>. For example, the
<em>namelen</em> could be 0, and/or the <em>value</em> contains <ttclass="docutils literal"><spanclass="pre">0x0a</span></tt> or
<ttclass="docutils literal"><spanclass="pre">0x0d</span></tt>. The application must check them if it matters. The
helper function <aclass="reference internal"href="#nghttp2_check_header_name"title="nghttp2_check_header_name"><ttclass="xref c c-func docutils literal"><spanclass="pre">nghttp2_check_header_name()</span></tt></a> and
<aclass="reference internal"href="#nghttp2_check_header_value"title="nghttp2_check_header_value"><ttclass="xref c c-func docutils literal"><spanclass="pre">nghttp2_check_header_value()</span></tt></a> provide simple validation against
HTTP2 header field construction rule.</p>
<p>One more thing to note is that the <em>value</em> may contain <ttclass="docutils literal"><spanclass="pre">NULL</span></tt>
(<ttclass="docutils literal"><spanclass="pre">0x00</span></tt>) characters. It is used to concatenate header values
which share the same header field name. The application should
split these values if it wants to get individual value. This
concatenation is used in order to keep the ordering of headers.</p>
<p>If the application uses <aclass="reference internal"href="#nghttp2_session_mem_recv"title="nghttp2_session_mem_recv"><ttclass="xref c c-func docutils literal"><spanclass="pre">nghttp2_session_mem_recv()</span></tt></a>, it can return
<aclass="reference internal"href="#NGHTTP2_ERR_PAUSE"title="NGHTTP2_ERR_PAUSE"><ttclass="xref c c-macro docutils literal"><spanclass="pre">NGHTTP2_ERR_PAUSE</span></tt></a> to make <aclass="reference internal"href="#nghttp2_session_mem_recv"title="nghttp2_session_mem_recv"><ttclass="xref c c-func docutils literal"><spanclass="pre">nghttp2_session_mem_recv()</span></tt></a>
return without processing further input bytes. The memory pointed
...
...
@@ -2532,6 +2544,26 @@ int <tt class="descname">nghttp2_is_fatal</tt><big>(</big>int<em> lib_error
<em>lib_error</em> is fatal.</p>
</dd></dl>
<dlclass="function">
<dtid="nghttp2_check_header_name">
int <ttclass="descname">nghttp2_check_header_name</tt><big>(</big>const uint8_t<em> *name</em>, size_t<em> len</em><big>)</big><aclass="headerlink"href="#nghttp2_check_header_name"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns nonzero if HTTP header field name <em>name</em> of length <em>len</em> is
<p>Because this is a header field name in HTTP2, the upper cased alphabet
is treated as error.</p>
</dd></dl>
<dlclass="function">
<dtid="nghttp2_check_header_value">
int <ttclass="descname">nghttp2_check_header_value</tt><big>(</big>const uint8_t<em> *value</em>, size_t<em> len</em><big>)</big><aclass="headerlink"href="#nghttp2_check_header_value"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns nonzero if HTTP header field value <em>value</em> of length <em>len</em>