Browse code

Merge "Set specified header size when enabling tls-proxy"

Jenkins authored on 2017/06/30 08:00:35
Showing 2 changed files
... ...
@@ -842,7 +842,7 @@ function start_swift {
842 842
 
843 843
     if is_service_enabled tls-proxy; then
844 844
         local proxy_port=${SWIFT_DEFAULT_BIND_PORT}
845
-        start_tls_proxy swift '*' $proxy_port $SERVICE_HOST $SWIFT_DEFAULT_BIND_PORT_INT
845
+        start_tls_proxy swift '*' $proxy_port $SERVICE_HOST $SWIFT_DEFAULT_BIND_PORT_INT $SWIFT_MAX_HEADER_SIZE
846 846
     fi
847 847
     run_process s-proxy "$SWIFT_BIN_DIR/swift-proxy-server ${SWIFT_CONF_DIR}/proxy-server.conf -v"
848 848
 
... ...
@@ -494,6 +494,8 @@ function start_tls_proxy {
494 494
     local f_port=$3
495 495
     local b_host=$4
496 496
     local b_port=$5
497
+    # 8190 is the default apache size.
498
+    local f_header_size=${6:-8190}
497 499
 
498 500
     tune_apache_connections
499 501
 
... ...
@@ -521,6 +523,11 @@ $listen_string
521 521
     # ('Connection aborted.', BadStatusLine("''",)) error
522 522
     KeepAlive Off
523 523
 
524
+    # This increase in allowed request header sizes is required
525
+    # for swift functional testing to work with tls enabled. It is 2 bytes
526
+    # larger than the apache default of 8190.
527
+    LimitRequestFieldSize $f_header_size
528
+
524 529
     <Location />
525 530
         ProxyPass http://$b_host:$b_port/ retry=0 nocanon
526 531
         ProxyPassReverse http://$b_host:$b_port/