Imported Upstream version 1.46.0
[platform/upstream/nghttp2.git] / doc / nghttp2_session_upgrade.rst
index f750e7c..5d75c20 100644 (file)
@@ -14,6 +14,17 @@ Synopsis
     be called from both client and server, but the behavior is very
     different in each other.
     
+    .. warning::
+    
+      This function is deprecated in favor of
+      `nghttp2_session_upgrade2()`, because this function lacks the
+      parameter to tell the library the request method used in the
+      original HTTP request.  This information is required for client
+      to validate actual response body length against content-length
+      header field (see `nghttp2_option_set_no_http_messaging()`).  If
+      HEAD is used in request, the length of response body must be 0
+      regardless of value included in content-length header field.
+    
     If called from client side, the *settings_payload* must be the
     value sent in ``HTTP2-Settings`` header field and must be decoded
     by base64url decoder.  The *settings_payloadlen* is the length of
@@ -36,9 +47,9 @@ Synopsis
     This function returns 0 if it succeeds, or one of the following
     negative error codes:
     
-    :macro:`NGHTTP2_ERR_NOMEM`
+    :macro:`nghttp2_error.NGHTTP2_ERR_NOMEM`
         Out of memory.
-    :macro:`NGHTTP2_ERR_INVALID_ARGUMENT`
+    :macro:`nghttp2_error.NGHTTP2_ERR_INVALID_ARGUMENT`
         The *settings_payload* is badly formed.
-    :macro:`NGHTTP2_ERR_PROTO`
+    :macro:`nghttp2_error.NGHTTP2_ERR_PROTO`
         The stream ID 1 is already used or closed; or is not available.