You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2015/07/13 12:04:35 UTC

svn commit: r1690620 [5/5] - in /httpd/test/mod_h2/trunk: ./ bin/ clients/ conf/ conf/mods-available/ conf/sites/ conf/ssl/ htdocs/ htdocs/test.example.org/ htdocs/test.example.org/003/ htdocs/test.example.org/004/ htdocs/test.example.org/006/ htdocs/t...

Added: httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py (added)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/necho.py Mon Jul 13 10:04:32 2015
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+import cgi, os
+import cgitb; cgitb.enable()
+
+status = '200 Ok'
+
+try:
+    form = cgi.FieldStorage()
+    
+    # A nested FieldStorage instance holds the file
+    count = form['count']
+    text = form['text']
+    
+    # Test if the file was uploaded
+    if int(count.value):
+        print "Status: 200"
+        print """\
+Content-Type: text/plain\n"""
+        i = 0;
+        for i in range(0, int(count.value)):
+            print """%s""" % (text.value,)
+
+    else:
+        print "Status: 400 Parameter Missing"
+        print """\
+    Content-Type: text/html\n
+    <html><body>
+    <p>No count was specified: %s</p>
+    </body></html>""" % (count.value,)
+
+except KeyError:
+    print "Status: 200 Ok"
+    print """\
+    Content-Type: text/html\n
+    <html><body>
+    Echo <form method="POST" enctype="application/x-www-form-urlencoded">
+    <input type="text" name="count">
+    <input type="text" name="text">
+    <button type="submit">Echo</button></form>
+    </body></html>"""
+    pass
+

Added: httpd/test/mod_h2/trunk/htdocs/test.example.org/sei.png
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/sei.png?rev=1690620&view=auto
==============================================================================
Binary file - no diff available.

Propchange: httpd/test/mod_h2/trunk/htdocs/test.example.org/sei.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: httpd/test/mod_h2/trunk/htdocs/test.example.org/upload.py
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/upload.py?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/htdocs/test.example.org/upload.py (added)
+++ httpd/test/mod_h2/trunk/htdocs/test.example.org/upload.py Mon Jul 13 10:04:32 2015
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+import cgi, os
+import cgitb; cgitb.enable()
+
+status = '200 Ok'
+
+try: # Windows needs stdio set for binary mode.
+    import msvcrt
+    msvcrt.setmode (0, os.O_BINARY) # stdin  = 0
+    msvcrt.setmode (1, os.O_BINARY) # stdout = 1
+except ImportError:
+    pass
+
+form = cgi.FieldStorage()
+
+# Test if the file was uploaded
+if 'file' in form:
+    # A nested FieldStorage instance holds the file
+    fileitem = form['file']
+    
+    # strip leading path from file name to avoid directory traversal attacks
+    fn = os.path.basename(fileitem.filename)
+    open('./files/' + fn, 'wb').write(fileitem.file.read())
+    message = 'The file "' + fn + '" was uploaded successfully'
+
+elif 'remove' in form:
+    remove = form['remove'].value
+    try:
+        fn = os.path.basename(remove)
+        os.remove('./files/' + fn)
+        message = 'The file "' + fn + '" was removed successfully'
+    except OSError, e:
+        message = 'Error removing ' + fn + ': ' + e.strerror
+        status = '404 File Not Found'
+else:
+    message = '''\
+        Upload File<form method="POST" enctype="multipart/form-data">
+        <input type="file" name="file">
+        <button type="submit">Upload</button></form>
+        '''
+
+print "Status: %s" % (status,)
+print """\
+    Content-Type: text/html\n
+    <html><body>
+    <p>%s</p>
+    </body></html>""" % (message,)

Added: httpd/test/mod_h2/trunk/htdocs/test.example.org/xxx-1.0.2a.tar.gz
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/htdocs/test.example.org/xxx-1.0.2a.tar.gz?rev=1690620&view=auto
==============================================================================
Binary file - no diff available.

Propchange: httpd/test/mod_h2/trunk/htdocs/test.example.org/xxx-1.0.2a.tar.gz
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Propchange: httpd/test/mod_h2/trunk/m4/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jul 13 10:04:32 2015
@@ -0,0 +1 @@
+l*.m4

Added: httpd/test/mod_h2/trunk/m4/ax_check_compile_flag.m4
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/m4/ax_check_compile_flag.m4?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/m4/ax_check_compile_flag.m4 (added)
+++ httpd/test/mod_h2/trunk/m4/ax_check_compile_flag.m4 Mon Jul 13 10:04:32 2015
@@ -0,0 +1,74 @@
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the current language's compiler
+#   or gives an error.  (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <gu...@gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mk...@gmail.com>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 3
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
+  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS

Propchange: httpd/test/mod_h2/trunk/nghttp2/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jul 13 10:04:32 2015
@@ -0,0 +1 @@
+gen

Added: httpd/test/mod_h2/trunk/nghttp2/Makefile
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/nghttp2/Makefile?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/nghttp2/Makefile (added)
+++ httpd/test/mod_h2/trunk/nghttp2/Makefile Mon Jul 13 10:04:32 2015
@@ -0,0 +1,298 @@
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+GEN             = gen
+INST_DIR        = ../gen/apache
+BLD_PREFIX      = $(shell dirname $$PWD)/gen/apache
+CURL_OPTS       = --progress-bar
+OS              = $(shell uname -s)
+
+NGHTTP2_VERSION = 1.0.5
+NGHTTP2_DIR     = nghttp2-$(NGHTTP2_VERSION)
+NGHTTP2_TAR     = $(NGHTTP2_DIR).tar.gz
+NGHTTP2_URL     = https://github.com/tatsuhiro-t/nghttp2/releases/download/v$(NGHTTP2_VERSION)/$(NGHTTP2_TAR)
+
+NGHTTP2_CONF_ENV=
+NGHTTP2_DEPS    =
+NGHTTP2_CONF    = --prefix=$(BLD_PREFIX) --enable-app
+
+ZLIB_VERSION    = 1.2.8
+ZLIB_DIR        = zlib-$(ZLIB_VERSION)
+ZLIB_TAR        = $(ZLIB_DIR).tar.gz
+ZLIB_URL        = http://zlib.net/$(ZLIB_TAR)
+
+LIBEV_VERSION    = 4.20
+LIBEV_DIR        = libev-$(LIBEV_VERSION)
+LIBEV_TAR        = $(LIBEV_DIR).tar.gz
+LIBEV_URL        = http://dist.schmorp.de/libev/$(LIBEV_TAR)
+LIBEV_CONF_ENV   += PKG_CONFIG_PATH=$(BLD_PREFIX)/lib/pkgconfig \
+    LDFLAGS=-L$(BLD_PREFIX)/lib CFLAGS=-I$(BLD_PREFIX)/include
+
+LIBEVENT_VERSION = 2.0.22-stable
+LIBEVENT_DIR     = libevent-$(LIBEVENT_VERSION)
+LIBEVENT_TAR     = $(LIBEVENT_DIR).tar.gz
+LIBEVENT_URL     = https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/$(LIBEVENT_TAR)
+LIBEVENT_CONF_ENV += PKG_CONFIG_PATH=$(BLD_PREFIX)/lib/pkgconfig \
+    LDFLAGS=-L$(BLD_PREFIX)/lib CFLAGS=-I$(BLD_PREFIX)/include
+
+
+OPENSSL_BASE = http://www.openssl.org
+OPENSSL_DIR = openssl-latest
+OPENSSL_TAR = $(OPENSSL_DIR).tar.gz
+OPENSSL_URL = $(OPENSSL_BASE)/source/latest.tar.gz
+OPENSSL_CONF_CMD = ./config
+OPENSSL_CONF =  shared -fPIC
+
+OPENSSL_VERSION = $(shell openssl version -v | sed -e 's/OpenSSL *//g' -e 's/[a-z]* .*//g')
+
+ifeq ($(OPENSSL_VERSION), $(filter $(OPENSSL_VERSION),0.9.7 0.9.8 1.0.0 1.0.1))
+	# Very old openssl without alpn support installed, need a newer one
+	NGHTTP2_DEPS  += $(INST_DIR)/.openssl-installed
+	ifeq ($(OS),Darwin)
+        OPENSSL_CONF_CMD = ./Configure
+        OPENSSL_CONF = darwin64-x86_64-cc
+	endif
+endif
+
+
+NGHTTP2_CONF_ENV += PKG_CONFIG_PATH=$(BLD_PREFIX)/lib/pkgconfig \
+    LDFLAGS=-L$(BLD_PREFIX)/lib CFLAGS=-I$(BLD_PREFIX)/include
+
+
+# For OS X, we drag our own zlib in as the one installed is not
+# recognized by nghttp2 configure.
+# On other OS, we expect a proper zlib/zlib-dev installation
+#
+ifeq ($(OS),Darwin)
+    # we need our own zlib
+    NGHTTP2_DEPS  += $(INST_DIR)/.zlib-installed $(INST_DIR)/.libev-installed
+else
+ifneq (,$(wildcard $(INST_DIR)/lib/pkgconfig/openssl.pc))
+    NGHTTP2_DEPS  += $(INST_DIR)/.libevent-installed
+endif
+endif
+
+all: install
+
+dirs:
+	@mkdir -p $(GEN)/build
+
+clean:
+	@rm -rf $(GEN)/$(NGHTTP2_DIR)
+
+distclean:
+	@rm -rf $(GEN)
+
+distdir:
+	@mkdir -p $(distdir)
+	@tar cf - Makefile patches | (cd $(distdir) && tar xf - )
+
+install:  $(INST_DIR)/.nghttp2-installed
+
+
+################################################################################
+# Install the local nghttp2
+#
+$(INST_DIR)/.nghttp2-installed:  $(GEN)/$(NGHTTP2_DIR)/.nghttp2-built
+	@echo -n installing nghttp2 locally...
+	@cd $(GEN)/$(NGHTTP2_DIR)/ && make install >> ../build.log
+	@echo done.
+	@touch $(INST_DIR)/.nghttp2-installed
+
+
+################################################################################
+# Build the local nghttp2
+#
+$(GEN)/$(NGHTTP2_DIR)/.nghttp2-built: \
+		$(GEN)/$(NGHTTP2_DIR)/.nghttp2-configured
+	@echo -n building nghttp2...
+	@cd $(GEN)/$(NGHTTP2_DIR)/ && make >> ../build.log
+	@echo done.
+	@touch $(GEN)/$(NGHTTP2_DIR)/.nghttp2-built
+
+################################################################################
+# Configure the local nghttp2 sources
+#
+$(GEN)/$(NGHTTP2_DIR)/.nghttp2-configured: \
+		$(NGHTTP2_DEPS) \
+		$(GEN)/$(NGHTTP2_DIR)/.nghttp2-patched
+	@echo -n configuring nghttp2...
+	cd $(GEN)/$(NGHTTP2_DIR)/ && \
+	$(NGHTTP2_CONF_ENV) ./configure $(NGHTTP2_CONF) >> ../build.log
+	@echo done.
+	@touch $(GEN)/$(NGHTTP2_DIR)/.nghttp2-configured
+
+################################################################################
+# Patch the local nghtp2 sources
+#
+$(GEN)/$(NGHTTP2_DIR)/.nghttp2-patched: \
+		$(GEN)/$(NGHTTP2_DIR)/.nghttp2-extracted
+	@touch $(GEN)/$(NGHTTP2_DIR)/.nghttp2-patched
+
+################################################################################
+# Extract nghttp2 source tree
+#
+$(GEN)/$(NGHTTP2_DIR)/.nghttp2-extracted: \
+		$(GEN)/$(NGHTTP2_TAR)
+	@rm -rf $(GEN)/$(NGHTTP2_DIR)
+	@echo -n extracting nghttp2 packages...
+	@cd $(GEN) && tar xfz $(NGHTTP2_TAR)
+	@echo done.
+	@touch $(GEN)/$(NGHTTP2_DIR)/.nghttp2-extracted
+
+################################################################################
+# Retrieve nghttp2 sources
+#
+$(GEN)/$(NGHTTP2_TAR):
+	@mkdir -p $(GEN)
+	curl $(CURL_OPTS) -L $(NGHTTP2_URL) > $(GEN)/$(NGHTTP2_TAR)
+
+
+################################################################################
+# Build + install a local opensll library (if needed)
+#
+$(INST_DIR)/.openssl-installed: \
+		$(GEN)/$(OPENSSL_DIR)/.built
+	@mkdir -p $(INST_DIR)
+	@echo -n installing openssl locally, may take some time...
+	@cd $(GEN)/$(OPENSSL_DIR) && make install_sw >> ../build.log
+	@echo done.
+	@touch $(INST_DIR)/.openssl-installed
+
+$(GEN)/$(OPENSSL_DIR)/.built: \
+		$(GEN)/$(OPENSSL_DIR)/.configured
+	@echo -n building openssl locally...
+	@cd $(GEN)/$(OPENSSL_DIR) && make
+	@echo done.
+	@touch $(GEN)/$(OPENSSL_DIR)/.built
+
+$(GEN)/$(OPENSSL_DIR)/.configured: \
+        $(GEN)/$(OPENSSL_DIR)/.patched
+	@echo -n configuring openssl...
+	cd $(GEN)/$(OPENSSL_DIR) && $(OPENSSL_CONF_CMD) --openssldir=$(BLD_PREFIX) $(OPENSSL_CONF)
+	@echo done.
+	@touch $(GEN)/$(OPENSSL_DIR)/.configured
+
+$(GEN)/$(OPENSSL_DIR)/.patched: \
+		$(GEN)/$(OPENSSL_DIR)/.extracted
+	@echo applying patches...
+	# experimental patch to solve SNI+ALPN callback ordering in openssl
+	# not vital with latest httpd-alpn patch. We leave this out of our sandbox
+	# to have it running against an unpatched ssl for better test coverage.
+	#@cd gen/$(OPENSSL_DIR) && patch -p1 < ../../patches/openssl-1.0.2-alpn.patch
+	@echo openssl patched.
+	@touch $(GEN)/$(OPENSSL_DIR)/.patched
+
+$(GEN)/$(OPENSSL_DIR)/.extracted:
+	@echo -n downloading and extracting openssl...
+	@mkdir -p $(GEN)
+	@bash ../bin/get-openssl-latest.sh $(OPENSSL_URL) $(GEN)/$(OPENSSL_DIR)
+	@echo done.
+	@touch $(GEN)/$(OPENSSL_DIR)/.extracted
+
+################################################################################
+# Build + install a local libevent library (if needed)
+#
+$(INST_DIR)/.libevent-installed: \
+		$(GEN)/$(LIBEVENT_DIR)/.libevent-built
+	@echo -n installing libevent locally...
+	@cd $(GEN)/$(LIBEVENT_DIR) && make install >> ../build.log
+	@echo done.
+	@touch $(INST_DIR)/.libevent-installed
+
+$(GEN)/$(LIBEVENT_DIR)/.libevent-built: \
+		$(GEN)/$(LIBEVENT_DIR)/.libevent-configured
+	@echo -n building libevent locally...
+	@cd $(GEN)/$(LIBEVENT_DIR) && make >> ../build.log
+	@echo done.
+	@touch $(GEN)/$(LIBEVENT_DIR)/.libevent-built
+
+$(GEN)/$(LIBEVENT_DIR)/.libevent-configured: \
+        	$(GEN)/$(LIBEVENT_DIR)/.libevent-extracted
+	@echo -n configuring libevent...
+	@cd $(GEN)/$(LIBEVENT_DIR) && $(LIBEVENT_CONF_ENV) ./configure --prefix=$(BLD_PREFIX) --with-sysroot=$(BLD_PREFIX)
+	@echo done.
+	@touch $(GEN)/$(LIBEVENT_DIR)/.libevent-configured
+
+$(GEN)/$(LIBEVENT_DIR)/.libevent-extracted: \
+        $(GEN)/$(LIBEVENT_TAR)
+	@rm -rf $(GEN)/$(LIBEVENT_DIR)
+	@echo -n downloading and extracting libevent...
+	@cd gen; tar xfz $(LIBEVENT_TAR)
+	@echo done.
+	@touch $(GEN)/$(LIBEVENT_DIR)/.libevent-extracted
+
+$(GEN)/$(LIBEVENT_TAR):
+	@mkdir -p $(GEN)
+	curl $(CURL_OPTS) -L $(LIBEVENT_URL) > $(GEN)/$(LIBEVENT_TAR)
+
+################################################################################
+# Build + install a local libev library (if needed)
+#
+$(INST_DIR)/.libev-installed: \
+		$(GEN)/$(LIBEV_DIR)/.libev-built
+	@echo -n installing libev locally...
+	@cd $(GEN)/$(LIBEV_DIR) && make install >> ../build.log
+	@echo done.
+	@touch $(INST_DIR)/.libev-installed
+
+$(GEN)/$(LIBEV_DIR)/.libev-built: \
+		$(GEN)/$(LIBEV_DIR)/.libev-configured
+	@echo -n building libev locally...
+	@cd $(GEN)/$(LIBEV_DIR) && make >> ../build.log
+	@echo done.
+	@touch $(GEN)/$(LIBEV_DIR)/.libev-built
+
+$(GEN)/$(LIBEV_DIR)/.libev-configured: $(GEN)/$(LIBEV_TAR)
+	@rm -rf $(GEN)/$(LIBEV_DIR)
+	@cd $(GEN) && tar xfz $(LIBEV_TAR)
+	@echo -n configuring libev...
+	@cd $(GEN)/$(LIBEV_DIR) && $(LIBEV_CONF_ENV) ./configure --prefix=$(BLD_PREFIX)
+	@echo done.
+	@touch $(GEN)/$(LIBEV_DIR)/.libev-configured
+
+$(GEN)/$(LIBEV_TAR):
+	@mkdir -p $(GEN)
+	curl $(CURL_OPTS) -L $(LIBEV_URL) > $(GEN)/$(LIBEV_TAR)
+
+################################################################################
+# Build + install a local zlib library (if needed)
+#
+$(INST_DIR)/.zlib-installed: \
+		$(GEN)/$(ZLIB_DIR)/.zlib-built
+	@echo -n installing zlib locally...
+	@cd $(GEN)/$(ZLIB_DIR) && make install >> ../build.log
+	@echo done.
+	@touch $(INST_DIR)/.zlib-installed
+
+$(GEN)/$(ZLIB_DIR)/.zlib-built: \
+		$(GEN)/$(ZLIB_DIR)/.zlib-configured
+	@echo -n building zlib locally...
+	@cd $(GEN)/$(ZLIB_DIR) && make >> ../build.log
+	@echo done.
+	@touch $(GEN)/$(ZLIB_DIR)/.zlib-built
+
+$(GEN)/$(ZLIB_DIR)/.zlib-configured: $(GEN)/$(ZLIB_TAR)
+	@rm -rf $(GEN)/$(ZLIB_DIR)
+	@cd $(GEN) && tar xfz $(ZLIB_TAR)
+	@echo -n configuring zlib...
+	@cd $(GEN)/$(ZLIB_DIR) && ./configure --prefix=$(BLD_PREFIX)
+	@echo done.
+	@touch $(GEN)/$(ZLIB_DIR)/.zlib-configured
+
+$(GEN)/$(ZLIB_TAR):
+	@mkdir -p $(GEN)
+	curl $(CURL_OPTS) -L $(ZLIB_URL) > $(GEN)/$(ZLIB_TAR)
+

Added: httpd/test/mod_h2/trunk/test/load-urls-1.txt
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/load-urls-1.txt?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/load-urls-1.txt (added)
+++ httpd/test/mod_h2/trunk/test/load-urls-1.txt Mon Jul 13 10:04:32 2015
@@ -0,0 +1,181 @@
+SUBST_AUTH_SUBST/004.html
+SUBST_AUTH_SUBST/004/gophertiles.jpg
+SUBST_AUTH_SUBST/004/gophertiles_002.jpg
+SUBST_AUTH_SUBST/004/gophertiles_003.jpg
+SUBST_AUTH_SUBST/004/gophertiles_004.jpg
+SUBST_AUTH_SUBST/004/gophertiles_005.jpg
+SUBST_AUTH_SUBST/004/gophertiles_006.jpg
+SUBST_AUTH_SUBST/004/gophertiles_007.jpg
+SUBST_AUTH_SUBST/004/gophertiles_008.jpg
+SUBST_AUTH_SUBST/004/gophertiles_009.jpg
+SUBST_AUTH_SUBST/004/gophertiles_010.jpg
+SUBST_AUTH_SUBST/004/gophertiles_011.jpg
+SUBST_AUTH_SUBST/004/gophertiles_012.jpg
+SUBST_AUTH_SUBST/004/gophertiles_013.jpg
+SUBST_AUTH_SUBST/004/gophertiles_014.jpg
+SUBST_AUTH_SUBST/004/gophertiles_015.jpg
+SUBST_AUTH_SUBST/004/gophertiles_016.jpg
+SUBST_AUTH_SUBST/004/gophertiles_017.jpg
+SUBST_AUTH_SUBST/004/gophertiles_018.jpg
+SUBST_AUTH_SUBST/004/gophertiles_019.jpg
+SUBST_AUTH_SUBST/004/gophertiles_020.jpg
+SUBST_AUTH_SUBST/004/gophertiles_021.jpg
+SUBST_AUTH_SUBST/004/gophertiles_022.jpg
+SUBST_AUTH_SUBST/004/gophertiles_023.jpg
+SUBST_AUTH_SUBST/004/gophertiles_024.jpg
+SUBST_AUTH_SUBST/004/gophertiles_025.jpg
+SUBST_AUTH_SUBST/004/gophertiles_026.jpg
+SUBST_AUTH_SUBST/004/gophertiles_027.jpg
+SUBST_AUTH_SUBST/004/gophertiles_028.jpg
+SUBST_AUTH_SUBST/004/gophertiles_029.jpg
+SUBST_AUTH_SUBST/004/gophertiles_030.jpg
+SUBST_AUTH_SUBST/004/gophertiles_031.jpg
+SUBST_AUTH_SUBST/004/gophertiles_032.jpg
+SUBST_AUTH_SUBST/004/gophertiles_033.jpg
+SUBST_AUTH_SUBST/004/gophertiles_034.jpg
+SUBST_AUTH_SUBST/004/gophertiles_035.jpg
+SUBST_AUTH_SUBST/004/gophertiles_036.jpg
+SUBST_AUTH_SUBST/004/gophertiles_037.jpg
+SUBST_AUTH_SUBST/004/gophertiles_038.jpg
+SUBST_AUTH_SUBST/004/gophertiles_039.jpg
+SUBST_AUTH_SUBST/004/gophertiles_040.jpg
+SUBST_AUTH_SUBST/004/gophertiles_041.jpg
+SUBST_AUTH_SUBST/004/gophertiles_042.jpg
+SUBST_AUTH_SUBST/004/gophertiles_043.jpg
+SUBST_AUTH_SUBST/004/gophertiles_044.jpg
+SUBST_AUTH_SUBST/004/gophertiles_045.jpg
+SUBST_AUTH_SUBST/004/gophertiles_046.jpg
+SUBST_AUTH_SUBST/004/gophertiles_047.jpg
+SUBST_AUTH_SUBST/004/gophertiles_048.jpg
+SUBST_AUTH_SUBST/004/gophertiles_049.jpg
+SUBST_AUTH_SUBST/004/gophertiles_050.jpg
+SUBST_AUTH_SUBST/004/gophertiles_051.jpg
+SUBST_AUTH_SUBST/004/gophertiles_052.jpg
+SUBST_AUTH_SUBST/004/gophertiles_053.jpg
+SUBST_AUTH_SUBST/004/gophertiles_054.jpg
+SUBST_AUTH_SUBST/004/gophertiles_055.jpg
+SUBST_AUTH_SUBST/004/gophertiles_056.jpg
+SUBST_AUTH_SUBST/004/gophertiles_057.jpg
+SUBST_AUTH_SUBST/004/gophertiles_058.jpg
+SUBST_AUTH_SUBST/004/gophertiles_059.jpg
+SUBST_AUTH_SUBST/004/gophertiles_060.jpg
+SUBST_AUTH_SUBST/004/gophertiles_061.jpg
+SUBST_AUTH_SUBST/004/gophertiles_062.jpg
+SUBST_AUTH_SUBST/004/gophertiles_063.jpg
+SUBST_AUTH_SUBST/004/gophertiles_064.jpg
+SUBST_AUTH_SUBST/004/gophertiles_065.jpg
+SUBST_AUTH_SUBST/004/gophertiles_066.jpg
+SUBST_AUTH_SUBST/004/gophertiles_067.jpg
+SUBST_AUTH_SUBST/004/gophertiles_068.jpg
+SUBST_AUTH_SUBST/004/gophertiles_069.jpg
+SUBST_AUTH_SUBST/004/gophertiles_070.jpg
+SUBST_AUTH_SUBST/004/gophertiles_071.jpg
+SUBST_AUTH_SUBST/004/gophertiles_072.jpg
+SUBST_AUTH_SUBST/004/gophertiles_073.jpg
+SUBST_AUTH_SUBST/004/gophertiles_074.jpg
+SUBST_AUTH_SUBST/004/gophertiles_075.jpg
+SUBST_AUTH_SUBST/004/gophertiles_076.jpg
+SUBST_AUTH_SUBST/004/gophertiles_077.jpg
+SUBST_AUTH_SUBST/004/gophertiles_078.jpg
+SUBST_AUTH_SUBST/004/gophertiles_079.jpg
+SUBST_AUTH_SUBST/004/gophertiles_080.jpg
+SUBST_AUTH_SUBST/004/gophertiles_081.jpg
+SUBST_AUTH_SUBST/004/gophertiles_082.jpg
+SUBST_AUTH_SUBST/004/gophertiles_083.jpg
+SUBST_AUTH_SUBST/004/gophertiles_084.jpg
+SUBST_AUTH_SUBST/004/gophertiles_085.jpg
+SUBST_AUTH_SUBST/004/gophertiles_086.jpg
+SUBST_AUTH_SUBST/004/gophertiles_087.jpg
+SUBST_AUTH_SUBST/004/gophertiles_088.jpg
+SUBST_AUTH_SUBST/004/gophertiles_089.jpg
+SUBST_AUTH_SUBST/004/gophertiles_090.jpg
+SUBST_AUTH_SUBST/004/gophertiles_091.jpg
+SUBST_AUTH_SUBST/004/gophertiles_092.jpg
+SUBST_AUTH_SUBST/004/gophertiles_093.jpg
+SUBST_AUTH_SUBST/004/gophertiles_094.jpg
+SUBST_AUTH_SUBST/004/gophertiles_095.jpg
+SUBST_AUTH_SUBST/004/gophertiles_096.jpg
+SUBST_AUTH_SUBST/004/gophertiles_097.jpg
+SUBST_AUTH_SUBST/004/gophertiles_098.jpg
+SUBST_AUTH_SUBST/004/gophertiles_099.jpg
+SUBST_AUTH_SUBST/004/gophertiles_100.jpg
+SUBST_AUTH_SUBST/004/gophertiles_101.jpg
+SUBST_AUTH_SUBST/004/gophertiles_102.jpg
+SUBST_AUTH_SUBST/004/gophertiles_103.jpg
+SUBST_AUTH_SUBST/004/gophertiles_104.jpg
+SUBST_AUTH_SUBST/004/gophertiles_105.jpg
+SUBST_AUTH_SUBST/004/gophertiles_106.jpg
+SUBST_AUTH_SUBST/004/gophertiles_107.jpg
+SUBST_AUTH_SUBST/004/gophertiles_108.jpg
+SUBST_AUTH_SUBST/004/gophertiles_109.jpg
+SUBST_AUTH_SUBST/004/gophertiles_110.jpg
+SUBST_AUTH_SUBST/004/gophertiles_111.jpg
+SUBST_AUTH_SUBST/004/gophertiles_112.jpg
+SUBST_AUTH_SUBST/004/gophertiles_113.jpg
+SUBST_AUTH_SUBST/004/gophertiles_114.jpg
+SUBST_AUTH_SUBST/004/gophertiles_115.jpg
+SUBST_AUTH_SUBST/004/gophertiles_116.jpg
+SUBST_AUTH_SUBST/004/gophertiles_117.jpg
+SUBST_AUTH_SUBST/004/gophertiles_118.jpg
+SUBST_AUTH_SUBST/004/gophertiles_119.jpg
+SUBST_AUTH_SUBST/004/gophertiles_120.jpg
+SUBST_AUTH_SUBST/004/gophertiles_121.jpg
+SUBST_AUTH_SUBST/004/gophertiles_122.jpg
+SUBST_AUTH_SUBST/004/gophertiles_123.jpg
+SUBST_AUTH_SUBST/004/gophertiles_124.jpg
+SUBST_AUTH_SUBST/004/gophertiles_125.jpg
+SUBST_AUTH_SUBST/004/gophertiles_126.jpg
+SUBST_AUTH_SUBST/004/gophertiles_127.jpg
+SUBST_AUTH_SUBST/004/gophertiles_128.jpg
+SUBST_AUTH_SUBST/004/gophertiles_129.jpg
+SUBST_AUTH_SUBST/004/gophertiles_130.jpg
+SUBST_AUTH_SUBST/004/gophertiles_131.jpg
+SUBST_AUTH_SUBST/004/gophertiles_132.jpg
+SUBST_AUTH_SUBST/004/gophertiles_133.jpg
+SUBST_AUTH_SUBST/004/gophertiles_134.jpg
+SUBST_AUTH_SUBST/004/gophertiles_135.jpg
+SUBST_AUTH_SUBST/004/gophertiles_136.jpg
+SUBST_AUTH_SUBST/004/gophertiles_137.jpg
+SUBST_AUTH_SUBST/004/gophertiles_138.jpg
+SUBST_AUTH_SUBST/004/gophertiles_139.jpg
+SUBST_AUTH_SUBST/004/gophertiles_140.jpg
+SUBST_AUTH_SUBST/004/gophertiles_141.jpg
+SUBST_AUTH_SUBST/004/gophertiles_142.jpg
+SUBST_AUTH_SUBST/004/gophertiles_143.jpg
+SUBST_AUTH_SUBST/004/gophertiles_144.jpg
+SUBST_AUTH_SUBST/004/gophertiles_145.jpg
+SUBST_AUTH_SUBST/004/gophertiles_146.jpg
+SUBST_AUTH_SUBST/004/gophertiles_147.jpg
+SUBST_AUTH_SUBST/004/gophertiles_148.jpg
+SUBST_AUTH_SUBST/004/gophertiles_149.jpg
+SUBST_AUTH_SUBST/004/gophertiles_150.jpg
+SUBST_AUTH_SUBST/004/gophertiles_151.jpg
+SUBST_AUTH_SUBST/004/gophertiles_152.jpg
+SUBST_AUTH_SUBST/004/gophertiles_153.jpg
+SUBST_AUTH_SUBST/004/gophertiles_154.jpg
+SUBST_AUTH_SUBST/004/gophertiles_155.jpg
+SUBST_AUTH_SUBST/004/gophertiles_156.jpg
+SUBST_AUTH_SUBST/004/gophertiles_157.jpg
+SUBST_AUTH_SUBST/004/gophertiles_158.jpg
+SUBST_AUTH_SUBST/004/gophertiles_159.jpg
+SUBST_AUTH_SUBST/004/gophertiles_160.jpg
+SUBST_AUTH_SUBST/004/gophertiles_161.jpg
+SUBST_AUTH_SUBST/004/gophertiles_162.jpg
+SUBST_AUTH_SUBST/004/gophertiles_163.jpg
+SUBST_AUTH_SUBST/004/gophertiles_164.jpg
+SUBST_AUTH_SUBST/004/gophertiles_165.jpg
+SUBST_AUTH_SUBST/004/gophertiles_166.jpg
+SUBST_AUTH_SUBST/004/gophertiles_167.jpg
+SUBST_AUTH_SUBST/004/gophertiles_168.jpg
+SUBST_AUTH_SUBST/004/gophertiles_169.jpg
+SUBST_AUTH_SUBST/004/gophertiles_170.jpg
+SUBST_AUTH_SUBST/004/gophertiles_171.jpg
+SUBST_AUTH_SUBST/004/gophertiles_172.jpg
+SUBST_AUTH_SUBST/004/gophertiles_173.jpg
+SUBST_AUTH_SUBST/004/gophertiles_174.jpg
+SUBST_AUTH_SUBST/004/gophertiles_175.jpg
+SUBST_AUTH_SUBST/004/gophertiles_176.jpg
+SUBST_AUTH_SUBST/004/gophertiles_177.jpg
+SUBST_AUTH_SUBST/004/gophertiles_178.jpg
+SUBST_AUTH_SUBST/004/gophertiles_179.jpg
+SUBST_AUTH_SUBST/004/gophertiles_180.jpg

Added: httpd/test/mod_h2/trunk/test/test_alt_host.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_alt_host.sh?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_alt_host.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_alt_host.sh Mon Jul 13 10:04:32 2015
@@ -0,0 +1,48 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+source $(dirname $0)/test_common.sh
+echo "alt host access: $@"
+
+################################################################################
+# check access to other hosts on same connection
+################################################################################
+
+# The correct answer is 421 and mod_h2 will created if once the SSL parse 
+# request filter is no longer strict on SNI name checking. See
+# https://bz.apache.org/bugzilla/show_bug.cgi?id=58007#c9
+#
+MISDIR_STATUS="421 Misdirected Request"
+#MISDIR_STATUS="400 Bad Request"
+
+nghttp_check_content index.html "noh2 host" -H'Host: noh2.example.org' <<EOF
+[ERROR] HTTP/2 protocol was not selected. (nghttp2 expects h2)
+Some requests were not processed. total=1, processed=0
+EOF
+
+curl_check_content index.html "noh2 host" --http2 -H'Host: noh2.example.org' <<EOF
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html><head>
+<title>$MISDIR_STATUS</title>
+</head><body>
+<h1>Misdirected Request</h1>
+<p>The client needs a new connection for this
+request as the requested host name does not match
+the Server Name Indication (SNI) in use for this
+connection.</p>
+</body></html>
+EOF
+

Added: httpd/test/mod_h2/trunk/test/test_common.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_common.sh?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Mon Jul 13 10:04:32 2015
@@ -0,0 +1,249 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+# common test functions
+#
+
+URL_PREFIX="$1"
+OPT_DIRECT="$2"
+AUTH="${URL_PREFIX#*://}"
+HOST="${AUTH%%:*}"
+URL_SCHEME="${URL_PREFIX%%:*}"
+URL_PATH="/${AUTH#*/}"
+if [ "$URL_PATH" = "/$AUTH" ]; then
+    URL_PATH=""
+fi
+
+INSTALL_DIR="gen/apache"
+BIN_DIR="${INSTALL_DIR}/bin"
+if [ "${HOST#*.}" = 'example.org' ]; then
+    DOC_ROOT="htdocs/test.example.org"
+else 
+    DOC_ROOT="htdocs/${HOST}"
+fi
+
+GEN="gen"
+TMP="$GEN/tmp"
+
+CURL="${BIN_DIR}/curl  -sk --resolv ${HOST#*://}:127.0.0.1"
+NGHTTP="${BIN_DIR}/nghttp"
+
+
+fail() {
+    echo "$@"
+    exit 1
+}
+
+case "$OPT_DIRECT" in
+  "direct")
+        ARG_UPGRADE=""
+        ;;
+    *)  
+        ARG_UPGRADE=" -u"
+        ;;
+esac
+
+curl_check_doc() {
+    DOC="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"
+    echo -n " * curl /$DOC: $MSG..."
+    rm -rf $TMP
+    mkdir -p $TMP
+    ${CURL} $ARGS $URL_PREFIX/$DOC > $TMP/$DOC 2>&1 || fail
+    diff  $DOC_ROOT/$DOC $TMP/$DOC || fail
+    echo ok.
+}
+
+nghttp_check_doc() {
+    DOC="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"$ARG_UPGRADE
+    echo -n " * nghttp /$DOC: $MSG..."
+    rm -rf $TMP &&
+    mkdir -p $TMP &&
+    ${NGHTTP} $ARGS $URL_PREFIX/$DOC > $TMP/$DOC 2>&1 || fail
+    diff  $DOC_ROOT/$DOC $TMP/$DOC || fail
+    echo ok.
+}
+
+nghttp_check_assets() {
+    DOC="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"$ARG_UPGRADE
+    echo -n " * nghttp /$DOC: $MSG..."
+    rm -rf $TMP &&
+    mkdir -p $TMP &&
+    sort > $TMP/reference
+    ${NGHTTP} -ans $ARGS $URL_PREFIX/$DOC > $TMP/out 2>&1 || fail
+    fgrep " /" $TMP/out | while read id begin end dur stat size path; do
+        echo "$path $size $stat"
+    done | sort > $TMP/output || fail
+    diff $TMP/reference $TMP/output  || fail
+    echo ok.
+}
+
+nghttp_check_content() {
+    DOC="$1"; shift;
+    MSG="$1"; shift;
+    rm -rf $TMP
+    mkdir -p $TMP
+    cat > $TMP/expected
+    echo -n " * nghttp /$DOC: $MSG..."
+    ${NGHTTP} "$@" $URL_PREFIX/$DOC > $TMP/$DOC 2>&1 || fail
+    diff  $TMP/expected $TMP/$DOC || fail
+    echo ok.
+}
+
+
+curl_check_content() {
+    DOC="$1"; shift;
+    MSG="$1"; shift;
+    rm -rf $TMP
+    mkdir -p $TMP
+    cat > $TMP/expected
+    echo -n " * curl /$DOC: $MSG..."
+    ${CURL} "$@" $URL_PREFIX/$DOC > $TMP/$DOC 2>&1 || fail
+    diff  $TMP/expected $TMP/$DOC || fail
+    echo ok.
+}
+
+curl_check_redir() {
+    DOC="$1"; shift;
+    REF_DOC="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"
+    echo -n " * curl redir /$DOC: $MSG..."
+    rm -rf $TMP
+    mkdir -p $TMP
+    ${CURL} -D - $ARGS $URL_PREFIX/$DOC >$TMP/redir.out || fail
+    LOCATION=$( fgrep -i 'location:' $TMP/redir.out | sed -e "s,.*$URL_PREFIX/,," | tr -d '\r\n' )
+    test "$REF_DOC" != "$LOCATION" && fail "expected redirect to >>>$REF_DOC<<<, found >>>$LOCATION<<<"
+    ${CURL} $ARGS $URL_PREFIX/$LOCATION >$TMP/$LOCATION || fail
+    diff  $DOC_ROOT/$REF_DOC $TMP/$LOCATION || fail
+    echo ok.
+}
+
+curl_check_necho() {
+    COUNT="$1"; shift;
+    TEXT="$1"; shift;
+    REF="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"
+    rm -rf $TMP
+    mkdir -p $TMP
+    echo -n " * curl /necho.py?count=$COUNT&text=$TEXT..."
+    ${CURL} $ARGS -F count="$COUNT" -F text="$TEXT" $URL_PREFIX/necho.py > $TMP/echo 2>&1 || fail
+    diff  $REF $TMP/echo || fail
+    echo ok.
+}
+
+curl_post_file() {
+    DOC="$1"; shift;
+    FILE="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"
+    fname="$(basename $FILE)"
+    rm -rf $TMP
+    mkdir -p $TMP
+    echo -n " * curl /$DOC: $MSG..."
+    ${CURL} $ARGS --form file=@"$FILE" $URL_PREFIX/$DOC > $TMP/$DOC 2>&1 || fail "error uploading $fname"
+    ${CURL} $ARGS $URL_PREFIX/files/"$fname" > $TMP/data.down 2>&1 || fail "error downloding $fname"
+    diff  $FILE $TMP/data.down || fail
+    echo ok.
+}
+
+curl_post_data() {
+    DOC="$1"; shift;
+    FILE="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"
+    fname="$(basename $FILE)"
+    rm -rf $TMP
+    mkdir -p $TMP
+    echo -n " * curl /$DOC: $MSG..."
+    ${CURL} $ARGS --form file=@"$FILE" $URL_PREFIX/$DOC > $TMP/$DOC 2>&1 || fail
+    ${CURL} $ARGS $URL_PREFIX/files/"$fname" > $TMP/data.down 2>&1 || fail
+    diff  $FILE $TMP/data.down || fail
+    echo ok.
+}
+
+nghttp_remove_file() {
+    DOC="$1"; shift;
+    FILE="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"$ARG_UPGRADE
+    fname="$(basename $FILE)"
+    rm -rf $TMP
+    mkdir -p $TMP
+    cat > $TMP/updata <<EOF
+--DSAJKcd9876
+Content-Disposition: form-data; name="remove";
+Content-Type: text/plain
+
+$fname
+--DSAJKcd9876--
+EOF
+    echo -n " * nghttp /$DOC: rm $fname..."
+    ${NGHTTP} -v $ARGS --data=$TMP/updata -H'Content-Type: multipart/form-data; boundary=DSAJKcd9876' $URL_PREFIX/$DOC > $TMP/$DOC || fail "error removing $fname"
+    echo ok.
+}
+
+nghttp_post_file() {
+    DOC="$1"; shift;
+    FILE="$1"; shift;
+    MSG="$1"; shift;
+    ARGS="$@"$ARG_UPGRADE
+    fname="$(basename $FILE)"
+    rm -rf $TMP
+    mkdir -p $TMP
+    cat > $TMP/updata <<EOF
+--DSAJKcd9876
+Content-Disposition: form-data; name="xxx"; filename="xxxxx"
+Content-Type: text/plain
+
+testing mod_h2
+--DSAJKcd9876
+Content-Disposition: form-data; name="file"; filename="$fname"
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+
+EOF
+    cat $FILE >> $TMP/updata || fail "error reading $FILE"
+    echo >> $TMP/updata <<EOF
+--DSAJKcd9876--
+EOF
+    echo -n " * nghttp /$DOC: $MSG..."
+    ${NGHTTP} -v $ARGS --data=$TMP/updata -H'Content-Type: multipart/form-data; boundary=DSAJKcd9876' $URL_PREFIX/$DOC > $TMP/$DOC || fail "error uploading $fname"
+
+    ${NGHTTP} $ARG_UPGRADE $URL_PREFIX/files/"$fname" > $TMP/data.down || fail "error downloding $fname"
+    diff  $FILE $TMP/data.down || fail
+    echo ok.
+}
+
+curl_check_altsvc() {
+    DOC="$1"; shift;
+    EXP_ALT_SVC="$1"; shift;
+    MSG="$1"; shift;
+    mkdir -p $TMP
+    echo -n " * curl check alt_svc at /$DOC..."
+    ${CURL} "$@" -D $TMP/headers $URL_PREFIX/$DOC > /dev/null 2>&1 || fail
+    alt_svc="$( fgrep -i 'Alt-Svc: ' $TMP/headers | tr -d "\r\n" )"
+    alt_svc="${alt_svc#*: }"
+    test "$EXP_ALT_SVC" = "$alt_svc" || fail "failed. Expected '$EXP_ALT_SVC', got '$alt_svc'"
+    echo ok.
+}
+

Added: httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_curl_altsvc.sh Mon Jul 13 10:04:32 2015
@@ -0,0 +1,30 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+HTTP_URL="$1"
+HTTPS_URL="$2"
+
+source $(dirname $0)/test_common.sh
+echo "curl ALT-SVC on: $@"
+
+URL_PREFIX="$HTTP_URL"
+curl_check_altsvc index.html '' --http1.1
+curl_check_altsvc index.html '' "http/1.1, signal used"             --http1.1 -H'Alt-Svc-Used: 1'
+curl_check_altsvc index.html '' "http/2"                            --http2
+
+URL_PREFIX="$HTTPS_URL"
+curl_check_altsvc index.html 'h2=":12346", h2c=":12345", h2="mod-h2.greenbytes.de:12346"' "http/1.1" --http1.1
+curl_check_altsvc index.html '' "http/2" --http2

Added: httpd/test/mod_h2/trunk/test/test_curl_get.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_curl_get.sh?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_curl_get.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_curl_get.sh Mon Jul 13 10:04:32 2015
@@ -0,0 +1,132 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+source $(dirname $0)/test_common.sh
+echo "curl GET on: $@"
+
+################################################################################
+# check content of resources via different methods
+################################################################################
+curl_check_doc index.html "default"
+curl_check_doc index.html "http/1.1" --http1.1
+curl_check_doc index.html "http2"    --http2
+
+################################################################################
+# check some redir handling
+################################################################################
+curl_check_doc xxx-1.0.2a.tar.gz  "http2"  --http2
+
+if [ "$URL_PATH" = "" ]; then
+    curl_check_redir latest.tar.gz  xxx-1.0.2a.tar.gz  "http2"  --http2
+fi
+
+################################################################################
+# check cgi generated content
+################################################################################
+if [ "$URL_SCHEME" = "https" ]; then
+    CONTENT="<html>
+<body>
+<h2>Hello World!</h2>
+SSL_PROTOCOL=TLSv1.2
+</body>
+</html>"
+else
+    CONTENT="<html>
+<body>
+<h2>Hello World!</h2>
+SSL_PROTOCOL=
+</body>
+</html>"
+fi
+
+curl_check_content hello.py "default" <<EOF
+$CONTENT
+EOF
+
+curl_check_content hello.py "http/1.1" --http1.1 <<EOF
+$CONTENT
+EOF
+
+curl_check_content hello.py "http2"    --http2 <<EOF
+$CONTENT
+EOF
+
+
+curl_check_content upload.py "http/1.1" --http1.1 <<EOF
+    <html><body>
+    <p>        Upload File<form method="POST" enctype="multipart/form-data">
+        <input type="file" name="file">
+        <button type="submit">Upload</button></form>
+        </p>
+    </body></html>
+EOF
+
+curl_check_content upload.py "http2"    --http2 <<EOF
+    <html><body>
+    <p>        Upload File<form method="POST" enctype="multipart/form-data">
+        <input type="file" name="file">
+        <button type="submit">Upload</button></form>
+        </p>
+    </body></html>
+EOF
+
+
+################################################################################
+# check chunked content from cgi
+################################################################################
+
+if [ ! -f $GEN/necho-100 ]; then
+i=0; while [ $i -lt 10 ]; do
+echo "0123456789"
+i=$[ i + 1 ]
+done > $GEN/necho-100
+fi
+
+if [ ! -f $GEN/necho-1k ]; then
+i=0; while [ $i -lt 10 ]; do
+cat $GEN/necho-100
+i=$[ i + 1 ]
+done > $GEN/necho-1k
+fi
+
+if [ ! -f $GEN/necho-10k ]; then
+i=0; while [ $i -lt 10 ]; do
+cat $GEN/necho-1k
+i=$[ i + 1 ]
+done > $GEN/necho-10k
+fi
+
+if [ ! -f $GEN/necho-100k ]; then
+i=0; while [ $i -lt 10 ]; do
+cat $GEN/necho-10k
+i=$[ i + 1 ]
+done > $GEN/necho-100k
+fi
+
+if [ ! -f $GEN/necho-1m ]; then
+i=0; while [ $i -lt 10 ]; do
+cat $GEN/necho-100k
+i=$[ i + 1 ]
+done > $GEN/necho-1m
+fi
+
+curl_check_necho 10 "0123456789" $GEN/necho-100 "http/2" --http2
+curl_check_necho 100 "0123456789" $GEN/necho-1k "http/2" --http2
+curl_check_necho 1000 "0123456789" $GEN/necho-10k "http/2" --http2
+curl_check_necho 10000 "0123456789" $GEN/necho-100k "http/2" --http2
+curl_check_necho 100000 "0123456789" $GEN/necho-1m "http/2" --http2
+
+

Added: httpd/test/mod_h2/trunk/test/test_curl_post.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_curl_post.sh?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_curl_post.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_curl_post.sh Mon Jul 13 10:04:32 2015
@@ -0,0 +1,71 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+source $(dirname $0)/test_common.sh
+echo "curl POST on: $@"
+
+CHR100="012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
+"
+
+if [ ! -f $GEN/data-1k ]; then
+    i=0; while [ $i -lt 10 ]; do
+        echo -n "$CHR100"
+        i=$[ i + 1 ]
+    done > $GEN/data-1k
+fi
+
+if [ ! -f $GEN/data-10k ]; then
+    i=0; while [ $i -lt 10 ]; do
+        cat $GEN/data-1k
+        i=$[ i + 1 ]
+    done  > $GEN/data-10k
+fi
+
+if [ ! -f $GEN/data-100k ]; then
+    i=0; while [ $i -lt 10 ]; do
+        cat $GEN/data-10k
+        i=$[ i + 1 ]
+    done > $GEN/data-100k
+fi
+
+if [ ! -f $GEN/data-1m ]; then
+    i=0; while [ $i -lt 10 ]; do
+        cat $GEN/data-100k
+        i=$[ i + 1 ]
+    done > $GEN/data-1m
+fi
+
+# just a check that things are working
+curl_post_data upload.py $GEN/data-1k "file upload via http/1.1" --http1.1
+
+# on curl 7.40.0 and earlier, there will be a delay before the upload
+# commences. Fix is underway, thanks @badger!
+# Caveat: on h2c, the connection will not be upgraded, since curl sends
+# the POST as first request and mod_h2 does not upgrade on requests with
+# content. Currently we have no means to check that his is happening.
+# on curl 7.41.0 and earlier, the transfer of the upload data will be
+# extremely slow. Fix will be in 7.42.0, thanks @bagder!
+#
+# disable until 7.42.0 arrives....
+#curl_post_data upload.py $GEN/data-1k "1k file upload via http/2" --http2
+#curl_post_data upload.py $GEN/data-10k "10k file upload via http/2" --http2
+#curl_post_data upload.py $GEN/data-100k "100k file upload via http/2" --http2
+#curl_post_data upload.py $GEN/data-1m "1m file upload via http/2" --http2
+
+
+
+
+

Added: httpd/test/mod_h2/trunk/test/test_nghttp_get.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_nghttp_get.sh?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_nghttp_get.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_nghttp_get.sh Mon Jul 13 10:04:32 2015
@@ -0,0 +1,279 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+source $(dirname $0)/test_common.sh
+echo "nghttp GET on: $@"
+
+################################################################################
+# check content of resources via different methods
+################################################################################
+nghttp_check_doc index.html "default"
+nghttp_check_doc 003.html   "detault"
+
+
+################################################################################
+# check retrieving multiple resources from inside a page
+################################################################################
+nghttp_check_assets 001.html "with assets" <<EOF
+$URL_PATH/001.html 251 200
+EOF
+
+nghttp_check_assets 002.jpg "with assets" <<EOF
+$URL_PATH/002.jpg 88K 200
+EOF
+
+nghttp_check_assets 003.html "with assets" <<EOF
+$URL_PATH/003.html 316 200
+$URL_PATH/003/003_img.jpg 88K 200
+EOF
+
+nghttp_check_assets 004.html "with assets" <<EOF
+$URL_PATH/004.html 10K 200
+$URL_PATH/004/gophertiles.jpg 742 200
+$URL_PATH/004/gophertiles_002.jpg 945 200
+$URL_PATH/004/gophertiles_003.jpg 697 200
+$URL_PATH/004/gophertiles_004.jpg 725 200
+$URL_PATH/004/gophertiles_005.jpg 837 200
+$URL_PATH/004/gophertiles_006.jpg 770 200
+$URL_PATH/004/gophertiles_007.jpg 747 200
+$URL_PATH/004/gophertiles_008.jpg 694 200
+$URL_PATH/004/gophertiles_009.jpg 704 200
+$URL_PATH/004/gophertiles_010.jpg 994 200
+$URL_PATH/004/gophertiles_011.jpg 979 200
+$URL_PATH/004/gophertiles_012.jpg 895 200
+$URL_PATH/004/gophertiles_013.jpg 958 200
+$URL_PATH/004/gophertiles_014.jpg 894 200
+$URL_PATH/004/gophertiles_015.jpg 702 200
+$URL_PATH/004/gophertiles_016.jpg 703 200
+$URL_PATH/004/gophertiles_017.jpg 707 200
+$URL_PATH/004/gophertiles_018.jpg 701 200
+$URL_PATH/004/gophertiles_019.jpg 1013 200
+$URL_PATH/004/gophertiles_020.jpg 737 200
+$URL_PATH/004/gophertiles_021.jpg 801 200
+$URL_PATH/004/gophertiles_022.jpg 702 200
+$URL_PATH/004/gophertiles_023.jpg 905 200
+$URL_PATH/004/gophertiles_024.jpg 980 200
+$URL_PATH/004/gophertiles_025.jpg 708 200
+$URL_PATH/004/gophertiles_026.jpg 694 200
+$URL_PATH/004/gophertiles_027.jpg 697 200
+$URL_PATH/004/gophertiles_028.jpg 795 200
+$URL_PATH/004/gophertiles_029.jpg 978 200
+$URL_PATH/004/gophertiles_030.jpg 707 200
+$URL_PATH/004/gophertiles_031.jpg 1K 200
+$URL_PATH/004/gophertiles_032.jpg 688 200
+$URL_PATH/004/gophertiles_033.jpg 701 200
+$URL_PATH/004/gophertiles_034.jpg 898 200
+$URL_PATH/004/gophertiles_035.jpg 986 200
+$URL_PATH/004/gophertiles_036.jpg 770 200
+$URL_PATH/004/gophertiles_037.jpg 959 200
+$URL_PATH/004/gophertiles_038.jpg 936 200
+$URL_PATH/004/gophertiles_039.jpg 700 200
+$URL_PATH/004/gophertiles_040.jpg 784 200
+$URL_PATH/004/gophertiles_041.jpg 758 200
+$URL_PATH/004/gophertiles_042.jpg 796 200
+$URL_PATH/004/gophertiles_043.jpg 813 200
+$URL_PATH/004/gophertiles_044.jpg 924 200
+$URL_PATH/004/gophertiles_045.jpg 978 200
+$URL_PATH/004/gophertiles_046.jpg 752 200
+$URL_PATH/004/gophertiles_047.jpg 751 200
+$URL_PATH/004/gophertiles_048.jpg 737 200
+$URL_PATH/004/gophertiles_049.jpg 992 200
+$URL_PATH/004/gophertiles_050.jpg 688 200
+$URL_PATH/004/gophertiles_051.jpg 697 200
+$URL_PATH/004/gophertiles_052.jpg 699 200
+$URL_PATH/004/gophertiles_053.jpg 1K 200
+$URL_PATH/004/gophertiles_054.jpg 694 200
+$URL_PATH/004/gophertiles_055.jpg 767 200
+$URL_PATH/004/gophertiles_056.jpg 952 200
+$URL_PATH/004/gophertiles_057.jpg 788 200
+$URL_PATH/004/gophertiles_058.jpg 759 200
+$URL_PATH/004/gophertiles_059.jpg 700 200
+$URL_PATH/004/gophertiles_060.jpg 985 200
+$URL_PATH/004/gophertiles_061.jpg 915 200
+$URL_PATH/004/gophertiles_062.jpg 681 200
+$URL_PATH/004/gophertiles_063.jpg 707 200
+$URL_PATH/004/gophertiles_064.jpg 693 200
+$URL_PATH/004/gophertiles_065.jpg 861 200
+$URL_PATH/004/gophertiles_066.jpg 991 200
+$URL_PATH/004/gophertiles_067.jpg 1K 200
+$URL_PATH/004/gophertiles_068.jpg 697 200
+$URL_PATH/004/gophertiles_069.jpg 1K 200
+$URL_PATH/004/gophertiles_070.jpg 1K 200
+$URL_PATH/004/gophertiles_071.jpg 784 200
+$URL_PATH/004/gophertiles_072.jpg 698 200
+$URL_PATH/004/gophertiles_073.jpg 1004 200
+$URL_PATH/004/gophertiles_074.jpg 969 200
+$URL_PATH/004/gophertiles_075.jpg 915 200
+$URL_PATH/004/gophertiles_076.jpg 784 200
+$URL_PATH/004/gophertiles_077.jpg 697 200
+$URL_PATH/004/gophertiles_078.jpg 692 200
+$URL_PATH/004/gophertiles_079.jpg 702 200
+$URL_PATH/004/gophertiles_080.jpg 725 200
+$URL_PATH/004/gophertiles_081.jpg 877 200
+$URL_PATH/004/gophertiles_082.jpg 743 200
+$URL_PATH/004/gophertiles_083.jpg 785 200
+$URL_PATH/004/gophertiles_084.jpg 690 200
+$URL_PATH/004/gophertiles_085.jpg 724 200
+$URL_PATH/004/gophertiles_086.jpg 1K 200
+$URL_PATH/004/gophertiles_087.jpg 883 200
+$URL_PATH/004/gophertiles_088.jpg 702 200
+$URL_PATH/004/gophertiles_089.jpg 693 200
+$URL_PATH/004/gophertiles_090.jpg 947 200
+$URL_PATH/004/gophertiles_091.jpg 959 200
+$URL_PATH/004/gophertiles_092.jpg 736 200
+$URL_PATH/004/gophertiles_093.jpg 806 200
+$URL_PATH/004/gophertiles_094.jpg 820 200
+$URL_PATH/004/gophertiles_095.jpg 918 200
+$URL_PATH/004/gophertiles_096.jpg 689 200
+$URL_PATH/004/gophertiles_097.jpg 796 200
+$URL_PATH/004/gophertiles_098.jpg 686 200
+$URL_PATH/004/gophertiles_099.jpg 698 200
+$URL_PATH/004/gophertiles_100.jpg 686 200
+$URL_PATH/004/gophertiles_101.jpg 686 200
+$URL_PATH/004/gophertiles_102.jpg 682 200
+$URL_PATH/004/gophertiles_103.jpg 703 200
+$URL_PATH/004/gophertiles_104.jpg 698 200
+$URL_PATH/004/gophertiles_105.jpg 702 200
+$URL_PATH/004/gophertiles_106.jpg 989 200
+$URL_PATH/004/gophertiles_107.jpg 720 200
+$URL_PATH/004/gophertiles_108.jpg 834 200
+$URL_PATH/004/gophertiles_109.jpg 756 200
+$URL_PATH/004/gophertiles_110.jpg 703 200
+$URL_PATH/004/gophertiles_111.jpg 815 200
+$URL_PATH/004/gophertiles_112.jpg 780 200
+$URL_PATH/004/gophertiles_113.jpg 992 200
+$URL_PATH/004/gophertiles_114.jpg 862 200
+$URL_PATH/004/gophertiles_115.jpg 1K 200
+$URL_PATH/004/gophertiles_116.jpg 756 200
+$URL_PATH/004/gophertiles_117.jpg 1012 200
+$URL_PATH/004/gophertiles_118.jpg 905 200
+$URL_PATH/004/gophertiles_119.jpg 808 200
+$URL_PATH/004/gophertiles_120.jpg 814 200
+$URL_PATH/004/gophertiles_121.jpg 832 200
+$URL_PATH/004/gophertiles_122.jpg 704 200
+$URL_PATH/004/gophertiles_123.jpg 741 200
+$URL_PATH/004/gophertiles_124.jpg 694 200
+$URL_PATH/004/gophertiles_125.jpg 950 200
+$URL_PATH/004/gophertiles_126.jpg 770 200
+$URL_PATH/004/gophertiles_127.jpg 749 200
+$URL_PATH/004/gophertiles_128.jpg 942 200
+$URL_PATH/004/gophertiles_129.jpg 997 200
+$URL_PATH/004/gophertiles_130.jpg 708 200
+$URL_PATH/004/gophertiles_131.jpg 821 200
+$URL_PATH/004/gophertiles_132.jpg 849 200
+$URL_PATH/004/gophertiles_133.jpg 715 200
+$URL_PATH/004/gophertiles_134.jpg 794 200
+$URL_PATH/004/gophertiles_135.jpg 869 200
+$URL_PATH/004/gophertiles_136.jpg 1K 200
+$URL_PATH/004/gophertiles_137.jpg 757 200
+$URL_PATH/004/gophertiles_138.jpg 991 200
+$URL_PATH/004/gophertiles_139.jpg 704 200
+$URL_PATH/004/gophertiles_140.jpg 707 200
+$URL_PATH/004/gophertiles_141.jpg 959 200
+$URL_PATH/004/gophertiles_142.jpg 691 200
+$URL_PATH/004/gophertiles_143.jpg 921 200
+$URL_PATH/004/gophertiles_144.jpg 932 200
+$URL_PATH/004/gophertiles_145.jpg 696 200
+$URL_PATH/004/gophertiles_146.jpg 711 200
+$URL_PATH/004/gophertiles_147.jpg 817 200
+$URL_PATH/004/gophertiles_148.jpg 966 200
+$URL_PATH/004/gophertiles_149.jpg 1002 200
+$URL_PATH/004/gophertiles_150.jpg 900 200
+$URL_PATH/004/gophertiles_151.jpg 724 200
+$URL_PATH/004/gophertiles_152.jpg 1K 200
+$URL_PATH/004/gophertiles_153.jpg 702 200
+$URL_PATH/004/gophertiles_154.jpg 971 200
+$URL_PATH/004/gophertiles_155.jpg 708 200
+$URL_PATH/004/gophertiles_156.jpg 699 200
+$URL_PATH/004/gophertiles_157.jpg 834 200
+$URL_PATH/004/gophertiles_158.jpg 702 200
+$URL_PATH/004/gophertiles_159.jpg 880 200
+$URL_PATH/004/gophertiles_160.jpg 701 200
+$URL_PATH/004/gophertiles_161.jpg 688 200
+$URL_PATH/004/gophertiles_162.jpg 853 200
+$URL_PATH/004/gophertiles_163.jpg 690 200
+$URL_PATH/004/gophertiles_164.jpg 759 200
+$URL_PATH/004/gophertiles_165.jpg 831 200
+$URL_PATH/004/gophertiles_166.jpg 732 200
+$URL_PATH/004/gophertiles_167.jpg 955 200
+$URL_PATH/004/gophertiles_168.jpg 1K 200
+$URL_PATH/004/gophertiles_169.jpg 969 200
+$URL_PATH/004/gophertiles_170.jpg 701 200
+$URL_PATH/004/gophertiles_171.jpg 755 200
+$URL_PATH/004/gophertiles_172.jpg 924 200
+$URL_PATH/004/gophertiles_173.jpg 958 200
+$URL_PATH/004/gophertiles_174.jpg 998 200
+$URL_PATH/004/gophertiles_175.jpg 702 200
+$URL_PATH/004/gophertiles_176.jpg 760 200
+$URL_PATH/004/gophertiles_177.jpg 732 200
+$URL_PATH/004/gophertiles_178.jpg 929 200
+$URL_PATH/004/gophertiles_179.jpg 712 200
+$URL_PATH/004/gophertiles_180.jpg 1013 200
+EOF
+
+nghttp_check_assets 005.txt "with assets" <<EOF
+$URL_PATH/005.txt 9M 200
+EOF
+
+nghttp_check_assets 006.html "with assets" <<EOF
+$URL_PATH/006.html 543 200
+$URL_PATH/006/006.css 216 200
+$URL_PATH/006/006.js 839 200
+EOF
+
+nghttp_check_assets 007.html "with assets" <<EOF
+$URL_PATH/007.html 808 200
+EOF
+
+nghttp_check_assets upload.py "with assets" <<EOF
+$URL_PATH/upload.py 219 200
+EOF
+
+#nghttp_check_assets 009.php "with assets" <<EOF
+#EOF
+#
+################################################################################
+# check different window sizes
+################################################################################
+nghttp_check_assets 003.html "with assets" --window-bits=24 <<EOF
+$URL_PATH/003.html 316 200
+$URL_PATH/003/003_img.jpg 88K 200
+EOF
+
+################################################################################
+# check cgi generated content
+################################################################################
+
+if [ "$URL_SCHEME" = "https" ]; then
+    CONTENT="<html>
+<body>
+<h2>Hello World!</h2>
+SSL_PROTOCOL=TLSv1.2
+</body>
+</html>"
+else
+    CONTENT="<html>
+<body>
+<h2>Hello World!</h2>
+SSL_PROTOCOL=
+</body>
+</html>"
+fi
+
+nghttp_check_content hello.py "get hello.py"   <<EOF
+$CONTENT
+EOF
+

Added: httpd/test/mod_h2/trunk/test/test_nghttp_post.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_nghttp_post.sh?rev=1690620&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_nghttp_post.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_nghttp_post.sh Mon Jul 13 10:04:32 2015
@@ -0,0 +1,75 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+source $(dirname $0)/test_common.sh
+echo "nghttp POST on: $@"
+
+CHR100="012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678
+"
+
+if [ ! -f $GEN/data-1k ]; then
+    i=0; while [ $i -lt 10 ]; do
+        echo -n "$CHR100"
+        i=$[ i + 1 ]
+    done > $GEN/data-1k
+fi
+
+if [ ! -f $GEN/data-10k ]; then
+    i=0; while [ $i -lt 10 ]; do
+        cat $GEN/data-1k
+        i=$[ i + 1 ]
+    done  > $GEN/data-10k
+fi
+
+if [ ! -f $GEN/data-100k ]; then
+    i=0; while [ $i -lt 10 ]; do
+        cat $GEN/data-10k
+        i=$[ i + 1 ]
+    done > $GEN/data-100k
+fi
+
+if [ ! -f $GEN/data-1m ]; then
+    i=0; while [ $i -lt 10 ]; do
+        cat $GEN/data-100k
+        i=$[ i + 1 ]
+    done > $GEN/data-1m
+fi
+
+# Tests witht the nghttp client that *requires* h2/h2c. Sends "OPTIONS *"
+# on h2c which is a good test.
+#
+nghttp_remove_file upload.py data-1k  "rm data-1k"
+nghttp_post_file upload.py $GEN/data-1k   "1k upload"
+nghttp_remove_file upload.py data-10k  "rm data-10k"
+nghttp_post_file upload.py $GEN/data-10k  "10k upload"
+nghttp_remove_file upload.py data-100k  "rm data-100k"
+nghttp_post_file upload.py $GEN/data-100k "100k upload"
+nghttp_remove_file upload.py data-1m  "rm data-1m"
+nghttp_post_file upload.py $GEN/data-1m   "1m upload"
+
+# Tests without content-length announced
+nghttp_remove_file upload.py data-1k  "rm data-1k"
+nghttp_post_file upload.py $GEN/data-1k   "1k upload w/o c-len" --no-content-length
+nghttp_remove_file upload.py data-10k  "rm data-10k"
+nghttp_post_file upload.py $GEN/data-10k  "10k upload w/o c-len" --no-content-length
+nghttp_remove_file upload.py data-100k  "rm data-100k"
+nghttp_post_file upload.py $GEN/data-100k "100k upload w/o c-len" --no-content-length
+nghttp_remove_file upload.py data-1m  "rm data-1m"
+nghttp_post_file upload.py $GEN/data-1m   "1m upload w/o c-len" --no-content-length
+
+
+
+