[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/lib/libcurl/curl-7.54.1/tests/http2-server.pl b/ap/lib/libcurl/curl-7.54.1/tests/http2-server.pl
new file mode 100755
index 0000000..086d5aa
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.54.1/tests/http2-server.pl
@@ -0,0 +1,83 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+#***************************************************************************
+
+# This script invokes nghttpx properly to have it serve HTTP/2 for us.
+# nghttpx runs as a proxy in front of our "actual" HTTP/1 server.
+
+my $pidfile = "log/nghttpx.pid";
+my $logfile = "log/http2.log";
+my $nghttpx = "nghttpx";
+my $listenport = 9015;
+my $connect = "127.0.0.1,8990";
+
+#***************************************************************************
+# Process command line options
+#
+while(@ARGV) {
+ if($ARGV[0] eq '--verbose') {
+ $verbose = 1;
+ }
+ elsif($ARGV[0] eq '--pidfile') {
+ if($ARGV[1]) {
+ $pidfile = $ARGV[1];
+ shift @ARGV;
+ }
+ }
+ elsif($ARGV[0] eq '--nghttpx') {
+ if($ARGV[1]) {
+ $nghttpx = $ARGV[1];
+ shift @ARGV;
+ }
+ }
+ elsif($ARGV[0] eq '--port') {
+ if($ARGV[1]) {
+ $listenport = $ARGV[1];
+ shift @ARGV;
+ }
+ }
+ elsif($ARGV[0] eq '--connect') {
+ if($ARGV[1]) {
+ $connect = $ARGV[1];
+ $connect =~ s/:/,/;
+ shift @ARGV;
+ }
+ }
+ elsif($ARGV[0] eq '--logfile') {
+ if($ARGV[1]) {
+ $logfile = $ARGV[1];
+ shift @ARGV;
+ }
+ }
+ else {
+ print STDERR "\nWarning: http2-server.pl unknown parameter: $ARGV[0]\n";
+ }
+ shift @ARGV;
+}
+
+my $cmdline="$nghttpx --backend=$connect ".
+ "--frontend=\"*,$listenport;no-tls\" ".
+ "--log-level=INFO ".
+ "--pid-file=$pidfile ".
+ "--errorlog-file=$logfile";
+print "RUN: $cmdline\n" if($verbose);
+system("$cmdline 2>/dev/null");