From b01d0c88fe1358fe1502ebe03310ab1104de1d2c Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 8 Feb 2015 17:13:36 +0900 Subject: [PATCH] Document nghttpx server push feature --- doc/nghttpx.h2r | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/nghttpx.h2r b/doc/nghttpx.h2r index 820911ed..e5766dbd 100644 --- a/doc/nghttpx.h2r +++ b/doc/nghttpx.h2r @@ -42,6 +42,35 @@ SIGUSR2 After new process comes up, sending SIGQUIT to the original process to perform hot swapping. +SERVER PUSH +----------- + +nghttpx supports HTTP/2 server push in default mode. nghttpx looks +for Link header field (`RFC 5988 +`_) in response headers for +backend server and extracts URI-reference with parameter +``rel=preload`` (see `preload +`_) +and pushes those URIs to the frontend client. Here is a sample Link +header field to initiate server push: + +.. code-block:: http + + Link: ; rel=preload + Link: ; rel=preload + +Currently, the following restrictions are applied for server push: + +1. URI-reference must not contain authority. If it exists, it is not + pushed. ``/fonts/font.woff`` and ``css/theme.css`` are eligible to + be pushed. ``https://example.org/fonts/font.woff`` and + ``//example.org/css/theme.css`` are not. + +2. The associated stream must have method "GET" or "POST". The + associated stream's status code must be 200. + +These limitations may be loosened in the future release. + SEE ALSO --------