@@ -745,11 +745,9 @@ http-related errors.</p>
745745which have multiple values are represented by multiple entries in this
746746list with the same key.</p >
747747<p >The tuple is a pair of the field key, represented as a string, and
748- Value, represented as a list of bytes. In a valid Fields, all keys
749- and values are valid UTF-8 strings. However, values are not always
750- well-formed, so they are represented as a raw list of bytes.</p >
751- <p >An error result will be returned if any header or value was
752- syntactically invalid, or if a header was forbidden.</p >
748+ Value, represented as a list of bytes.</p >
749+ <p >An error result will be returned if any <a href =" #field_key " ><code >field-key</code ></a > or <a href =" #field_value " ><code >field-value</code ></a > is
750+ syntactically invalid, or if a field is forbidden.</p >
753751<h5 >Params</h5 >
754752<ul >
755753<li ><a name =" static_fields.from_list.entries " ></a ><code >entries</code >: list< ; (<a href =" #field_key " ><a href =" #field_key " ><code >field-key</code ></a ></a >, <a href =" #field_value " ><a href =" #field_value " ><code >field-value</code ></a ></a >)> ; </li >
@@ -760,9 +758,9 @@ syntactically invalid, or if a header was forbidden.</p>
760758</ul >
761759<h4 ><a name =" method_fields.get " ></a ><code >[method]fields.get: func</code ></h4 >
762760<p >Get all of the values corresponding to a key. If the key is not present
763- in this <a href =" #fields " ><code >fields</code ></a >, an empty list is returned. However, if the key is
764- present but empty, this is represented by a list with one or more
765- empty field-values present.</p >
761+ in this <a href =" #fields " ><code >fields</code ></a > or is syntactically invalid , an empty list is returned.
762+ However, if the key is present but empty, this is represented by a list
763+ with one or more empty field-values present.</p >
766764<h5 >Params</h5 >
767765<ul >
768766<li ><a name =" method_fields.get.self " ></a ><code >self</code >: borrow< ; <a href =" #fields " ><a href =" #fields " ><code >fields</code ></a ></a >> ; </li >
@@ -788,6 +786,8 @@ syntactically invalid, <code>false</code> is returned.</p>
788786<p >Set all of the values for a key. Clears any existing values for that
789787key, if they have been set.</p >
790788<p >Fails with <code >header-error.immutable</code > if the <a href =" #fields " ><code >fields</code ></a > are immutable.</p >
789+ <p >Fails with <code >header-error.invalid-syntax</code > if the <a href =" #field_key " ><code >field-key</code ></a > or any of
790+ the <a href =" #field_value " ><code >field-value</code ></a >s are syntactically invalid.</p >
791791<h5 >Params</h5 >
792792<ul >
793793<li ><a name =" method_fields.set.self " ></a ><code >self</code >: borrow< ; <a href =" #fields " ><a href =" #fields " ><code >fields</code ></a ></a >> ; </li >
@@ -802,6 +802,8 @@ key, if they have been set.</p>
802802<p >Delete all values for a key. Does nothing if no values for the key
803803exist.</p >
804804<p >Fails with <code >header-error.immutable</code > if the <a href =" #fields " ><code >fields</code ></a > are immutable.</p >
805+ <p >Fails with <code >header-error.invalid-syntax</code > if the <a href =" #field_key " ><code >field-key</code ></a > is
806+ syntactically invalid.</p >
805807<h5 >Params</h5 >
806808<ul >
807809<li ><a name =" method_fields.delete.self " ></a ><code >self</code >: borrow< ; <a href =" #fields " ><a href =" #fields " ><code >fields</code ></a ></a >> ; </li >
@@ -815,6 +817,8 @@ exist.</p>
815817<p >Append a value for a key. Does not change or delete any existing
816818values for that key.</p >
817819<p >Fails with <code >header-error.immutable</code > if the <a href =" #fields " ><code >fields</code ></a > are immutable.</p >
820+ <p >Fails with <code >header-error.invalid-syntax</code > if the <a href =" #field_key " ><code >field-key</code ></a > or
821+ <a href =" #field_value " ><code >field-value</code ></a > are syntactically invalid.</p >
818822<h5 >Params</h5 >
819823<ul >
820824<li ><a name =" method_fields.append.self " ></a ><code >self</code >: borrow< ; <a href =" #fields " ><a href =" #fields " ><code >fields</code ></a ></a >> ; </li >
0 commit comments