summaryrefslogtreecommitdiffstats
path: root/test/pyhttpd/env.py
diff options
context:
space:
mode:
authorStefan Eissing <icing@apache.org>2023-05-12 13:28:59 +0200
committerStefan Eissing <icing@apache.org>2023-05-12 13:28:59 +0200
commitbdd49d384558257ee89384b5a380f0f042f6d604 (patch)
tree9637b457f058c49f3da8c0a4ee26bceaaecae7d7 /test/pyhttpd/env.py
parentignore errors due to races if a parallel mkdir.sh already (diff)
downloadapache2-bdd49d384558257ee89384b5a380f0f042f6d604.tar.xz
apache2-bdd49d384558257ee89384b5a380f0f042f6d604.zip
*) mod_http2: v2.0.15 with the following fixes and improvements
- New directive 'H2EarlyHint name value' to add headers to a response, picked up already when a "103 Early Hints" response is sent. 'name' and 'value' must comply to the HTTP field restrictions. This directive can be repeated several times and header fields of the same names add. Sending a 'Link' header with 'preload' relation will also cause a HTTP/2 PUSH if enabled and supported by the client. - Fixed an issue where requests were not logged and accounted in a timely fashion when the connection returns to "keepalive" handling, e.g. when the request served was the last outstanding one. This led to late appearance in access logs with wrong duration times reported. - Accurately report the bytes sent for a request in the '%O' Log format. This addresses #203, a long outstanding issue where mod_h2 has reported numbers over-eagerly from internal buffering and not what has actually been placed on the connection. The numbers are now the same with and without H2CopyFiles enabled. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1909769 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/pyhttpd/env.py')
-rw-r--r--test/pyhttpd/env.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/pyhttpd/env.py b/test/pyhttpd/env.py
index 818f18a5c4..2f31de91c8 100644
--- a/test/pyhttpd/env.py
+++ b/test/pyhttpd/env.py
@@ -237,6 +237,8 @@ class HttpdTestEnv:
if HttpdTestEnv.LIBEXEC_DIR is None:
HttpdTestEnv.LIBEXEC_DIR = self._libexec_dir = self.get_apxs_var('LIBEXECDIR')
self._curl = self.config.get('global', 'curl_bin')
+ if 'CURL' in os.environ:
+ self._curl = os.environ['CURL']
self._nghttp = self.config.get('global', 'nghttp')
if self._nghttp is None:
self._nghttp = 'nghttp'
@@ -837,3 +839,18 @@ class HttpdTestEnv:
}
run.add_results({"h2load": stats})
return run
+
+ def make_data_file(self, indir: str, fname: str, fsize: int) -> str:
+ fpath = os.path.join(indir, fname)
+ s10 = "0123456789"
+ s = (101 * s10) + s10[0:3]
+ with open(fpath, 'w') as fd:
+ for i in range(int(fsize / 1024)):
+ fd.write(f"{i:09d}-{s}\n")
+ remain = int(fsize % 1024)
+ if remain != 0:
+ i = int(fsize / 1024) + 1
+ s = f"{i:09d}-{s}\n"
+ fd.write(s[0:remain])
+ return fpath
+