@@ -288,6 +288,10 @@ application callback). This is because these illegal header fields
are floating around in existing internet and resetting stream just
because of this may break many web sites. This is especially true if
we forward to or translate from HTTP/1 traffic.
+
For "http" or "https" URIs, ":path" pseudo header fields must start
+with "/". The only exception is OPTIONS request, in that case, "*" is
+allowed in ":path" pseudo header field to represent system-wide
+OPTIONS request.
With the above validations, nghttp2 library guarantees that header
field name passed to nghttp2_on_header_callback() is not empty.
Also required pseudo headers are all present and not empty.
@@ -1182,27 +1186,33 @@ instance implements (since age ==1)
The name byte string, which is not necessarily NULL
-terminated.
+
The name byte string. If this struct is presented from library
+(e.g., nghttp2_on_frame_recv_callback), name is
+guaranteed to be NULL-terminated. When application is
+constructing this struct, name is not required to be
+NULL-terminated.
The value byte string, which is not necessarily NULL
-terminated.
+
The value byte string. If this struct is presented from
+library (e.g., nghttp2_on_frame_recv_callback), value
+is guaranteed to be NULL-terminated. When application is
+constructing this struct, value is not required to be
+NULL-terminated.
Both name and value are guaranteed to be NULL-terminated. The
+namelen and valuelen do not include terminal NULL. If
+nghttp2_option_set_no_http_messaging() is used with nonzero
+value, NULL character may be included in name or value before
+terminating NULL.