@@ -745,11 +745,9 @@ http-related errors.</p>
745
745
which have multiple values are represented by multiple entries in this
746
746
list with the same key.</p >
747
747
<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 >
753
751
<h5 >Params</h5 >
754
752
<ul >
755
753
<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>
760
758
</ul >
761
759
<h4 ><a name =" method_fields.get " ></a ><code >[method]fields.get: func</code ></h4 >
762
760
<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 >
766
764
<h5 >Params</h5 >
767
765
<ul >
768
766
<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>
788
786
<p >Set all of the values for a key. Clears any existing values for that
789
787
key, if they have been set.</p >
790
788
<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 >
791
791
<h5 >Params</h5 >
792
792
<ul >
793
793
<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>
802
802
<p >Delete all values for a key. Does nothing if no values for the key
803
803
exist.</p >
804
804
<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 >
805
807
<h5 >Params</h5 >
806
808
<ul >
807
809
<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>
815
817
<p >Append a value for a key. Does not change or delete any existing
816
818
values for that key.</p >
817
819
<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 >
818
822
<h5 >Params</h5 >
819
823
<ul >
820
824
<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