More travis fixes
authorgggeek <giunta.gaetano@gmail.com>
Fri, 20 Mar 2015 11:22:47 +0000 (11:22 +0000)
committergggeek <giunta.gaetano@gmail.com>
Fri, 20 Mar 2015 11:22:47 +0000 (11:22 +0000)
.travis.yml
src/Server.php

index c1a57b3..0f0c421 100644 (file)
@@ -18,19 +18,23 @@ install:
 
 before_script:
   # Disable xdebug. NB: this should NOT be done for hhvm...
-  - if [ $TRAVIS_PHP_VERSION != "hhvm" -a $TRAVIS_PHP_VERSION != "7.0" ]; then phpenv config-rm xdebug.ini; fi
+  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "7.0" ]; then phpenv config-rm xdebug.ini; fi
 
   # We set up an Apache instance inside the Travis VM and test it.
-  - if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then ./tests/ci/travis/setup_apache.sh; fi
-  - if [ '$TRAVIS_PHP_VERSION' = 'hhvm' ]; then ./tests/ci/travis/setup_apache_hhvm.sh; fi
+  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./tests/ci/travis/setup_apache.sh; fi
+  - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./tests/ci/travis/setup_apache_hhvm.sh; fi
   - ./tests/ci/travis/setup_privoxy.sh
 
 script:
   # to have code coverage: --coverage-clover=coverage.clover
   phpunit tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=gggeek.ssl.altervista.org HTTPSURI=/sw/xmlrpc/demo/server/server.php PROXY=localhost:8080
 
+after_failure:
+  - cat apache_error.log
+  - cat apache_access.log
+  - cat /tmp/hhvm.log
+
 after_script:
-  cat $TRAVIS_BUILD_DIR/apache_error.log $TRAVIS_BUILD_DIR/apache_access.log /tmp/hhvm.log
 #  # upload code-coverage to Scrutinizer
 #  - wget https://scrutinizer-ci.com/ocular.phar
 #  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
index 5d28c45..1669e17 100644 (file)
@@ -706,7 +706,7 @@ class Server
      */
     public function echoInput()
     {
-        $r = new Response(new Value("'Aha said I: '" . $GLOBALS['HTTP_RAW_POST_DATA'], 'string'));
+        $r = new Response(new Value("'Aha said I: '" . file_get_contents('php://input'), 'string'));
         print $r->serialize();
     }