Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
24edc961
Commit
24edc961
authored
8 years ago
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into cache-digest
parents
4bfd9b18
767ed255
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
119 additions
and
83 deletions
+119
-83
CMakeLists.txt
CMakeLists.txt
+3
-3
README.rst
README.rst
+4
-4
android-config
android-config
+2
-3
configure.ac
configure.ac
+3
-3
doc/_exts/sphinxcontrib/rubydomain.py
doc/_exts/sphinxcontrib/rubydomain.py
+13
-4
doc/h2load.1
doc/h2load.1
+3
-3
doc/h2load.1.rst
doc/h2load.1.rst
+1
-1
doc/nghttp.1
doc/nghttp.1
+2
-2
doc/nghttp.1.rst
doc/nghttp.1.rst
+3
-1
doc/nghttp.h2r
doc/nghttp.h2r
+3
-1
doc/nghttpd.1
doc/nghttpd.1
+2
-2
doc/nghttpx.1
doc/nghttpx.1
+2
-2
doc/nghttpx.1.rst
doc/nghttpx.1.rst
+1
-1
doc/nghttpx.h2r
doc/nghttpx.h2r
+1
-1
doc/sources/building-android-binary.rst
doc/sources/building-android-binary.rst
+25
-24
doc/sources/nghttpx-howto.rst
doc/sources/nghttpx-howto.rst
+18
-8
doc/sources/python-apiref.rst
doc/sources/python-apiref.rst
+3
-1
doc/sources/tutorial-client.rst
doc/sources/tutorial-client.rst
+3
-1
doc/sources/tutorial-server.rst
doc/sources/tutorial-server.rst
+3
-1
help2rst.py
help2rst.py
+2
-1
lib/includes/nghttp2/nghttp2.h
lib/includes/nghttp2/nghttp2.h
+22
-16
No files found.
CMakeLists.txt
View file @
24edc961
...
@@ -24,13 +24,13 @@
...
@@ -24,13 +24,13 @@
cmake_minimum_required
(
VERSION 3.0
)
cmake_minimum_required
(
VERSION 3.0
)
# XXX using 1.8.90 instead of 1.9.0-DEV
# XXX using 1.8.90 instead of 1.9.0-DEV
project
(
nghttp2 VERSION 1.1
2
.90
)
project
(
nghttp2 VERSION 1.1
3
.90
)
# See versioning rule:
# See versioning rule:
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
set
(
LT_CURRENT 2
2
)
set
(
LT_CURRENT 2
3
)
set
(
LT_REVISION 0
)
set
(
LT_REVISION 0
)
set
(
LT_AGE
8
)
set
(
LT_AGE
9
)
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_SOURCE_DIR
}
/cmake"
)
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_SOURCE_DIR
}
/cmake"
)
include
(
Version
)
include
(
Version
)
...
...
This diff is collapsed.
Click to expand it.
README.rst
View file @
24edc961
...
@@ -179,10 +179,10 @@ To compile the source code, gcc >= 4.8.3 or clang >= 3.4 is required.
...
@@ -179,10 +179,10 @@ To compile the source code, gcc >= 4.8.3 or clang >= 3.4 is required.
Notes for building on Windows (MSVC)
Notes for building on Windows (MSVC)
------------------------------------
------------------------------------
The easiest way to build native Windows nghttp2 dll is use
The easiest way to build native Windows nghttp2 dll is use
`cmake
[cmake](https://cmake.org/). The free version of [Visual C++ Build
<https://cmake.org/>`_. The free version of `Visual C++ Build Tools
Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools)
<http://landinghub.visualstudio.com/visual-cpp-build-tools>`_ works
works
fine.
fine.
1. Install cmake for windows
1. Install cmake for windows
2. Open "Visual C++ ... Native Build Tool Command Prompt", and inside
2. Open "Visual C++ ... Native Build Tool Command Prompt", and inside
...
...
This diff is collapsed.
Click to expand it.
android-config
View file @
24edc961
...
@@ -39,9 +39,8 @@ PATH="$TOOLCHAIN"/bin:"$PATH"
...
@@ -39,9 +39,8 @@ PATH="$TOOLCHAIN"/bin:"$PATH"
--without-libxml2
\
--without-libxml2
\
--disable-python-bindings
\
--disable-python-bindings
\
--disable-examples
\
--disable-examples
\
--enable-werror
\
CC
=
"
$TOOLCHAIN
"
/bin/arm-linux-androideabi-gcc
\
CC
=
"
$TOOLCHAIN
"
/bin/clang
\
CXX
=
"
$TOOLCHAIN
"
/bin/arm-linux-androideabi-g++
\
CXX
=
"
$TOOLCHAIN
"
/bin/clang++
\
CPPFLAGS
=
"-fPIE -I
$PREFIX
/include"
\
CPPFLAGS
=
"-fPIE -I
$PREFIX
/include"
\
PKG_CONFIG_LIBDIR
=
"
$PREFIX
/lib/pkgconfig"
\
PKG_CONFIG_LIBDIR
=
"
$PREFIX
/lib/pkgconfig"
\
LDFLAGS
=
"-fPIE -pie -L
$PREFIX
/lib"
LDFLAGS
=
"-fPIE -pie -L
$PREFIX
/lib"
This diff is collapsed.
Click to expand it.
configure.ac
View file @
24edc961
...
@@ -25,7 +25,7 @@ dnl Do not change user variables!
...
@@ -25,7 +25,7 @@ dnl Do not change user variables!
dnl http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
dnl http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
AC_PREREQ(2.61)
AC_PREREQ(2.61)
AC_INIT([nghttp2], [1.1
3
.0-DEV], [t-tujikawa@users.sourceforge.net])
AC_INIT([nghttp2], [1.1
4
.0-DEV], [t-tujikawa@users.sourceforge.net])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_HEADERS([config.h])
...
@@ -44,9 +44,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
...
@@ -44,9 +44,9 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl See versioning rule:
dnl See versioning rule:
dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST(LT_CURRENT, 2
2
)
AC_SUBST(LT_CURRENT, 2
3
)
AC_SUBST(LT_REVISION, 0)
AC_SUBST(LT_REVISION, 0)
AC_SUBST(LT_AGE,
8
)
AC_SUBST(LT_AGE,
9
)
major=`echo $PACKAGE_VERSION |cut -d. -f1 | sed -e "s/[^0-9]//g"`
major=`echo $PACKAGE_VERSION |cut -d. -f1 | sed -e "s/[^0-9]//g"`
minor=`echo $PACKAGE_VERSION |cut -d. -f2 | sed -e "s/[^0-9]//g"`
minor=`echo $PACKAGE_VERSION |cut -d. -f2 | sed -e "s/[^0-9]//g"`
...
...
This diff is collapsed.
Click to expand it.
doc/_exts/sphinxcontrib/rubydomain.py
View file @
24edc961
...
@@ -15,6 +15,7 @@ from docutils import nodes
...
@@ -15,6 +15,7 @@ from docutils import nodes
from
docutils.parsers.rst
import
directives
from
docutils.parsers.rst
import
directives
from
sphinx
import
addnodes
from
sphinx
import
addnodes
from
sphinx
import
version_info
from
sphinx.roles
import
XRefRole
from
sphinx.roles
import
XRefRole
from
sphinx.locale
import
l_
,
_
from
sphinx.locale
import
l_
,
_
from
sphinx.domains
import
Domain
,
ObjType
,
Index
from
sphinx.domains
import
Domain
,
ObjType
,
Index
...
@@ -231,8 +232,8 @@ class RubyObject(ObjectDescription):
...
@@ -231,8 +232,8 @@ class RubyObject(ObjectDescription):
indextext
=
self
.
get_index_text
(
modname
,
name_cls
)
indextext
=
self
.
get_index_text
(
modname
,
name_cls
)
if
indextext
:
if
indextext
:
self
.
indexnode
[
'entries'
].
append
(
(
'single'
,
indextext
,
self
.
indexnode
[
'entries'
].
append
(
fullname
,
fullname
))
_make_index
(
'single'
,
indextext
,
fullname
,
fullname
))
def
before_content
(
self
):
def
before_content
(
self
):
# needed for automatic qualification of members (reset in subclasses)
# needed for automatic qualification of members (reset in subclasses)
...
@@ -415,11 +416,19 @@ class RubyModule(Directive):
...
@@ -415,11 +416,19 @@ class RubyModule(Directive):
# modindex currently
# modindex currently
if
not
noindex
:
if
not
noindex
:
indextext
=
_
(
'%s (module)'
)
%
modname
indextext
=
_
(
'%s (module)'
)
%
modname
inode
=
addnodes
.
index
(
entries
=
[
(
'single'
,
indextext
,
inode
=
addnodes
.
index
(
entries
=
[
_make_index
(
'module-'
+
modname
,
modname
)])
'single'
,
indextext
,
'module-'
+
modname
,
modname
)])
ret
.
append
(
inode
)
ret
.
append
(
inode
)
return
ret
return
ret
def
_make_index
(
entrytype
,
entryname
,
target
,
ignored
,
key
=
None
):
# Sphinx 1.4 introduced backward incompatible changes, it now
# requires 5 tuples. Last one is categorization key. See
# http://www.sphinx-doc.org/en/stable/extdev/nodes.html#sphinx.addnodes.index
if
version_info
>=
(
1
,
4
,
0
,
''
,
0
):
return
(
entrytype
,
entryname
,
target
,
ignored
,
key
)
else
:
return
(
entrytype
,
entryname
,
target
,
ignored
)
class
RubyCurrentModule
(
Directive
):
class
RubyCurrentModule
(
Directive
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
doc/h2load.1
View file @
24edc961
.\" Man page generated from reStructuredText.
.\" Man page generated from reStructuredText.
.
.
.TH "H2LOAD" "1" "Ju
ne 26, 2016" "1.12
.0" "nghttp2"
.TH "H2LOAD" "1" "Ju
l 21, 2016" "1.13
.0" "nghttp2"
.SH NAME
.SH NAME
h2load \- HTTP/2 benchmarking tool
h2load \- HTTP/2 benchmarking tool
.
.
...
@@ -151,7 +151,7 @@ representing the number of connections to be made per
...
@@ -151,7 +151,7 @@ representing the number of connections to be made per
rate period. The maximum number of connections to be
rate period. The maximum number of connections to be
made is given in \fI\%\-c\fP option. This rate will be
made is given in \fI\%\-c\fP option. This rate will be
distributed among threads as evenly as possible. For
distributed among threads as evenly as possible. For
example, with \f
B\-t2\fP and \fB\-r4\fP
, each thread gets 2
example, with \f
I\%\-t\fP2 and \fI\%\-r\fP4
, each thread gets 2
connections per period. When the rate is 0, the program
connections per period. When the rate is 0, the program
will run as it normally does, creating connections at
will run as it normally does, creating connections at
whatever variable rate it wants. The default value for
whatever variable rate it wants. The default value for
...
@@ -414,7 +414,7 @@ performance. To set smaller flow control window, use \fI\%\-w\fP and
...
@@ -414,7 +414,7 @@ performance. To set smaller flow control window, use \fI\%\-w\fP and
window size described in HTTP/2 and SPDY protocol specification.
window size described in HTTP/2 and SPDY protocol specification.
.SH SEE ALSO
.SH SEE ALSO
.sp
.sp
\f
Inghttp(1)\fP, \fInghttpd(1)\fP, \fI
nghttpx(1)\fP
\f
Bnghttp(1)\fP, \fBnghttpd(1)\fP, \fB
nghttpx(1)\fP
.SH AUTHOR
.SH AUTHOR
Tatsuhiro Tsujikawa
Tatsuhiro Tsujikawa
.SH COPYRIGHT
.SH COPYRIGHT
...
...
This diff is collapsed.
Click to expand it.
doc/h2load.1.rst
View file @
24edc961
...
@@ -120,7 +120,7 @@ OPTIONS
...
@@ -120,7 +120,7 @@ OPTIONS
rate period. The maximum number of connections to be
rate period. The maximum number of connections to be
made is given in :option:`-c` option. This rate will be
made is given in :option:`-c` option. This rate will be
distributed among threads as evenly as possible. For
distributed among threads as evenly as possible. For
example, with :option:`-t
2` and :option:`\-r4`
, each thread gets 2
example, with :option:`-t
`\2 and :option:`-r`\4
, each thread gets 2
connections per period. When the rate is 0, the program
connections per period. When the rate is 0, the program
will run as it normally does, creating connections at
will run as it normally does, creating connections at
whatever variable rate it wants. The default value for
whatever variable rate it wants. The default value for
...
...
This diff is collapsed.
Click to expand it.
doc/nghttp.1
View file @
24edc961
.\" Man page generated from reStructuredText.
.\" Man page generated from reStructuredText.
.
.
.TH "NGHTTP" "1" "Ju
ne 26, 2016" "1.12
.0" "nghttp2"
.TH "NGHTTP" "1" "Ju
l 21, 2016" "1.13
.0" "nghttp2"
.SH NAME
.SH NAME
nghttp \- HTTP/2 client
nghttp \- HTTP/2 client
.
.
...
@@ -300,7 +300,7 @@ stream 11 with the weight 12. The other resources (e.g., icon) depend
...
@@ -300,7 +300,7 @@ stream 11 with the weight 12. The other resources (e.g., icon) depend
on stream 11 with the weight 2.
on stream 11 with the weight 2.
.SH SEE ALSO
.SH SEE ALSO
.sp
.sp
\f
Inghttpd(1)\fP, \fInghttpx(1)\fP, \fI
h2load(1)\fP
\f
Bnghttpd(1)\fP, \fBnghttpx(1)\fP, \fB
h2load(1)\fP
.SH AUTHOR
.SH AUTHOR
Tatsuhiro Tsujikawa
Tatsuhiro Tsujikawa
.SH COPYRIGHT
.SH COPYRIGHT
...
...
This diff is collapsed.
Click to expand it.
doc/nghttp.1.rst
View file @
24edc961
...
@@ -208,7 +208,9 @@ implementation.
...
@@ -208,7 +208,9 @@ implementation.
When connection is established, nghttp sends 5 PRIORITY frames to idle
When connection is established, nghttp sends 5 PRIORITY frames to idle
streams 3, 5, 7, 9 and 11 to create "anchor" nodes in dependency
streams 3, 5, 7, 9 and 11 to create "anchor" nodes in dependency
tree::
tree:
.. code-block:: text
+-----+
+-----+
|id=0 |
|id=0 |
...
...
This diff is collapsed.
Click to expand it.
doc/nghttp.h2r
View file @
24edc961
...
@@ -12,7 +12,9 @@ implementation.
...
@@ -12,7 +12,9 @@ implementation.
When connection is established, nghttp sends 5 PRIORITY frames to idle
When connection is established, nghttp sends 5 PRIORITY frames to idle
streams 3, 5, 7, 9 and 11 to create "anchor" nodes in dependency
streams 3, 5, 7, 9 and 11 to create "anchor" nodes in dependency
tree::
tree:
.. code-block:: text
+-----+
+-----+
|id=0 |
|id=0 |
...
...
This diff is collapsed.
Click to expand it.
doc/nghttpd.1
View file @
24edc961
.\" Man page generated from reStructuredText.
.\" Man page generated from reStructuredText.
.
.
.TH "NGHTTPD" "1" "Ju
ne 26, 2016" "1.12
.0" "nghttp2"
.TH "NGHTTPD" "1" "Ju
l 21, 2016" "1.13
.0" "nghttp2"
.SH NAME
.SH NAME
nghttpd \- HTTP/2 server
nghttpd \- HTTP/2 server
.
.
...
@@ -209,7 +209,7 @@ The <SIZE> argument is an integer and an optional unit (e.g., 10K is
...
@@ -209,7 +209,7 @@ The <SIZE> argument is an integer and an optional unit (e.g., 10K is
10 * 1024). Units are K, M and G (powers of 1024).
10 * 1024). Units are K, M and G (powers of 1024).
.SH SEE ALSO
.SH SEE ALSO
.sp
.sp
\f
Inghttp(1)\fP, \fInghttpx(1)\fP, \fI
h2load(1)\fP
\f
Bnghttp(1)\fP, \fBnghttpx(1)\fP, \fB
h2load(1)\fP
.SH AUTHOR
.SH AUTHOR
Tatsuhiro Tsujikawa
Tatsuhiro Tsujikawa
.SH COPYRIGHT
.SH COPYRIGHT
...
...
This diff is collapsed.
Click to expand it.
doc/nghttpx.1
View file @
24edc961
.\" Man page generated from reStructuredText.
.\" Man page generated from reStructuredText.
.
.
.TH "NGHTTPX" "1" "Ju
ne 26, 2016" "1.12
.0" "nghttp2"
.TH "NGHTTPX" "1" "Ju
l 21, 2016" "1.13
.0" "nghttp2"
.SH NAME
.SH NAME
nghttpx \- HTTP/2 proxy
nghttpx \- HTTP/2 proxy
.
.
...
@@ -1792,7 +1792,7 @@ hostname is allowed in command\-line or configuration file is read
...
@@ -1792,7 +1792,7 @@ hostname is allowed in command\-line or configuration file is read
using \fI\%\-\-conf\fP\&.
using \fI\%\-\-conf\fP\&.
.SH SEE ALSO
.SH SEE ALSO
.sp
.sp
\f
Inghttp(1)\fP, \fInghttpd(1)\fP, \fI
h2load(1)\fP
\f
Bnghttp(1)\fP, \fBnghttpd(1)\fP, \fB
h2load(1)\fP
.SH AUTHOR
.SH AUTHOR
Tatsuhiro Tsujikawa
Tatsuhiro Tsujikawa
.SH COPYRIGHT
.SH COPYRIGHT
...
...
This diff is collapsed.
Click to expand it.
doc/nghttpx.1.rst
View file @
24edc961
...
@@ -1199,7 +1199,7 @@ backend server and extracts URI-reference with parameter
...
@@ -1199,7 +1199,7 @@ backend server and extracts URI-reference with parameter
and pushes those URIs to the frontend client. Here is a sample Link
and pushes those URIs to the frontend client. Here is a sample Link
header field to initiate server push:
header field to initiate server push:
.. code-block::
http
.. code-block::
text
Link: </fonts/font.woff>; rel=preload
Link: </fonts/font.woff>; rel=preload
Link: </css/theme.css>; rel=preload
Link: </css/theme.css>; rel=preload
...
...
This diff is collapsed.
Click to expand it.
doc/nghttpx.h2r
View file @
24edc961
...
@@ -85,7 +85,7 @@ backend server and extracts URI-reference with parameter
...
@@ -85,7 +85,7 @@ backend server and extracts URI-reference with parameter
and pushes those URIs to the frontend client. Here is a sample Link
and pushes those URIs to the frontend client. Here is a sample Link
header field to initiate server push:
header field to initiate server push:
.. code-block::
http
.. code-block::
text
Link: </fonts/font.woff>; rel=preload
Link: </fonts/font.woff>; rel=preload
Link: </css/theme.css>; rel=preload
Link: </css/theme.css>; rel=preload
...
...
This diff is collapsed.
Click to expand it.
doc/sources/building-android-binary.rst
View file @
24edc961
...
@@ -17,19 +17,16 @@ installed in the following way. First, let us introduce
...
@@ -17,19 +17,16 @@ installed in the following way. First, let us introduce
under ``$ANDROID_HOME/toolchain``. An user can freely choose the path
under ``$ANDROID_HOME/toolchain``. An user can freely choose the path
for ``ANDROID_HOME``. For example, to install toolchain under
for ``ANDROID_HOME``. For example, to install toolchain under
``$ANDROID_HOME/toolchain``, do this in the the directory where NDK is
``$ANDROID_HOME/toolchain``, do this in the the directory where NDK is
unpacked:
:
unpacked:
$ build/tools/make-standalone-toolchain.sh \
.. code-block:: text
--install-dir=$ANDROID_HOME/toolchain \
--toolchain=arm-linux-androideabi-4.9 \
--llvm-version=3.5 \
--platform=android-16
The additional flag ``--system=linux-x86_64`` may be required if you
$ build/tools/make_standalone_toolchain.py \
are using x86_64 system.
--arch arm --api 16 --stl gnustl
--install-dir $ANDROID_HOME/toolchain
The
platform level is not important here because we don't use Android
The
API level (``--api``) is not important here because we don't use
specific C/C++ API.
Android
specific C/C++ API.
The dependent libraries, such as OpenSSL and libev should be built
The dependent libraries, such as OpenSSL and libev should be built
with the toolchain and installed under ``$ANDROID_HOME/usr/local``.
with the toolchain and installed under ``$ANDROID_HOME/usr/local``.
...
@@ -45,7 +42,9 @@ spdylay as well.
...
@@ -45,7 +42,9 @@ spdylay as well.
Before running ``android-config`` and ``android-make``,
Before running ``android-config`` and ``android-make``,
``ANDROID_HOME`` environment variable must be set to point to the
``ANDROID_HOME`` environment variable must be set to point to the
correct path. Also add ``$ANDROID_HOME/toolchain/bin`` to ``PATH``::
correct path. Also add ``$ANDROID_HOME/toolchain/bin`` to ``PATH``:
.. code-block:: text
$ export PATH=$PATH:$ANDROID_HOME/toolchain/bin
$ export PATH=$PATH:$ANDROID_HOME/toolchain/bin
...
@@ -159,6 +158,8 @@ then ``android-make`` to compile nghttp2 source files.
...
@@ -159,6 +158,8 @@ then ``android-make`` to compile nghttp2 source files.
If all went well, application binaries, such as nghttpx, are created
If all went well, application binaries, such as nghttpx, are created
under src directory. Strip debugging information from the binary
under src directory. Strip debugging information from the binary
using the following command::
using the following command:
.. code-block:: text
$ arm-linux-androideabi-strip src/nghttpx
$ arm-linux-androideabi-strip src/nghttpx
This diff is collapsed.
Click to expand it.
doc/sources/nghttpx-howto.rst
View file @
24edc961
...
@@ -48,12 +48,16 @@ explicitly.
...
@@ -48,12 +48,16 @@ explicitly.
The backend is supposed to be Web server. For example, to make
The backend is supposed to be Web server. For example, to make
nghttpx listen to encrypted HTTP/2 requests at port 8443, and a
nghttpx listen to encrypted HTTP/2 requests at port 8443, and a
backend Web server is configured to listen to HTTP request at port
backend Web server is configured to listen to HTTP request at port
8080 in the same host, run nghttpx command-line like this::
8080 in the same host, run nghttpx command-line like this:
.. code-block:: text
$ nghttpx -f0.0.0.0,8443 -b127.0.0.1,8080 /path/to/server.key /path/to/server.crt
$ nghttpx -f0.0.0.0,8443 -b127.0.0.1,8080 /path/to/server.key /path/to/server.crt
Then HTTP/2 enabled client can access to the nghttpx in HTTP/2. For
Then HTTP/2 enabled client can access to the nghttpx in HTTP/2. For
example, you can send GET request to the server using nghttp::
example, you can send GET request to the server using nghttp:
.. code-block:: text
$ nghttp -nv https://localhost:8443/
$ nghttp -nv https://localhost:8443/
...
@@ -89,7 +93,9 @@ connection, use :option:`--backend` option, and specify ``h2`` in
...
@@ -89,7 +93,9 @@ connection, use :option:`--backend` option, and specify ``h2`` in
For example, to make nghttpx listen to encrypted HTTP/2 requests at
For example, to make nghttpx listen to encrypted HTTP/2 requests at
port 8443, and a backend HTTP proxy server is configured to listen to
port 8443, and a backend HTTP proxy server is configured to listen to
HTTP/1 request at port 8080 in the same host, run nghttpx command-line
HTTP/1 request at port 8080 in the same host, run nghttpx command-line
like this::
like this:
.. code-block:: text
$ nghttpx -s -f'*,8443' -b127.0.0.1,8080 /path/to/server.key /path/to/server.crt
$ nghttpx -s -f'*,8443' -b127.0.0.1,8080 /path/to/server.key /path/to/server.crt
...
@@ -118,13 +124,17 @@ to proxy.pac file, something like this:
...
@@ -118,13 +124,17 @@ to proxy.pac file, something like this:
file:///path/to/proxy.pac
file:///path/to/proxy.pac
For Chromium, use following command-line::
For Chromium, use following command-line:
.. code-block:: text
$ google-chrome --proxy-pac-url=file:///path/to/proxy.pac --use-npn
$ google-chrome --proxy-pac-url=file:///path/to/proxy.pac --use-npn
As HTTP/1 proxy server, Squid may work as out-of-box. Traffic server
As HTTP/1 proxy server, Squid may work as out-of-box. Traffic server
requires to be configured as forward proxy. Here is the minimum
requires to be configured as forward proxy. Here is the minimum
configuration items to edit::
configuration items to edit:
.. code-block:: text
CONFIG proxy.config.reverse_proxy.enabled INT 0
CONFIG proxy.config.reverse_proxy.enabled INT 0
CONFIG proxy.config.url_remap.remap_required INT 0
CONFIG proxy.config.url_remap.remap_required INT 0
...
@@ -152,9 +162,9 @@ Enable SSL/TLS on memcached connection
...
@@ -152,9 +162,9 @@ Enable SSL/TLS on memcached connection
--------------------------------------
--------------------------------------
By default, memcached connection is not encrypted. To enable
By default, memcached connection is not encrypted. To enable
encryption, use
:option:`--tls-ticket-key-memcached-tls` for TLS
encryption, use
``tls`` keyword in
ticket key, and use :option:`--tls-session-cache-memcached-tls` for
:option:`--tls-ticket-key-memcached` for TLS ticket key, and
TLS session cache.
:option:`--tls-session-cache-memcached` for
TLS session cache.
Specifying additional server certificates
Specifying additional server certificates
-----------------------------------------
-----------------------------------------
...
...
This diff is collapsed.
Click to expand it.
doc/sources/python-apiref.rst
View file @
24edc961
...
@@ -140,7 +140,9 @@ HTTP/2 servers
...
@@ -140,7 +140,9 @@ HTTP/2 servers
Python 3.4 or later is required to use these objects. To
Python 3.4 or later is required to use these objects. To
explicitly configure nghttp2 build to use Python 3.4, specify the
explicitly configure nghttp2 build to use Python 3.4, specify the
``PYTHON`` variable to the path to Python 3.4 executable when
``PYTHON`` variable to the path to Python 3.4 executable when
invoking configure script like this::
invoking configure script like this:
.. code-block:: text
$ ./configure PYTHON=/usr/bin/python3.4
$ ./configure PYTHON=/usr/bin/python3.4
...
...
This diff is collapsed.
Click to expand it.
doc/sources/tutorial-client.rst
View file @
24edc961
...
@@ -7,7 +7,9 @@ the end of this page. It also resides in the examples directory in
...
@@ -7,7 +7,9 @@ the end of this page. It also resides in the examples directory in
the archive or repository.
the archive or repository.
This simple client takes a single HTTPS URI and retrieves the resource
This simple client takes a single HTTPS URI and retrieves the resource
at the URI. The synopsis is::
at the URI. The synopsis is:
.. code-block:: text
$ libevent-client HTTPS_URI
$ libevent-client HTTPS_URI
...
...
This diff is collapsed.
Click to expand it.
doc/sources/tutorial-server.rst
View file @
24edc961
...
@@ -10,7 +10,9 @@ archive or repository.
...
@@ -10,7 +10,9 @@ archive or repository.
This simple server takes 3 arguments: The port number to listen on,
This simple server takes 3 arguments: The port number to listen on,
the path to your SSL/TLS private key file, and the path to your
the path to your SSL/TLS private key file, and the path to your
certificate file. The synopsis is::
certificate file. The synopsis is:
.. code-block:: text
$ libevent-server PORT /path/to/server.key /path/to/server.crt
$ libevent-server PORT /path/to/server.key /path/to/server.crt
...
...
This diff is collapsed.
Click to expand it.
help2rst.py
View file @
24edc961
...
@@ -166,7 +166,8 @@ def format_text(text):
...
@@ -166,7 +166,8 @@ def format_text(text):
else
:
else
:
text
=
re
.
sub
(
r'\*'
,
r'\*'
,
text
)
text
=
re
.
sub
(
r'\*'
,
r'\*'
,
text
)
# markup option reference
# markup option reference
text
=
re
.
sub
(
r'(^|\s)(-[a-zA-Z0-9-]+)'
,
r'\1:option:`\2`'
,
text
)
text
=
re
.
sub
(
r'(^|\s)(-[a-zA-Z0-9]|--[a-zA-Z0-9-]+)'
,
r'\1:option:`\2`'
,
text
)
# sphinx does not like markup like ':option:`-f`='. We need
# sphinx does not like markup like ':option:`-f`='. We need
# backslash between ` and =.
# backslash between ` and =.
text
=
re
.
sub
(
r'(:option:`.*?`)(\S)'
,
r'\1\\\2'
,
text
)
text
=
re
.
sub
(
r'(:option:`.*?`)(\S)'
,
r'\1\\\2'
,
text
)
...
...
This diff is collapsed.
Click to expand it.
lib/includes/nghttp2/nghttp2.h
View file @
24edc961
...
@@ -2629,13 +2629,19 @@ NGHTTP2_EXTERN void nghttp2_session_del(nghttp2_session *session);
...
@@ -2629,13 +2629,19 @@ NGHTTP2_EXTERN void nghttp2_session_del(nghttp2_session *session);
*
*
* 6. :type:`nghttp2_before_frame_send_callback` is invoked.
* 6. :type:`nghttp2_before_frame_send_callback` is invoked.
*
*
* 7. :type:`nghttp2_send_callback` is invoked one or more times to
* 7. If :enum:`NGHTTP2_ERR_CANCEL` is returned from
* :type:`nghttp2_before_frame_send_callback`, the current frame
* transmission is canceled, and
* :type:`nghttp2_on_frame_not_send_callback` is invoked. Abort
* the following steps.
*
* 8. :type:`nghttp2_send_callback` is invoked one or more times to
* send the frame.
* send the frame.
*
*
*
8
. :type:`nghttp2_on_frame_send_callback` is invoked.
*
9
. :type:`nghttp2_on_frame_send_callback` is invoked.
*
*
*
9. If the transmission of the frame triggers closure of the stream,
*
10. If the transmission of the frame triggers closure of the
* the stream is closed and
*
stream,
the stream is closed and
* :type:`nghttp2_on_stream_close_callback` is invoked.
* :type:`nghttp2_on_stream_close_callback` is invoked.
*
*
* This function returns 0 if it succeeds, or one of the following
* This function returns 0 if it succeeds, or one of the following
...
@@ -3608,8 +3614,8 @@ nghttp2_submit_response(nghttp2_session *session, int32_t stream_id,
...
@@ -3608,8 +3614,8 @@ nghttp2_submit_response(nghttp2_session *session, int32_t stream_id,
*
*
* The |nva| is an array of name/value pair :type:`nghttp2_nv` with
* The |nva| is an array of name/value pair :type:`nghttp2_nv` with
* |nvlen| elements. The application is responsible not to include
* |nvlen| elements. The application is responsible not to include
*
required pseudo-header fields (header field whose name starts with
*
pseudo-header fields (header field whose name starts with ":") in
*
":") in
|nva|.
* |nva|.
*
*
* This function creates copies of all name/value pairs in |nva|. It
* This function creates copies of all name/value pairs in |nva|. It
* also lower-cases all names in |nva|. The order of elements in
* also lower-cases all names in |nva|. The order of elements in
...
@@ -3624,20 +3630,20 @@ nghttp2_submit_response(nghttp2_session *session, int32_t stream_id,
...
@@ -3624,20 +3630,20 @@ nghttp2_submit_response(nghttp2_session *session, int32_t stream_id,
* :type:`nghttp2_on_frame_not_send_callback` is called.
* :type:`nghttp2_on_frame_not_send_callback` is called.
*
*
* For server, trailer fields must follow response HEADERS or response
* For server, trailer fields must follow response HEADERS or response
* DATA with
END_STREAM flag set. The library does not enforce this
* DATA with
out END_STREAM flat set. The library does not enforce
*
requirement, and applications should do this for themselves. If
*
this requirement, and applications should do this for themselves.
* `nghttp2_submit_trailer()` is called before any response HEADERS
*
If
`nghttp2_submit_trailer()` is called before any response HEADERS
* submission (usually by `nghttp2_submit_response()`), the content of
* submission (usually by `nghttp2_submit_response()`), the content of
* |nva| will be sent as response headers, which will result in error.
* |nva| will be sent as response headers, which will result in error.
*
*
* This function has the same effect with `nghttp2_submit_headers()`,
* This function has the same effect with `nghttp2_submit_headers()`,
* with flags = :enum:`NGHTTP2_FLAG_END_
HEADERS
` and both pri_spec and
* with flags = :enum:`NGHTTP2_FLAG_END_
STREAM
` and both pri_spec and
* stream_user_data to NULL.
* stream_user_data to NULL.
*
*
* To submit trailer fields after `nghttp2_submit_response()` is
* To submit trailer fields after `nghttp2_submit_response()` is
* called, the application has to specify
* called, the application has to specify
* :type:`nghttp2_data_provider` to `nghttp2_submit_response()`.
In
* :type:`nghttp2_data_provider` to `nghttp2_submit_response()`.
*
side
:type:`nghttp2_data_source_read_callback`, when setting
*
Inside of
:type:`nghttp2_data_source_read_callback`, when setting
* :enum:`NGHTTP2_DATA_FLAG_EOF`, also set
* :enum:`NGHTTP2_DATA_FLAG_EOF`, also set
* :enum:`NGHTTP2_DATA_FLAG_NO_END_STREAM`. After that, the
* :enum:`NGHTTP2_DATA_FLAG_NO_END_STREAM`. After that, the
* application can send trailer fields using
* application can send trailer fields using
...
@@ -4096,7 +4102,7 @@ nghttp2_session_check_server_session(nghttp2_session *session);
...
@@ -4096,7 +4102,7 @@ nghttp2_session_check_server_session(nghttp2_session *session);
* that value as window_size_increment is queued. If the
* that value as window_size_increment is queued. If the
* |window_size_increment| is larger than the received bytes from the
* |window_size_increment| is larger than the received bytes from the
* remote endpoint, the local window size is increased by that
* remote endpoint, the local window size is increased by that
* difference. If the sole
intention
is to increase the local window
* difference. If the sole
purpose
is to increase the local window
* size, consider to use `nghttp2_session_set_local_window_size()`.
* size, consider to use `nghttp2_session_set_local_window_size()`.
*
*
* If the |window_size_increment| is negative, the local window size
* If the |window_size_increment| is negative, the local window size
...
@@ -4105,8 +4111,8 @@ nghttp2_session_check_server_session(nghttp2_session *session);
...
@@ -4105,8 +4111,8 @@ nghttp2_session_check_server_session(nghttp2_session *session);
* (`nghttp2_option_set_no_auto_window_update()`), and the library
* (`nghttp2_option_set_no_auto_window_update()`), and the library
* decided that the WINDOW_UPDATE should be submitted, then
* decided that the WINDOW_UPDATE should be submitted, then
* WINDOW_UPDATE is queued with the current received bytes count. If
* WINDOW_UPDATE is queued with the current received bytes count. If
* the sole
intention is to decrease the local window size, consider
* the sole
purpose is to decrease the local window size, consider to
*
to
use `nghttp2_session_set_local_window_size()`.
* use `nghttp2_session_set_local_window_size()`.
*
*
* If the |window_size_increment| is 0, the function does nothing and
* If the |window_size_increment| is 0, the function does nothing and
* returns 0.
* returns 0.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment