-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed interaction with mod_reqtimeout. mod-h2 was knocking it out …
…completely, however it allow configuration of the TLS handshake timeout and that is very useful indeed. Also, fixed a stupid mistake of mine that made `H2Direct` always `on`, irregardless of configuration. Found and reported by <[email protected]> and <[email protected]>. Thanks!
- Loading branch information
Stefan Eissing
committed
Nov 25, 2019
1 parent
ddc2dcf
commit 34e0f64
Showing
7 changed files
with
102 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
v1.15.4 | ||
-------------------------------------------------------------------------------- | ||
* Fixed interaction with mod_reqtimeout. mod-h2 was knocking it out completely, however | ||
it allow configuration of the TLS handshake timeout and that is very useful indeed. | ||
Also, fixed a stupid mistake of mine that made `H2Direct` always `on`, irregardless | ||
of configuration. Found and reported by <[email protected]> and | ||
<[email protected]>. Thanks! | ||
* Switched test suite and test cgis to python3. A regression in cgi.Fieldstorage() makes | ||
tests skip chunked uploads at the moment. Sad. | ||
* Merged PR by @mkaufmann that avoids multiple field lengths violations to be logged | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
# | ||
|
||
AC_PREREQ([2.69]) | ||
AC_INIT([mod_http2], [1.15.3], [[email protected]]) | ||
AC_INIT([mod_http2], [1.15.4], [[email protected]]) | ||
|
||
LT_PREREQ([2.2.6]) | ||
LT_INIT() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# | ||
# mod-h2 test suite | ||
# check HTTP/2 timeout behaviour | ||
# | ||
|
||
import copy | ||
import re | ||
import sys | ||
import socket | ||
import time | ||
import pytest | ||
|
||
from datetime import datetime | ||
from TestEnv import TestEnv | ||
from TestHttpdConf import HttpdConf | ||
|
||
def setup_module(module): | ||
print("setup_module: %s" % module.__name__) | ||
TestEnv.init() | ||
|
||
|
||
def teardown_module(module): | ||
print("teardown_module: %s" % module.__name__) | ||
assert TestEnv.apache_stop() == 0 | ||
|
||
class TestStore: | ||
|
||
# Check that base servers 'Timeout' setting is observed on SSL handshake | ||
def test_105_01(self): | ||
conf = HttpdConf() | ||
conf.add_line(""" | ||
Timeout 2 | ||
""") | ||
conf.add_vhost_cgi() | ||
conf.install() | ||
assert TestEnv.apache_restart() == 0 | ||
host = 'localhost' | ||
# read with a longer timeout than the server | ||
sock = socket.create_connection((host, int(TestEnv.HTTPS_PORT))) | ||
try: | ||
sock.settimeout(2.5) | ||
buff = sock.recv(1024) | ||
assert buff == b'' | ||
except Exception as ex: | ||
print(f"server did not close in time: {ex}") | ||
assert False | ||
sock.close() | ||
# read with a shorter timeout than the server | ||
sock = socket.create_connection((host, int(TestEnv.HTTPS_PORT))) | ||
try: | ||
sock.settimeout(0.5) | ||
buff = sock.recv(1024) | ||
assert False | ||
except Exception as ex: | ||
print(f"as expected: {ex}") | ||
sock.close() | ||
|
||
# Check that mod_reqtimeout handshake setting takes effect | ||
def test_105_02(self): | ||
conf = HttpdConf() | ||
conf.add_line(""" | ||
Timeout 10 | ||
RequestReadTimeout handshake=2 header=5 body=10 | ||
""") | ||
conf.add_vhost_cgi() | ||
conf.install() | ||
assert TestEnv.apache_restart() == 0 | ||
host = 'localhost' | ||
# read with a longer timeout than the server | ||
sock = socket.create_connection((host, int(TestEnv.HTTPS_PORT))) | ||
try: | ||
sock.settimeout(2.5) | ||
buff = sock.recv(1024) | ||
assert buff == b'' | ||
except Exception as ex: | ||
print(f"server did not close in time: {ex}") | ||
assert False | ||
sock.close() | ||
# read with a shorter timeout than the server | ||
sock = socket.create_connection((host, int(TestEnv.HTTPS_PORT))) | ||
try: | ||
sock.settimeout(0.5) | ||
buff = sock.recv(1024) | ||
assert False | ||
except Exception as ex: | ||
print(f"as expected: {ex}") | ||
sock.close() |