prepare v4.2.5 master
authorMichael Wallner <mike@php.net>
Mon, 5 Feb 2024 19:36:16 +0000 (20:36 +0100)
committerMichael Wallner <mike@php.net>
Mon, 5 Feb 2024 19:36:16 +0000 (20:36 +0100)
* Fix incompatible pointer types (32-bit) (see gh issue #134)
* Fix glitch in CURL_VERSION_TLSAUTH_SRP autoconf probe (see gh issue #133)

32 files changed:
.github/Makefile [new file with mode: 0644]
.github/workflows/ci.yml
.github/workflows/curl-matrix.yml
.gitignore
BUGS
CHANGELOG.md
autoconf/pecl/libbrotli.m4
autoconf/pecl/libcurl.m4
autoconf/pecl/pecl.m4
config9.m4
package.xml
php_http.h
scripts/curlver.dist
scripts/gen_curlinfo.php
scripts/gen_github_workflow_ci.php
scripts/gen_github_workflow_curl-matrix.php
src/php_http_client.c
src/php_http_client_curl.c
src/php_http_client_curl_event.c
src/php_http_client_curl_user.c
src/php_http_cookie.c
src/php_http_header.c
src/php_http_message.c
src/php_http_message_body.c
src/php_http_params.c
src/php_http_querystring.c
src/php_http_url.c
tests/client012.phpt
tests/client021.phpt
tests/client025.phpt
tests/helper/dump.inc
tests/helper/server.inc

diff --git a/.github/Makefile b/.github/Makefile
new file mode 100644 (file)
index 0000000..29166f3
--- /dev/null
@@ -0,0 +1,8 @@
+.PHONY: all
+all: workflows/ci.yml
+all: workflows/curl-matrix.yml
+
+workflows/%.yml: ../scripts/gen_github_workflow_%.php
+       $<>$@
+
+workflows/curl-matrix.yml: ../scripts/curlver.dist
index 6e0dc3d4f3d73506c0e1bda90e1167aee3c1fb66..e04f594253ff10de7427e41dcb249edf25324ed5 100644 (file)
@@ -7,8 +7,8 @@ on:
   pull_request:
 
 jobs:
-  master-0:
-    name: master-0
+  next-0:
+    name: "next-0 (master)"
     continue-on-error: true
     env:
       PHP: "master"
@@ -16,18 +16,21 @@ jobs:
       enable_zts: "yes"
       enable_iconv: "yes"
       TEST_PHP_ARGS: "-d error_reporting=24575"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
@@ -44,28 +47,107 @@ jobs:
         run: |
           make -f scripts/ci/Makefile test
 
-  cur-none-0:
-    name: cur-none-0
+  old-0:
+    name: "old-0 (8.1)"
+    env:
+      PHP: "8.1"
+      enable_debug: "yes"
+      enable_zts: "yes"
+      enable_iconv: "yes"
+    runs-on: ubuntu-22.04
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            libidn-dev \
+            libidn2-0-dev \
+            libicu-dev \
+            libevent-dev \
+            libbrotli-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+          make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=http
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  old-1:
+    name: "old-1 (8.0)"
     env:
       PHP: "8.0"
+      enable_debug: "yes"
+      enable_zts: "yes"
+      enable_iconv: "yes"
+    runs-on: ubuntu-22.04
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            libidn-dev \
+            libidn2-0-dev \
+            libicu-dev \
+            libevent-dev \
+            libbrotli-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+          make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=http
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  cur-none-0:
+    name: "cur-none-0 (8.2)"
+    env:
+      PHP: "8.2"
       with_http_libicu_dir: "no"
       with_http_libidn_dir: "no"
       with_http_libidn2_dir: "no"
       with_http_libcurl_dir: "no"
       with_http_libevent_dir: "no"
       with_http_libbrotli_dir: "no"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
@@ -83,24 +165,27 @@ jobs:
           make -f scripts/ci/Makefile test
 
   cur-dbg-zts-0:
-    name: cur-dbg-zts-0
+    name: "cur-dbg-zts-0 (8.2)"
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       enable_debug: "yes"
       enable_zts: "yes"
       enable_iconv: "yes"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
@@ -118,24 +203,27 @@ jobs:
           make -f scripts/ci/Makefile test
 
   cur-dbg-zts-1:
-    name: cur-dbg-zts-1
+    name: "cur-dbg-zts-1 (8.2)"
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       enable_debug: "no"
       enable_zts: "yes"
       enable_iconv: "yes"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
@@ -153,24 +241,27 @@ jobs:
           make -f scripts/ci/Makefile test
 
   cur-dbg-zts-2:
-    name: cur-dbg-zts-2
+    name: "cur-dbg-zts-2 (8.2)"
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       enable_debug: "yes"
       enable_zts: "no"
       enable_iconv: "yes"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
@@ -188,24 +279,27 @@ jobs:
           make -f scripts/ci/Makefile test
 
   cur-dbg-zts-3:
-    name: cur-dbg-zts-3
+    name: "cur-dbg-zts-3 (8.2)"
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       enable_debug: "no"
       enable_zts: "no"
       enable_iconv: "yes"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
@@ -223,27 +317,30 @@ jobs:
           make -f scripts/ci/Makefile test
 
   cur-cov-0:
-    name: cur-cov-0
+    name: "cur-cov-0 (8.2)"
     env:
       CFLAGS: "-O0 -g --coverage"
       CXXFLAGS: "-O0 -g --coverage"
-      PHP: "8.0"
+      PHP: "8.2"
       enable_iconv: "yes"
       with_http_libicu_dir: "yes"
       with_http_libidn_dir: "no"
       with_http_libidn2_dir: "no"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
@@ -266,27 +363,30 @@ jobs:
           bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
 
   cur-cov-1:
-    name: cur-cov-1
+    name: "cur-cov-1 (8.2)"
     env:
       CFLAGS: "-O0 -g --coverage"
       CXXFLAGS: "-O0 -g --coverage"
-      PHP: "8.0"
+      PHP: "8.2"
       enable_iconv: "yes"
       with_http_libicu_dir: "no"
       with_http_libidn_dir: "yes"
       with_http_libidn2_dir: "no"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
@@ -309,27 +409,30 @@ jobs:
           bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
 
   cur-cov-2:
-    name: cur-cov-2
+    name: "cur-cov-2 (8.2)"
     env:
       CFLAGS: "-O0 -g --coverage"
       CXXFLAGS: "-O0 -g --coverage"
-      PHP: "8.0"
+      PHP: "8.2"
       enable_iconv: "yes"
       with_http_libicu_dir: "no"
       with_http_libidn_dir: "no"
       with_http_libidn2_dir: "yes"
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
index 3544bdab56f3707f7a39d18eb496aa0425093fdc..a37e54875f1156bfc3198428cd9d420a13c3a04f 100644 (file)
@@ -10,12 +10,12 @@ jobs:
     name: curl-master
     continue-on-error: true
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       CURL: "master"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -27,8 +27,8 @@ jobs:
           path: curl
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -46,7 +46,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -63,16 +63,16 @@ jobs:
           cd http
           make -f scripts/ci/Makefile test
 
-  curl-7_78_0:
-    name: curl-7_78_0
+  curl-8_1_1:
+    name: curl-8_1_1
     continue-on-error: true
     env:
-      PHP: "8.0"
-      CURL: "7_78_0"
+      PHP: "8.2"
+      CURL: "8_1_1"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -82,11 +82,11 @@ jobs:
         with:
           repository: curl/curl
           path: curl
-          ref: curl-7_78_0 #
+          ref: curl-8_1_1 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -104,7 +104,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -121,16 +121,16 @@ jobs:
           cd http
           make -f scripts/ci/Makefile test
 
-  curl-7_77_0:
-    name: curl-7_77_0
+  curl-8_0_1:
+    name: curl-8_0_1
     continue-on-error: true
     env:
-      PHP: "8.0"
-      CURL: "7_77_0"
+      PHP: "8.2"
+      CURL: "8_0_1"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -140,11 +140,11 @@ jobs:
         with:
           repository: curl/curl
           path: curl
-          ref: curl-7_77_0 #
+          ref: curl-8_0_1 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -162,7 +162,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -179,16 +179,16 @@ jobs:
           cd http
           make -f scripts/ci/Makefile test
 
-  curl-7_76_1:
-    name: curl-7_76_1
+  curl-7_88_1:
+    name: curl-7_88_1
     continue-on-error: true
     env:
-      PHP: "8.0"
-      CURL: "7_76_1"
+      PHP: "8.2"
+      CURL: "7_88_1"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -198,11 +198,11 @@ jobs:
         with:
           repository: curl/curl
           path: curl
-          ref: curl-7_76_1 #
+          ref: curl-7_88_1 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -220,7 +220,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -237,16 +237,16 @@ jobs:
           cd http
           make -f scripts/ci/Makefile test
 
-  curl-7_74_0:
-    name: curl-7_74_0
+  curl-7_87_0:
+    name: curl-7_87_0
     continue-on-error: true
     env:
-      PHP: "8.0"
-      CURL: "7_74_0"
+      PHP: "8.2"
+      CURL: "7_87_0"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -256,11 +256,11 @@ jobs:
         with:
           repository: curl/curl
           path: curl
-          ref: curl-7_74_0 #
+          ref: curl-7_87_0 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -278,7 +278,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -295,16 +295,16 @@ jobs:
           cd http
           make -f scripts/ci/Makefile test
 
-  curl-7_71_1:
-    name: curl-7_71_1
+  curl-7_85_0:
+    name: curl-7_85_0
     continue-on-error: true
     env:
-      PHP: "8.0"
-      CURL: "7_71_1"
+      PHP: "8.2"
+      CURL: "7_85_0"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -314,11 +314,11 @@ jobs:
         with:
           repository: curl/curl
           path: curl
-          ref: curl-7_71_1 #
+          ref: curl-7_85_0 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -336,7 +336,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -353,16 +353,16 @@ jobs:
           cd http
           make -f scripts/ci/Makefile test
 
-  curl-7_68_0:
-    name: curl-7_68_0
+  curl-7_81_0:
+    name: curl-7_81_0
     continue-on-error: true
     env:
-      PHP: "8.0"
-      CURL: "7_68_0"
+      PHP: "8.2"
+      CURL: "7_81_0"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -372,11 +372,11 @@ jobs:
         with:
           repository: curl/curl
           path: curl
-          ref: curl-7_68_0 #
+          ref: curl-7_81_0 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -394,7 +394,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -411,16 +411,16 @@ jobs:
           cd http
           make -f scripts/ci/Makefile test
 
-  curl-7_67_0:
-    name: curl-7_67_0
+  curl-7_78_0:
+    name: curl-7_78_0
     continue-on-error: true
     env:
-      PHP: "8.0"
-      CURL: "7_67_0"
+      PHP: "8.2"
+      CURL: "7_78_0"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -430,11 +430,11 @@ jobs:
         with:
           repository: curl/curl
           path: curl
-          ref: curl-7_67_0 #
+          ref: curl-7_78_0 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -452,7 +452,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -469,16 +469,16 @@ jobs:
           cd http
           make -f scripts/ci/Makefile test
 
-  curl-7_64_0:
-    name: curl-7_64_0
+  curl-7_74_0:
+    name: curl-7_74_0
     continue-on-error: true
     env:
-      PHP: "8.0"
-      CURL: "7_64_0"
+      PHP: "8.2"
+      CURL: "7_74_0"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -488,11 +488,11 @@ jobs:
         with:
           repository: curl/curl
           path: curl
-          ref: curl-7_64_0 #
+          ref: curl-7_74_0 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -510,7 +510,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -531,12 +531,12 @@ jobs:
     name: curl-7_61_1
     continue-on-error: true
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       CURL: "7_61_1"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -549,124 +549,8 @@ jobs:
           ref: curl-7_61_1 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
-          sudo apt-get update -y &&  \
-          sudo apt-get build-dep -y libcurl4-openssl-dev && \
-          sudo apt-get install -y \
-            php-cli \
-            php-pear \
-            libidn11-dev \
-            libidn2-0-dev \
-            libicu-dev \
-            libevent-dev \
-            libbrotli-dev \
-            re2c
-      - name: Curl
-        run: |
-          sudo chmod +x /usr/share/libtool/build-aux/ltmain.sh
-          sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
-          cd curl
-          ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
-          make -j2
-          make install
-      - name: Prepare
-        run: |
-          cd http
-          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
-          make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master
-      - name: Build
-        run: |
-          cd http
-          make -f scripts/ci/Makefile ext PECL=http
-      - name: Test
-        run: |
-          cd http
-          make -f scripts/ci/Makefile test
-
-  curl-7_58_0:
-    name: curl-7_58_0
-    continue-on-error: true
-    env:
-      PHP: "8.0"
-      CURL: "7_58_0"
-      enable_debug: "yes"
-      enable_iconv: "yes"
-      with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
-    steps:
-      - uses: actions/checkout@v2
-        with:
-          submodules: true
-          path: http
-      - uses: actions/checkout@v2
-        with:
-          repository: curl/curl
-          path: curl
-          ref: curl-7_58_0 #
-      - name: Install
-        run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
-          sudo apt-get update -y &&  \
-          sudo apt-get build-dep -y libcurl4-openssl-dev && \
-          sudo apt-get install -y \
-            php-cli \
-            php-pear \
-            libidn11-dev \
-            libidn2-0-dev \
-            libicu-dev \
-            libevent-dev \
-            libbrotli-dev \
-            re2c
-      - name: Curl
-        run: |
-          sudo chmod +x /usr/share/libtool/build-aux/ltmain.sh
-          sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
-          cd curl
-          ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
-          make -j2
-          make install
-      - name: Prepare
-        run: |
-          cd http
-          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
-          make -f scripts/ci/Makefile pecl PECL=m6w6/ext-raphf.git:raphf:master
-      - name: Build
-        run: |
-          cd http
-          make -f scripts/ci/Makefile ext PECL=http
-      - name: Test
-        run: |
-          cd http
-          make -f scripts/ci/Makefile test
-
-  curl-7_52_1:
-    name: curl-7_52_1
-    continue-on-error: true
-    env:
-      PHP: "8.0"
-      CURL: "7_52_1"
-      enable_debug: "yes"
-      enable_iconv: "yes"
-      with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
-    steps:
-      - uses: actions/checkout@v2
-        with:
-          submodules: true
-          path: http
-      - uses: actions/checkout@v2
-        with:
-          repository: curl/curl
-          path: curl
-          ref: curl-7_52_1 #
-      - name: Install
-        run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -684,7 +568,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -705,12 +589,12 @@ jobs:
     name: curl-7_49_1
     continue-on-error: true
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       CURL: "7_49_1"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -723,8 +607,8 @@ jobs:
           ref: curl-7_49_1 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -742,7 +626,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -763,12 +647,12 @@ jobs:
     name: curl-7_31_0
     continue-on-error: true
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       CURL: "7_31_0"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -781,8 +665,8 @@ jobs:
           ref: curl-7_31_0 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -800,7 +684,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -821,12 +705,12 @@ jobs:
     name: curl-7_20_1
     continue-on-error: true
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       CURL: "7_20_1"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -839,8 +723,8 @@ jobs:
           ref: curl-7_20_1 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -858,7 +742,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -879,12 +763,12 @@ jobs:
     name: curl-7_19_7
     continue-on-error: true
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       CURL: "7_19_7"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -897,8 +781,8 @@ jobs:
           ref: curl-7_19_7 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -916,7 +800,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
@@ -937,12 +821,12 @@ jobs:
     name: curl-7_18_2
     continue-on-error: true
     env:
-      PHP: "8.0"
+      PHP: "8.2"
       CURL: "7_18_2"
       enable_debug: "yes"
       enable_iconv: "yes"
       with_http_libcurl_dir: "/opt"
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -955,8 +839,8 @@ jobs:
           ref: curl-7_18_2 #
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -974,7 +858,7 @@ jobs:
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
index 1d981fb5ff3174373a9f63defb7fd0ab6805fe14..99028c98e2a0ac08d5554e04a6721c807dc5cb46 100644 (file)
@@ -3,7 +3,7 @@
 *.dep
 .libs/
 .project
-Makefile
+/Makefile
 Makefile.fragments
 Makefile.global
 Makefile.objects
@@ -11,6 +11,7 @@ acinclude.m4
 aclocal.m4
 autom4te.cache/
 build/
+config.cache
 config.guess
 config.h
 config.h.in
@@ -19,6 +20,7 @@ config.nice
 config.status
 config.sub
 configure
+configure.ac
 configure.in
 http.la
 install-sh
@@ -82,3 +84,4 @@ vendor/
 /tests/helper/server.log
 *gcov
 *lcov
+.vscode
diff --git a/BUGS b/BUGS
index 4c2ad80b6025a49554ce2b2c54e6b02063385c26..0b981790dbeb4ba2cc836b1072de46cf178918ac 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -2,15 +2,13 @@ Known Issues
 ============
 
 Windows:
-       If you keep getting "SSL connect error" when trying to issue 
+       If you keep getting "SSL connect error" when trying to issue
                requests, try another (newer) libeay32.dll/ssleay32.dll pair.
 
 Internals:
        Inflating raw deflated data causes a re-initialization of the inflate
                stream where the corresponding window bits are modified to tell libz
                to not check for zlib header bytes.  This is not preventable AFAICS.
-       LFS dependant parts of libcurl are left out because of off_t,
-               respectively off64_t confusion.
        Persistent handles and "cookiestore" request option do interfere,
                as libcurl saves the cookies to the file on curl_easy_destroy(),
                cookies are not saved until the CURL handle will be recycled.
index 4851d4f1f1410eb1890624c0ef185efa16bd753e..47ec2a3c70de381fa545763592c1f1e07dc82354 100644 (file)
@@ -1,5 +1,32 @@
 # ChangeLog v4
 
+## 4.2.5, 2024-02-05
+
+* Fix incompatible pointer types (32-bit) (see gh issue #134)
+* Fix glitch in CURL_VERSION_TLSAUTH_SRP autoconf probe (see gh issue #133)
+
+## 4.2.4, 2023-10-02
+
+* Fix Error using ssl array in options : Could not set option tlsauthtype
+  (see  gh issue #131)
+* Fix arginfo wargnings of the internal curl client user handler
+* Disable libidn support for v1.36-v1.38 due to broken locale detection
+
+## 4.2.3, 2022-06-10
+
+* Fix http\Client::requeue() not updating response callback
+
+## 4.2.2, 2022-02-25
+
+* Fixed gh-issue #123: Segfault with libcurl 7.81
+
+## 4.2.1, 2021-09-13
+
+* Fixed failing tests with PHP-8.1 (see gh issue #120)
+* Fixed configure reliably finding the right libcurl features available
+* Fixed cookie handling with libcurl 7.77+ and consistently across all
+  supported libcurl versions (follow-up to gh issue #116)
+
 ## 4.2.0, 2021-08-30
 
 * Fixed PHP-8.1 compatibility (see gh issues #114, #115 and #118)
@@ -44,7 +71,7 @@
   * http\Client\Curl\Versions\NGHTTP2
   * http\Client\Curl\Versions\QUIC
   * http\Client\Curl\Versions\ZSTD
+
 ## 4.0.0, 2021-01-13
 
 Changes from beta1:
@@ -54,7 +81,7 @@ Changes from beta1:
 ## 4.0.0beta1, 2020-09-23
 
 * PHP 8 compatibility
-       - Drop ext-propro support:  
+       - Drop ext-propro support:
                PHP 8 removes the object get/set API from the ZendEngine, which renders
                that extension dysfunctional. As a consequence, the header property of
                http\Message and derived classes cannot be modified in place, and thus
index 575f635111c0fc813a91d6bf7264e4ba760538e5..aee94836ee99c6228682b8dd5ea7d7da54d42bbf 100644 (file)
@@ -1,18 +1,12 @@
 
 AC_DEFUN([PECL_CHECK_LIBBROTLI], [
-       dnl config.m4 calls PECL_CHECK_DONE once more
-       PECL_COUNT_CHECKS([+1])
-       PECL_SAVE_ENV([CPPFLAGS], [libbrotli])
-       PECL_SAVE_ENV([LDFLAGS], [libbrotli])
-       PECL_SAVE_ENV([LIBS], [libbrotli])
-
        PECL_CHECK_LIBBROTLI_COMMON([$1], [$2])
        PECL_CHECK_DONE(libbrotlicommon, [$PECL_VAR([HAVE_LIBBROTLI_COMMON])])
        PECL_CHECK_LIBBROTLI_DEC([$1], [$2])
        PECL_CHECK_DONE(libbrotlidec, [$PECL_VAR([HAVE_LIBBROTLI_DEC])])
        PECL_CHECK_LIBBROTLI_ENC([$1], [$2])
        PECL_CHECK_DONE(libbrotlienc, [$PECL_VAR([HAVE_LIBBROTLI_ENC])])
-       
+
        if $PECL_VAR([HAVE_LIBBROTLI_COMMON]) \
        && $PECL_VAR([HAVE_LIBBROTLI_DEC]) \
        && $PECL_VAR([HAVE_LIBBROTLI_ENC]); then
@@ -20,11 +14,16 @@ AC_DEFUN([PECL_CHECK_LIBBROTLI], [
        else
                PECL_VAR([HAVE_LIBBROTLI])=false
        fi
+       dnl config.m4 calls PECL_CHECK_DONE once more
+       PECL_COUNT_CHECKS([+1])
+       PECL_SAVE_ENV([CPPFLAGS], [libbrotli])
+       PECL_SAVE_ENV([LDFLAGS], [libbrotli])
+       PECL_SAVE_ENV([LIBS], [libbrotli])
 ])
 
 AC_DEFUN([PECL_CHECK_LIBBROTLI_COMMON], [
        PECL_CHECK_PKGCONFIG(libbrotlicommon, [$1])
-       
+
        PECL_HAVE_VERSION(libbrotlicommon, ifelse($2,,1.0,$2), [
                PECL_VAR([HAVE_LIBBROTLI_COMMON])=true
        ], [
@@ -34,7 +33,7 @@ AC_DEFUN([PECL_CHECK_LIBBROTLI_COMMON], [
 
 AC_DEFUN([PECL_CHECK_LIBBROTLI_DEC], [
        PECL_CHECK_PKGCONFIG(libbrotlidec, [$1])
-       
+
        PECL_HAVE_VERSION(libbrotlidec, ifelse($2,,1.0,$2), [
                PECL_VAR([HAVE_LIBBROTLI_DEC])=true
        ], [
@@ -44,7 +43,7 @@ AC_DEFUN([PECL_CHECK_LIBBROTLI_DEC], [
 
 AC_DEFUN([PECL_CHECK_LIBBROTLI_ENC], [
        PECL_CHECK_PKGCONFIG(libbrotlienc, [$1])
-       
+
        PECL_HAVE_VERSION(libbrotlienc, ifelse($2,,1.0,$2), [
                PECL_VAR([HAVE_LIBBROTLI_ENC])=true
        ], [
index 8de9499e0eaef8351c9a397a1a9e2051f66ee008..fd0e711ec05b8b920510e068929a893ed7bf8d9b 100644 (file)
@@ -126,38 +126,22 @@ AC_DEFUN([PECL_HAVE_LIBCURL_SSL], [dnl
                        ;;
                esac
 
-               PECL_HAVE_CONST([curl/curl.h], [CURLOPT_TLSAUTH_TYPE], int, [
-                       AC_CACHE_CHECK([whether CURLOPT_TLSAUTH_TYPE expects CURL_TLSAUTH_SRP], PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP]), [
-                               PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])=
+               PECL_HAVE_CONST([curl/curl.h], [CURL_VERSION_TLSAUTH_SRP], int, [
+                       AC_CACHE_CHECK([for CURLOPT_TLSAUTH_TYPE SRP support], PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP]), [
+                               PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])=no
                                AC_TRY_RUN([
                                        #include <curl/curl.h>
                                        int main(int argc, char *argv[]) {
-                                               CURL *ch = curl_easy_init();
-                                               return curl_easy_setopt(ch, CURLOPT_TLSAUTH_TYPE, CURL_TLSAUTH_SRP);
+                                               int has_feature = curl_version_info(CURLVERSION_NOW)->features & CURL_VERSION_TLSAUTH_SRP;
+                                               int set_failure = curl_easy_setopt(curl_easy_init(), CURLOPT_TLSAUTH_TYPE, "SRP");
+                                               return !has_feature || set_failure;
                                        }
                                ], [
                                        PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])=yes
-                               ], [
-                                       AC_TRY_RUN([
-                                               #include <curl/curl.h>
-                                               int main(int argc, char *argv[]) {
-                                                       CURL *ch = curl_easy_init();
-                                                       return curl_easy_setopt(ch, CURLOPT_TLSAUTH_TYPE, "SRP");
-                                               }
-                                       ], [
-                                               PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])=no
-                                       ])
                                ])
                        ])
-                       if test -n "$PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])"; then
+                       if test "$PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP])" = "yes"; then
                                PECL_DEFINE([HAVE_LIBCURL_TLSAUTH_TYPE])
-                               if $PECL_CACHE_VAR([LIBCURL_TLSAUTH_SRP]); then
-                                       PECL_DEFINE([LIBCURL_TLSAUTH_SRP], [CURL_TLSAUTH_SRP])
-                                       PECL_DEFINE([LIBCURL_TLSAUTH_DEF], [CURL_TLSAUTH_NONE])
-                               else
-                                       PECL_DEFINE([LIBCURL_TLSAUTH_SRP], ["SRP"])
-                                       PECL_DEFINE([LIBCURL_TLSAUTH_DEF], [""])
-                               fi
                        fi
                ])
 
index d8735b0326628c8baf76dc78bf2e9c99065d8eab..cb2bb70e17c110d47d34d9535a8691534534bab9 100644 (file)
@@ -271,7 +271,7 @@ AC_DEFUN([PECL_CHECK_CUSTOM], [
                LDFLAGS="$LDFLAGS -L$PECL_CACHE_VAR([$1_prefix])/$PHP_LIBDIR"
                LIBS="$LIBS -l$4"
                dnl PECL_EVAL_LIBLINE([$LDFLAGS $LIBS])
-               
+
                AC_CACHE_VAL(PECL_CACHE_VAR([$1_version]), [
                        pushd $PECL_CACHE_VAR([$1_prefix]) >/dev/null
                        PECL_CACHE_VAR([$1_version])=$5
@@ -281,7 +281,6 @@ AC_DEFUN([PECL_CHECK_CUSTOM], [
 
                if test -n "$PECL_CHECKED_VERSION([$1])"; then
                        PECL_VAR([HAVE_$1])=true
-                       PECL_DEFINE([HAVE_$1])
                        PECL_DEFINE_UQ($1[_VERSION], "$PECL_CHECKED_VERSION([$1])")
                else
                        PECL_VAR([HAVE_$1])=false
@@ -336,7 +335,6 @@ AC_DEFUN([PECL_CHECK_CONFIG], [
 
        if test -n "$PECL_CHECKED_VERSION([$1])"; then
                PECL_VAR([HAVE_$1])=true
-               PECL_DEFINE([HAVE_$1])
                PECL_DEFINE_UQ([$1_VERSION], "$PECL_CHECKED_VERSION([$1])")
        else
                PECL_VAR([HAVE_$1])=false
index 695701b6362ec620a970528b0d315ba3109d7fbf..35f1af159719e3ebb0a00496a783b091528f2fc4 100644 (file)
@@ -24,7 +24,7 @@ if test "$PHP_HTTP" != "no"; then
                AC_CHECK_LIB(nsl, getdomainname)
        ])
        AC_CHECK_FUNCS(mbrtowc mbtowc iswalnum inet_pton)
-       
+
        CFLAGS="$CFLAGS -Wno-strict-prototypes"
 
        dnl ZLIB
@@ -80,7 +80,16 @@ if test "$PHP_HTTP" != "no"; then
        if test "$PHP_HTTP_LIBIDN_DIR" != "no"; then
                PECL_CHECK_PKGCONFIG(libidn, [$PHP_HTTP_LIBIDN_DIR])
                if $PECL_VAR([HAVE_LIBIDN]); then
-                       PECL_DEFINE([HAVE_IDNA2003])
+                       PECL_HAVE_VERSION(libidn, 1.36, [
+                               PECL_HAVE_VERSION(libidn, 1.39, [
+                                       PECL_DEFINE([HAVE_IDNA2003])
+                               ], [
+                                       PECL_VAR([HAVE_LIBIDN])=false
+                                       AC_MSG_WARN([libidn locale detection broken; disabling libidn support])
+                               ])
+                       ], [
+                               PECL_DEFINE([HAVE_IDNA2003])
+                       ])
                fi
                PECL_CHECK_DONE(libidn, $PECL_VAR([HAVE_LIBIDN]))
        fi
index a751c7933133738a63628c0075543ca1be61f549..5daf7858bfc30b0780ad988f3a0e213b7f57e683 100644 (file)
@@ -31,9 +31,9 @@ https://mdref.m6w6.name/http
   <email>mike@php.net</email>
   <active>yes</active>
  </lead>
- <date>2021-08-30</date>
+ <date>2024-02-05</date>
  <version>
-  <release>4.2.0</release>
+  <release>4.2.5</release>
   <api>4.2.0</api>
  </version>
  <stability>
@@ -42,10 +42,8 @@ https://mdref.m6w6.name/http
  </stability>
  <license uri="http://copyfree.org/content/standard/licenses/2bsd/license.txt">BSD-2-Clause</license>
  <notes><![CDATA[
-* Fixed PHP-8.1 compatibility (see gh issues #114, #115 and #118)
-* Fixed cookies failing with libcurl >= 7.77 (see gh issue #116)
-* Fixed tests using $_ENV instead of getenv() to find executables in PATH (see gh issue #113)
-* Added http\Env::reset(): resets internal HTTP request cache (see gh issue #90)
+* Fix incompatible pointer types (32-bit) (see gh issue #134)
+* Fix glitch in CURL_VERSION_TLSAUTH_SRP autoconf probe (see gh issue #133)
 ]]></notes>
  <contents>
   <dir name="/">
@@ -378,9 +376,11 @@ https://mdref.m6w6.name/http
    <dir name="scripts">
     <file role="src" name="bench_select_vs_event.php"/>
     <file role="src" name="check_package-xml.php"/>
+    <file role="src" name="curlver.dist"/>
     <file role="src" name="gen_curlinfo.php"/>
     <file role="src" name="gen_stubs.php"/>
     <file role="src" name="gen_github_workflow_ci.php"/>
+    <file role="src" name="gen_github_workflow_curl-matrix.php"/>
     <file role="src" name="gen_utf8.php"/>
    </dir>
   </dir>
index 0fbb15550f4bd15e25cf0c2893f8b95a23f582a2..f8cede27e4f5505463045d15a12b9dda7d7aaef2 100644 (file)
 #ifndef PHP_EXT_HTTP_H
 #define PHP_EXT_HTTP_H
 
-#define PHP_PECL_HTTP_VERSION "4.2.0"
+#define PHP_PECL_HTTP_VERSION "4.2.5"
 
 extern zend_module_entry http_module_entry;
 #define phpext_http_ptr &http_module_entry
 
 extern int http_module_number;
 
-#endif /* PHP_EXT_HTTP_H */
+#endif /* PHP_EXT_HTTP_H */
 
 /*
  * Local variables:
index b0d22b45ad37b905444f669b161feac8228f5a92..416cb07c12f0f9f7b7cab860fdef01186ad2cb8f 100644 (file)
@@ -1,15 +1,16 @@
-# current is 7.78.0 ATM
+# current is 8.1.1 ATM
 # 7.21.5-7.29.0 fail to configure on gh actions
 
-alpine: 7.78.0 7.67.0
+alpine: 8.1.1 7.78.0
 centos: 7.61.1 # 7.29.0
-debian: 7.74.0 7.64.0 7.52.1
-fedora: 7.78.0 7.76.1 7.71.1
+debian: 7.88.1 7.74.0
+fedora: 7.87.0 7.85.0
 other: 7.49.1 7.31.0
-ubuntu: 7.74.0 7.68.0 7.58.0
+ubuntu: 7.81.0 7.74.0
 
 # always test against a few recent
-latest: master 7.78.0 7.77.0 7.76.1
+latest: master 8.1.1 8.0.1 7.88.1 7.81.0
+# and a couple ancient
 oldest: 7.18.2 7.19.7 7.20.1
 
 # 7.64.1 fails client tests because of superfluous infof() calls
index 92ff65e42859bb64b732498eff4158e76e65a0c3..ab4391dccef9eb2b09463cbbcf9e35b619551ef8 100755 (executable)
@@ -42,6 +42,9 @@ $ifdefs = array(
        'RETRY_AFTER' => 'PHP_HTTP_CURL_VERSION(7,66,0)',
        'EFFECTIVE_METHOD' => 'PHP_HTTP_CURL_VERSION(7,72,0)',
        'PROXY_ERROR' => 'PHP_HTTP_CURL_VERSION(7,73,0)',
+       'REFERER' => 'PHP_HTTP_CURL_VERSION(7,76,0)',
+       'CAINFO' => 'PHP_HTTP_CURL_VERSION(7,84,0)',
+       'CAPATH' => 'PHP_HTTP_CURL_VERSION(7,84,0)',
 );
 $exclude = array(
        'ACTIVESOCKET',
@@ -102,12 +105,12 @@ $templates = array(
 ',
 );
 
-$infos = file_re('curl.h', '/^\s*(CURLINFO_(\w+))\s*=\s*CURLINFO_(STRING|LONG|DOUBLE|SLIST|OFF_T)\s*\+\s*\d+\s*,?\s*$/m');
-
+$infos = file_re('curl.h', '/\s*(CURLINFO_(\w+))\s*(?:CURL_DEPRECATED\(\d+\.\d+\.\d+,\s*"[\w _-]+"\))?\s*=\s*CURLINFO_(STRING|LONG|DOUBLE|SLIST|OFF_T)\s*\+\s*\d+\s*,?\s*/m');
+var_dump($infos);
 ob_start();
 foreach ($infos as $info) {
        list(, $full, $short, $type) = $info;
-       if (in_array($short, $exclude) || substr($short, -2) === "_T") continue;
+       if (in_array($short, $exclude)) continue;
        if (isset($ifdefs[$short])) printf("#if %s\n", $ifdefs[$short]);
        printf($templates[$type], $full, strtolower((isset($translate[$short])) ? $translate[$short] : $short));
        if (isset($ifdefs[$short])) printf("#endif\n");
index f36cf5f3a411f2a0466a0d8d6b4cc025c2978ad8..41ce95fbb68aa144239691f89801cb06fcca82cc 100755 (executable)
@@ -11,16 +11,21 @@ jobs:
 <?php
 
 $gen = include __DIR__ . "/ci/gen-matrix.php";
-$cur = "8.0";
+$cur = "8.2";
 $job = $gen->github([
-"master" => [
-// most useful for all additional versions except current
+"next" => [
     "PHP" => ["master"],
     "enable_debug" => "yes",
     "enable_zts" => "yes",
     "enable_iconv" => "yes",
     "TEST_PHP_ARGS" => "-d error_reporting=24575" // ignore E_DEPRECATED
-], 
+],
+"old" => [
+    "PHP" => ["8.1", "8.0"],
+    "enable_debug" => "yes",
+    "enable_zts" => "yes",
+    "enable_iconv" => "yes",
+],
 "cur-none" => [
 // everything disabled for current
     "PHP" => $cur,
@@ -30,14 +35,14 @@ $job = $gen->github([
     "with_http_libcurl_dir" => "no",
     "with_http_libevent_dir" => "no",
     "with_http_libbrotli_dir" => "no",
-], 
+],
 "cur-dbg-zts" => [
 // everything enabled for current, switching debug/zts
     "PHP" => $cur,
     "enable_debug",
     "enable_zts",
     "enable_iconv" => "yes",
-], 
+],
 "cur-cov" => [
 // once everything enabled for current, with coverage
     "CFLAGS" => "-O0 -g --coverage",
@@ -53,7 +58,7 @@ $job = $gen->github([
 ]]);
 foreach ($job as $id => $env) {
     printf("  %s:\n", $id);
-    printf("    name: %s\n", $id);
+    printf("    name: \"%s (%s)\"\n", $id, $env["PHP"]);
     if ($env["PHP"] == "master") {
         printf("    continue-on-error: true\n");
     }
@@ -62,18 +67,21 @@ foreach ($job as $id => $env) {
         printf("      %s: \"%s\"\n", $key, $val);
     }
 ?>
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-22.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           submodules: true
+      - name: Info
+        run: |
+          locale -a && locale
       - name: Install
         run: |
           sudo apt-get install -y \
             php-cli \
             php-pear \
             libcurl4-openssl-dev \
-            libidn11-dev \
+            libidn-dev \
             libidn2-0-dev \
             libicu-dev \
             libevent-dev \
index 66b50c92e497797331a40b3ada714cabeab856be..beaa65df633a26609cf7feae234824189825aeba 100755 (executable)
@@ -34,7 +34,7 @@ rsort($curlver, SORT_NATURAL);
 $gen = include __DIR__ . "/ci/gen-matrix.php";
 $job = $gen->github([
 "curl" => [
-    "PHP" => "8.0",
+    "PHP" => "8.2",
     "CURL" => $curlver,
     "enable_debug" => "yes",
     "enable_iconv" => "yes",
@@ -49,7 +49,7 @@ foreach ($job as $id => $env) {
         printf("      %s: \"%s\"\n", $key, $val);
     }
 ?>
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -64,8 +64,8 @@ foreach ($job as $id => $env) {
 <?php endif; ?>
       - name: Install
         run: |
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic main' | sudo tee -a /etc/apt/sources.list && \
-          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu bionic-updates main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list && \
+          echo 'deb-src http://azure.archive.ubuntu.com/ubuntu jammy-updates main' | sudo tee -a /etc/apt/sources.list && \
           sudo apt-get update -y &&  \
           sudo apt-get build-dep -y libcurl4-openssl-dev && \
           sudo apt-get install -y \
@@ -83,7 +83,7 @@ foreach ($job as $id => $env) {
           sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/bin/libtool
           cd curl
           ./buildconf
-          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2
+          ./configure --prefix=/opt --disable-dependency-tracking --with-ssl --with-openssl --without-libssh2 --disable-ldap
           make -j2
           make install
       - name: Prepare
index a272fa45d0a4f6c2658b20273b828b57f7c0097f..dcdfffab4ffd572fe5213c516423c81faa77e159 100644 (file)
@@ -807,6 +807,8 @@ static PHP_METHOD(HttpClient, requeue)
                        if (fci.object) {
                                GC_ADDREF(fci.object);
                        }
+                       e->closure.fci = fci;
+                       e->closure.fcc = fcc;
                }
                RETURN_ZVAL(getThis(), 1, 0);
        }
index daadf698e5b15f8058f7cd4a590e253fe652e8ba..4decc7af20c8e7a234ab9492a775fa5f97a6cac1 100644 (file)
@@ -313,14 +313,14 @@ static int php_http_curle_raw_callback(CURL *ch, curl_infotype type, char *data,
        return 0;
 }
 
-static int php_http_curle_header_callback(char *data, size_t n, size_t l, void *arg)
+static size_t php_http_curle_header_callback(char *data, size_t n, size_t l, void *arg)
 {
        php_http_client_curl_handler_t *h = arg;
 
        return php_http_buffer_append(&h->response.headers, data, n * l);
 }
 
-static int php_http_curle_body_callback(char *data, size_t n, size_t l, void *arg)
+static size_t php_http_curle_body_callback(char *data, size_t n, size_t l, void *arg)
 {
        php_http_client_curl_handler_t *h = arg;
 
@@ -367,18 +367,34 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info)
                ZVAL_DOUBLE(&tmp, d);
                zend_hash_str_update(info, "size_upload", lenof("size_upload"), &tmp);
        }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SIZE_UPLOAD_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "size_upload_t", lenof("size_upload_t"), &tmp);
+       }
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SIZE_DOWNLOAD, &d)) {
                ZVAL_DOUBLE(&tmp, d);
                zend_hash_str_update(info, "size_download", lenof("size_download"), &tmp);
        }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SIZE_DOWNLOAD_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "size_download_t", lenof("size_download_t"), &tmp);
+       }
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SPEED_DOWNLOAD, &d)) {
                ZVAL_DOUBLE(&tmp, d);
                zend_hash_str_update(info, "speed_download", lenof("speed_download"), &tmp);
        }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SPEED_DOWNLOAD_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "speed_download_t", lenof("speed_download_t"), &tmp);
+       }
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SPEED_UPLOAD, &d)) {
                ZVAL_DOUBLE(&tmp, d);
                zend_hash_str_update(info, "speed_upload", lenof("speed_upload"), &tmp);
        }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_SPEED_UPLOAD_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "speed_upload_t", lenof("speed_upload_t"), &tmp);
+       }
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_HEADER_SIZE, &l)) {
                ZVAL_LONG(&tmp, l);
                zend_hash_str_update(info, "header_size", lenof("header_size"), &tmp);
@@ -395,14 +411,26 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info)
                ZVAL_LONG(&tmp, l);
                zend_hash_str_update(info, "filetime", lenof("filetime"), &tmp);
        }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_FILETIME_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "filetime_t", lenof("filetime_t"), &tmp);
+       }
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &d)) {
                ZVAL_DOUBLE(&tmp, d);
                zend_hash_str_update(info, "content_length_download", lenof("content_length_download"), &tmp);
        }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "content_length_download_t", lenof("content_length_download_t"), &tmp);
+       }
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONTENT_LENGTH_UPLOAD, &d)) {
                ZVAL_DOUBLE(&tmp, d);
                zend_hash_str_update(info, "content_length_upload", lenof("content_length_upload"), &tmp);
        }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "content_length_upload_t", lenof("content_length_upload_t"), &tmp);
+       }
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_STARTTRANSFER_TIME, &d)) {
                ZVAL_DOUBLE(&tmp, d);
                zend_hash_str_update(info, "starttransfer_time", lenof("starttransfer_time"), &tmp);
@@ -513,6 +541,34 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info)
                zend_hash_str_update(info, "scheme", lenof("scheme"), &tmp);
        }
 #endif
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_TOTAL_TIME_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "total_time_t", lenof("total_time_t"), &tmp);
+       }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_NAMELOOKUP_TIME_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "namelookup_time_t", lenof("namelookup_time_t"), &tmp);
+       }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CONNECT_TIME_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "connect_time_t", lenof("connect_time_t"), &tmp);
+       }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_PRETRANSFER_TIME_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "pretransfer_time_t", lenof("pretransfer_time_t"), &tmp);
+       }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_STARTTRANSFER_TIME_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "starttransfer_time_t", lenof("starttransfer_time_t"), &tmp);
+       }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_REDIRECT_TIME_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "redirect_time_t", lenof("redirect_time_t"), &tmp);
+       }
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_APPCONNECT_TIME_T, &o)) {
+               ZVAL_LONG(&tmp, o);
+               zend_hash_str_update(info, "appconnect_time_t", lenof("appconnect_time_t"), &tmp);
+       }
 #if PHP_HTTP_CURL_VERSION(7,66,0)
        if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_RETRY_AFTER, &o)) {
                ZVAL_LONG(&tmp, o);
@@ -531,6 +587,24 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info)
                zend_hash_str_update(info, "proxy_error", lenof("proxy_error"), &tmp);
        }
 #endif
+#if PHP_HTTP_CURL_VERSION(7,76,0)
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_REFERER, &c)) {
+               ZVAL_STRING(&tmp, STR_PTR(c));
+               zend_hash_str_update(info, "referer", lenof("referer"), &tmp);
+       }
+#endif
+#if PHP_HTTP_CURL_VERSION(7,84,0)
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CAINFO, &c)) {
+               ZVAL_STRING(&tmp, STR_PTR(c));
+               zend_hash_str_update(info, "cainfo", lenof("cainfo"), &tmp);
+       }
+#endif
+#if PHP_HTTP_CURL_VERSION(7,84,0)
+       if (CURLE_OK == curl_easy_getinfo(ch, CURLINFO_CAPATH, &c)) {
+               ZVAL_STRING(&tmp, STR_PTR(c));
+               zend_hash_str_update(info, "capath", lenof("capath"), &tmp);
+       }
+#endif
 
        /* END::CURLINFO */
 
@@ -630,8 +704,9 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info)
 
 #if (PHP_HTTP_CURL_VERSION(7,19,1) && PHP_HTTP_HAVE_LIBCURL_OPENSSL) || \
        (PHP_HTTP_CURL_VERSION(7,34,0) && PHP_HTTP_HAVE_LIBCURL_NSS) || \
+       (PHP_HTTP_CURL_VERSION(7,39,0) && PHP_HTTP_HAVE_LIBCURL_GSKIT) || \
        (PHP_HTTP_CURL_VERSION(7,42,0) && PHP_HTTP_HAVE_LIBCURL_GNUTLS) || \
-       (PHP_HTTP_CURL_VERSION(7,39,0) && PHP_HTTP_HAVE_LIBCURL_GSKIT)
+       (PHP_HTTP_CURL_VERSION(7,79,0) && PHP_HTTP_HAVE_LIBCURL_SECURETRANSPORT)
        {
                int i;
                zval ci_array, subarray;
@@ -1202,8 +1277,10 @@ static ZEND_RESULT_CODE php_http_curle_option_set_ssl_tlsauthtype(php_http_optio
 
        if (val && Z_LVAL_P(val)) {
                switch (Z_LVAL_P(val)) {
+               case CURL_TLSAUTH_NONE:
+                       break;
                case CURL_TLSAUTH_SRP:
-                       if (CURLE_OK == curl_easy_setopt(ch, opt->option, PHP_HTTP_LIBCURL_TLSAUTH_SRP)) {
+                       if (CURLE_OK == curl_easy_setopt(ch, opt->option, "SRP")) {
                                return SUCCESS;
                        }
                        /* no break */
@@ -1211,7 +1288,7 @@ static ZEND_RESULT_CODE php_http_curle_option_set_ssl_tlsauthtype(php_http_optio
                        return FAILURE;
                }
        }
-       if (CURLE_OK != curl_easy_setopt(ch, opt->option, PHP_HTTP_LIBCURL_TLSAUTH_DEF)) {
+       if (CURLE_OK != curl_easy_setopt(ch, opt->option, "NONE")) {
                return FAILURE;
        }
        return SUCCESS;
@@ -1486,7 +1563,10 @@ static void php_http_curle_options_init(php_http_options_t *registry)
        }
 #endif
 #if PHP_HTTP_CURL_VERSION(7,49,0)
+# if defined(linux) || defined(__APPLE__)
+       /* CURLOPT_TCP_FASTOPEN is not supported (yet) on Windows */
        php_http_option_register(registry, ZEND_STRL("tcp_fastopen"), CURLOPT_TCP_FASTOPEN, _IS_BOOL);
+# endif
 #endif
 
        /* ssl */
@@ -2203,7 +2283,9 @@ static ZEND_RESULT_CODE php_http_client_curl_handler_prepare(php_http_client_cur
        curl_easy_setopt(curl->handle, CURLOPT_URL, storage->url);
 
        /* apply options */
-       php_http_options_apply(&php_http_curle_options, enqueue->options, curl);
+       if (SUCCESS != php_http_options_apply(&php_http_curle_options, enqueue->options, curl)) {
+               return FAILURE;
+       }
 
        /* request headers */
        php_http_message_update_headers(msg);
index b8db1b2d5e15c33429b1c6f6cdc7c06da70ff201..2e663ed74c0bc9348b32e585b77e47670ce9deaa 100644 (file)
@@ -97,8 +97,6 @@ static void php_http_client_curl_event_timer(CURLM *multi, long timeout_ms, void
                }
                break;
        case 0:
-               php_http_client_curl_event_handler(context, CURL_SOCKET_TIMEOUT, 0);
-               break;
        default:
                if (!event_initialized(context->timeout)) {
                        event_assign(context->timeout, context->evbase, CURL_SOCKET_TIMEOUT, 0, php_http_client_curl_event_timeout_callback, context);
index 1f69a51cb7203e3d4acb05502f512a703a1f1eb6..2e646f60c7f5bc7f3ac845fbbaf0ea9f87bea7ec 100644 (file)
@@ -22,6 +22,11 @@ typedef struct php_http_client_curl_user_ev {
        php_http_client_curl_user_context_t *context;
 } php_http_client_curl_user_ev_t;
 
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_user_handler, 0, 1, IS_LONG, 1)
+       ZEND_ARG_OBJ_INFO(0, client, "http\\Client", 0)
+       ZEND_ARG_TYPE_INFO(0, stream, IS_RESOURCE, 1)
+       ZEND_ARG_TYPE_INFO(0, action, IS_LONG, 1)
+ZEND_END_ARG_INFO();
 static ZEND_NAMED_FUNCTION(php_http_client_curl_user_handler)
 {
        zval *zstream = NULL, *zclient = NULL;
@@ -57,9 +62,7 @@ static void php_http_client_curl_user_timer(CURLM *multi, long timeout_ms, void
        fprintf(stderr, "\ntimer <- timeout_ms: %ld\n", timeout_ms);
 #endif
 
-       if (timeout_ms <= 0) {
-               php_http_client_curl_loop(context->client, CURL_SOCKET_TIMEOUT, 0);
-       } else {
+       if (timeout_ms >= 0) {
                zval args[1], *ztimeout = &args[0];
 
                ZVAL_LONG(ztimeout, timeout_ms);
@@ -188,6 +191,10 @@ static void *php_http_client_curl_user_init(php_http_client_t *client, void *use
        ctx->closure.common.type = ZEND_INTERNAL_FUNCTION;
        ctx->closure.common.function_name = zend_string_init(ZEND_STRL("php_http_client_curl_user_handler"), 0);
        ctx->closure.internal_function.handler = php_http_client_curl_user_handler;
+       ctx->closure.internal_function.arg_info = (zend_internal_arg_info *) &ai_user_handler[1];
+       ctx->closure.internal_function.num_args = 3;
+       ctx->closure.internal_function.required_num_args = 1;
+
 
        zend_create_closure(zclosure, &ctx->closure, NULL, NULL, NULL);
 
index ecdf94e256e314980339202e3685517c69050f17..dd4c6c6e5bdec7da3534355ae085f640216630c8 100644 (file)
@@ -17,16 +17,16 @@ php_http_cookie_list_t *php_http_cookie_list_init(php_http_cookie_list_t *list)
        if (!list) {
                list = emalloc(sizeof(*list));
        }
-       
+
        zend_hash_init(&list->cookies, 0, NULL, ZVAL_PTR_DTOR, 0);
        zend_hash_init(&list->extras, 0, NULL, ZVAL_PTR_DTOR, 0);
-       
+
        list->path = NULL;
        list->domain = NULL;
        list->expires = -1;
        list->max_age = -1;
        list->flags = 0;
-       
+
        return list;
 }
 
@@ -51,7 +51,7 @@ void php_http_cookie_list_dtor(php_http_cookie_list_t *list)
        if (list) {
                zend_hash_destroy(&list->cookies);
                zend_hash_destroy(&list->extras);
-       
+
                PTR_SET(list->path, NULL);
                PTR_SET(list->domain, NULL);
        }
@@ -206,15 +206,15 @@ void php_http_cookie_list_to_struct(php_http_cookie_list_t *list, zval *strct)
 {
        zval cookies, extras, tmp;
        HashTable *ht = HASH_OF(strct);
-       
+
        array_init_size(&cookies, zend_hash_num_elements(&list->cookies));
        array_copy(&list->cookies, Z_ARRVAL(cookies));
        zend_symtable_str_update(ht, ZEND_STRL("cookies"), &cookies);
-       
+
        array_init_size(&extras, zend_hash_num_elements(&list->extras));
        array_copy(&list->extras, Z_ARRVAL(extras));
        zend_symtable_str_update(ht, ZEND_STRL("extras"), &extras);
-       
+
        ZVAL_LONG(&tmp, list->flags);
        zend_symtable_str_update(ht, ZEND_STRL("flags"), &tmp);
        ZVAL_LONG(&tmp, list->expires);
@@ -286,22 +286,22 @@ php_http_cookie_list_t *php_http_cookie_list_from_struct(php_http_cookie_list_t
                list->domain = estrndup(str->val, str->len);
                zend_string_release(str);
        }
-       
+
        return list;
 }
 
 static inline void append_encoded(php_http_buffer_t *buf, const char *key, size_t key_len, const char *val, size_t val_len)
 {
        zend_string *enc_str[2];
-       
+
        enc_str[0] = php_raw_url_encode(key, key_len);
        enc_str[1] = php_raw_url_encode(val, val_len);
-       
+
        php_http_buffer_append(buf, enc_str[0]->val, enc_str[0]->len);
        php_http_buffer_appends(buf, "=");
        php_http_buffer_append(buf, enc_str[1]->val, enc_str[1]->len);
        php_http_buffer_appends(buf, "; ");
-       
+
        zend_string_release(enc_str[0]);
        zend_string_release(enc_str[1]);
 }
@@ -311,7 +311,7 @@ void php_http_cookie_list_to_string(php_http_cookie_list_t *list, char **str, si
        php_http_buffer_t buf;
        zend_hash_key key;
        zval *val;
-       
+
        php_http_buffer_init(&buf);
 
        ZEND_HASH_FOREACH_KEY_VAL(&list->cookies, key.h, key.key, val)
@@ -325,7 +325,7 @@ void php_http_cookie_list_to_string(php_http_cookie_list_t *list, char **str, si
                zend_string_release(str);
        }
        ZEND_HASH_FOREACH_END();
-       
+
        if (list->domain && *list->domain) {
                php_http_buffer_appendf(&buf, "domain=%s; ", list->domain);
        }
@@ -340,7 +340,7 @@ void php_http_cookie_list_to_string(php_http_cookie_list_t *list, char **str, si
        if (list->max_age >= 0) {
                php_http_buffer_appendf(&buf, "max-age=%ld; ", list->max_age);
        }
-       
+
        ZEND_HASH_FOREACH_KEY_VAL(&list->extras, key.h, key.key, val)
        {
                zend_string *str = zval_get_string(val);
@@ -352,14 +352,14 @@ void php_http_cookie_list_to_string(php_http_cookie_list_t *list, char **str, si
                zend_string_release(str);
        }
        ZEND_HASH_FOREACH_END();
-       
+
        if (list->flags & PHP_HTTP_COOKIE_SECURE) {
                php_http_buffer_appends(&buf, "secure; ");
        }
        if (list->flags & PHP_HTTP_COOKIE_HTTPONLY) {
                php_http_buffer_appends(&buf, "httpOnly; ");
        }
-       
+
        php_http_buffer_fix(&buf);
        *str = buf.data;
        *len = buf.used;
@@ -943,7 +943,7 @@ static PHP_METHOD(HttpCookie, setFlags)
 }
 
 ZEND_BEGIN_ARG_INFO_EX(ai_HttpCookie_toString, 0, 0, 0)
-ZEND_END_ARG_INFO();;
+ZEND_END_ARG_INFO();
 static PHP_METHOD(HttpCookie, toString)
 {
        php_http_cookie_object_t *obj;
@@ -981,6 +981,9 @@ static PHP_METHOD(HttpCookie, toArray)
        php_http_cookie_list_to_struct(obj->list, return_value);
 }
 
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_HttpCookie___toString, 0, 0, IS_STRING, 0)
+ZEND_END_ARG_INFO();
+
 static zend_function_entry php_http_cookie_methods[] = {
        PHP_ME(HttpCookie, __construct,   ai_HttpCookie___construct,  ZEND_ACC_PUBLIC)
        PHP_ME(HttpCookie, getCookies,    ai_HttpCookie_getCookies,   ZEND_ACC_PUBLIC)
@@ -1010,7 +1013,7 @@ static zend_function_entry php_http_cookie_methods[] = {
 
        PHP_ME(HttpCookie, toArray,       ai_HttpCookie_toArray,      ZEND_ACC_PUBLIC)
        PHP_ME(HttpCookie, toString,      ai_HttpCookie_toString,     ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(HttpCookie, __toString, toString, ai_HttpCookie_toString, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(HttpCookie, __toString, toString, ai_HttpCookie___toString, ZEND_ACC_PUBLIC)
 
        EMPTY_FUNCTION_ENTRY
 };
index c9b1e0d21947c92640f407fdc48b58137c773726..c475a8186a8249714698333df1dd624cacfda29e 100644 (file)
@@ -17,18 +17,18 @@ ZEND_RESULT_CODE php_http_header_parse(const char *header, size_t length, HashTa
        php_http_header_parser_t ctx;
        php_http_buffer_t buf;
        php_http_header_parser_state_t rs;
-       
+
        if (!php_http_buffer_from_string_ex(&buf, header, length)) {
                php_error_docref(NULL, E_WARNING, "Could not allocate buffer");
                return FAILURE;
        }
-       
+
        if (!php_http_header_parser_init(&ctx)) {
                php_http_buffer_dtor(&buf);
                php_error_docref(NULL, E_WARNING, "Could not initialize header parser");
                return FAILURE;
        }
-       
+
        rs = php_http_header_parser_parse(&ctx, &buf, PHP_HTTP_HEADER_PARSER_CLEANUP, headers, callback_func, callback_data);
        php_http_header_parser_dtor(&ctx);
        php_http_buffer_dtor(&buf);
@@ -362,21 +362,21 @@ ZEND_END_ARG_INFO();
 PHP_METHOD(HttpHeader, getParams)
 {
        zval value_tmp, zctor, zparams_obj, *zargs = NULL;
-       
+
        ZVAL_STRINGL(&zctor, "__construct", lenof("__construct"));
-       
+
        object_init_ex(&zparams_obj, php_http_params_get_class_entry());
-       
+
        zargs = (zval *) ecalloc(ZEND_NUM_ARGS()+1, sizeof(zval));
        ZVAL_COPY_VALUE(&zargs[0], zend_read_property(php_http_header_class_entry, Z_OBJ_P(ZEND_THIS), ZEND_STRL("value"), 0, &value_tmp));
        if (ZEND_NUM_ARGS()) {
                zend_get_parameters_array(ZEND_NUM_ARGS(), ZEND_NUM_ARGS(), &zargs[1]);
        }
-       
+
        if (SUCCESS == call_user_function(NULL, &zparams_obj, &zctor, return_value, ZEND_NUM_ARGS()+1, zargs)) {
                RETVAL_ZVAL(&zparams_obj, 0, 1);
        }
-       
+
        zval_ptr_dtor(&zctor);
        if (zargs) {
                efree(zargs);
@@ -432,14 +432,17 @@ PHP_METHOD(HttpHeader, parse)
        }
 }
 
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_HttpHeader___toString, 0, 0, IS_STRING, 0)
+ZEND_END_ARG_INFO();
+
 static zend_function_entry php_http_header_methods[] = {
        PHP_ME(HttpHeader, __construct,   ai_HttpHeader___construct, ZEND_ACC_PUBLIC)
        PHP_ME(HttpHeader, __unserialize, ai_HttpHeader___unserialize, ZEND_ACC_PUBLIC)
        PHP_ME(HttpHeader, __serialize,   ai_HttpHeader___serialize, ZEND_ACC_PUBLIC)
        PHP_ME(HttpHeader, unserialize,   ai_HttpHeader_unserialize, ZEND_ACC_PUBLIC)
        PHP_ME(HttpHeader, serialize,     ai_HttpHeader_serialize, ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(HttpHeader, __toString, serialize, ai_HttpHeader_serialize, ZEND_ACC_PUBLIC)
        ZEND_MALIAS(HttpHeader, toString, serialize, ai_HttpHeader_serialize, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(HttpHeader, __toString, serialize, ai_HttpHeader___toString, ZEND_ACC_PUBLIC)
        PHP_ME(HttpHeader, match,         ai_HttpHeader_match, ZEND_ACC_PUBLIC)
        PHP_ME(HttpHeader, negotiate,     ai_HttpHeader_negotiate, ZEND_ACC_PUBLIC)
        PHP_ME(HttpHeader, getParams,     ai_HttpHeader_getParams, ZEND_ACC_PUBLIC)
@@ -473,4 +476,3 @@ PHP_MINIT_FUNCTION(http_header)
  * vim600: noet sw=4 ts=4 fdm=marker
  * vim<600: noet sw=4 ts=4
  */
-
index ac3c641968ac9a944041970fbac23b762b935492..cd01757b4f83d5261014b10dfa4e7d049231b84b 100644 (file)
@@ -1699,8 +1699,6 @@ static PHP_METHOD(HttpMessage, getParentMessage)
        RETVAL_OBJECT(&obj->parent->zo, 1);
 }
 
-ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage___toString, 0, 0, 0)
-ZEND_END_ARG_INFO();
 ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessage_toString, 0, 0, 0)
        ZEND_ARG_INFO(0, include_parent)
 ZEND_END_ARG_INFO();
@@ -1782,6 +1780,7 @@ static PHP_METHOD(HttpMessage, __serialize)
 
        ZEND_HASH_FOREACH_KEY_PTR(&obj->zo.ce->properties_info, num_index, str_index, pi)
        {
+               (void)num_index;
                zval *val;
                if (str_index && (val = zend_hash_find_ind(props, pi->name))) {
                        Z_TRY_ADDREF_P(val);
@@ -2060,6 +2059,9 @@ static PHP_METHOD(HttpMessage, current)
        }
 }
 
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_HttpMessage___toString, 0, 0, IS_STRING, 0)
+ZEND_END_ARG_INFO();
+
 static zend_function_entry php_http_message_methods[] = {
        PHP_ME(HttpMessage, __construct,        ai_HttpMessage___construct,        ZEND_ACC_PUBLIC)
        PHP_ME(HttpMessage, getBody,            ai_HttpMessage_getBody,            ZEND_ACC_PUBLIC)
index 90714d93e07e029dca041630e52bbde7c07fda3c..8bde1a770590cf75e1556ada6c50e97fafb6d241 100644 (file)
@@ -670,9 +670,9 @@ PHP_METHOD(HttpMessageBody, __construct)
        }
 }
 
-ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessageBody___toString, 0, 0, 0)
+ZEND_BEGIN_ARG_INFO_EX(ai_HttpMessageBody_serialize, 0, 0, 0)
 ZEND_END_ARG_INFO();
-PHP_METHOD(HttpMessageBody, __toString)
+PHP_METHOD(HttpMessageBody, serialize)
 {
        if (SUCCESS == zend_parse_parameters_none()) {
                php_http_message_body_object_t *obj = PHP_HTTP_OBJ(NULL, getThis());
@@ -951,11 +951,14 @@ PHP_METHOD(HttpMessageBody, stat)
        }
 }
 
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_HttpMessageBody___toString, 0, 0, IS_STRING, 0)
+ZEND_END_ARG_INFO();
+
 static zend_function_entry php_http_message_body_methods[] = {
        PHP_ME(HttpMessageBody, __construct,  ai_HttpMessageBody___construct,  ZEND_ACC_PUBLIC)
-       PHP_ME(HttpMessageBody, __toString,   ai_HttpMessageBody___toString,   ZEND_ACC_PUBLIC)
-       PHP_MALIAS(HttpMessageBody, toString, __toString, ai_HttpMessageBody___toString, ZEND_ACC_PUBLIC)
-       PHP_MALIAS(HttpMessageBody, serialize, __toString, ai_HttpMessageBody___toString, ZEND_ACC_PUBLIC)
+       PHP_ME(HttpMessageBody, serialize,    ai_HttpMessageBody_serialize,    ZEND_ACC_PUBLIC)
+       PHP_MALIAS(HttpMessageBody, toString, serialize, ai_HttpMessageBody_serialize, ZEND_ACC_PUBLIC)
+       PHP_MALIAS(HttpMessageBody, __toString, serialize, ai_HttpMessageBody___toString, ZEND_ACC_PUBLIC)
        PHP_ME(HttpMessageBody, unserialize,  ai_HttpMessageBody_unserialize,  ZEND_ACC_PUBLIC)
        PHP_ME(HttpMessageBody, __serialize,  ai_HttpMessageBody___serialize,  ZEND_ACC_PUBLIC)
        PHP_ME(HttpMessageBody, __unserialize,ai_HttpMessageBody___unserialize,ZEND_ACC_PUBLIC)
index b04af042bf9a6f1b07a9577a0ca5b36b1d2c4165..f40b89f9c0fddbdbd06f72a69d54f8fd8aa9249c 100644 (file)
@@ -1290,12 +1290,15 @@ PHP_METHOD(HttpParams, offsetSet)
        }
 }
 
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_HttpParams___toString, 0, 0, IS_STRING, 0)
+ZEND_END_ARG_INFO();
+
 static zend_function_entry php_http_params_methods[] = {
        PHP_ME(HttpParams, __construct,   ai_HttpParams___construct,   ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
 
        PHP_ME(HttpParams, toArray,       ai_HttpParams_toArray,       ZEND_ACC_PUBLIC)
        PHP_ME(HttpParams, toString,      ai_HttpParams_toString,      ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(HttpParams, __toString, toString, ai_HttpParams_toString, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(HttpParams, __toString, toString, ai_HttpParams___toString, ZEND_ACC_PUBLIC)
 
        PHP_ME(HttpParams, offsetExists,  ai_HttpParams_offsetExists,  ZEND_ACC_PUBLIC)
        PHP_ME(HttpParams, offsetUnset,   ai_HttpParams_offsetUnset,   ZEND_ACC_PUBLIC)
@@ -1345,4 +1348,3 @@ PHP_MINIT_FUNCTION(http_params)
  * vim600: noet sw=4 ts=4 fdm=marker
  * vim<600: noet sw=4 ts=4
  */
-
index 7ef5a2084a5f685d2aabed9e3007e44de31b5188..06d52c5a1c520cdf02c0f0af6e6f826a29f2ad69 100644 (file)
@@ -98,7 +98,7 @@ ZEND_RESULT_CODE php_http_querystring_xlate(zval *dst, zval *src, const char *ie
        zval *entry;
        zend_string *xkey, *xstr;
        php_http_arrkey_t key;
-       
+
        ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(src), key.h, key.key, entry)
        {
                if (key.key) {
@@ -107,7 +107,7 @@ ZEND_RESULT_CODE php_http_querystring_xlate(zval *dst, zval *src, const char *ie
                                return FAILURE;
                        }
                }
-               
+
                if (Z_TYPE_P(entry) == IS_STRING) {
                        if (PHP_ICONV_ERR_SUCCESS != php_iconv_string(Z_STRVAL_P(entry), Z_STRLEN_P(entry), &xstr, oe, ie)) {
                                if (key.key) {
@@ -123,7 +123,7 @@ ZEND_RESULT_CODE php_http_querystring_xlate(zval *dst, zval *src, const char *ie
                        }
                } else if (Z_TYPE_P(entry) == IS_ARRAY) {
                        zval subarray;
-                       
+
                        array_init(&subarray);
                        if (key.key) {
                                add_assoc_zval_ex(dst, xkey->val, xkey->len, &subarray);
@@ -137,7 +137,7 @@ ZEND_RESULT_CODE php_http_querystring_xlate(zval *dst, zval *src, const char *ie
                                return FAILURE;
                        }
                }
-               
+
                if (key.key) {
                        zend_string_release(xkey);
                }
@@ -357,7 +357,7 @@ PHP_METHOD(HttpQueryString, __construct)
 {
        zval *params = NULL;
        zend_error_handling zeh;
-       
+
        php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &params), invalid_arg, return);
 
        zend_replace_error_handling(EH_THROW, php_http_get_exception_bad_querystring_class_entry(), &zeh);
@@ -446,7 +446,7 @@ PHP_METHOD(HttpQueryString, get)
        zend_long type = 0;
        zend_bool del = 0;
        zval *ztype = NULL, *defval = NULL;
-       
+
        if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "|szzb", &name_str, &name_len, &ztype, &defval, &del)) {
                if (name_str && name_len) {
                        if (ztype) {
@@ -454,7 +454,7 @@ PHP_METHOD(HttpQueryString, get)
                                        type = Z_LVAL_P(ztype);
                                } else if(Z_TYPE_P(ztype) == IS_STRING) {
                                        switch (Z_STRVAL_P(ztype)[0]) {
-                                               case 'B': 
+                                               case 'B':
                                                case 'b':       type = PHP_HTTP_QUERYSTRING_TYPE_BOOL;          break;
                                                case 'L':
                                                case 'l':
@@ -463,7 +463,7 @@ PHP_METHOD(HttpQueryString, get)
                                                case 'd':
                                                case 'D':
                                                case 'F':
-                                               case 'f':       type = PHP_HTTP_QUERYSTRING_TYPE_FLOAT;         break;  
+                                               case 'f':       type = PHP_HTTP_QUERYSTRING_TYPE_FLOAT;         break;
                                                case 'S':
                                                case 's':       type = PHP_HTTP_QUERYSTRING_TYPE_STRING;        break;
                                                case 'A':
@@ -486,11 +486,11 @@ ZEND_END_ARG_INFO();
 PHP_METHOD(HttpQueryString, set)
 {
        zval *params;
-       
+
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "z", &params)) {
                return;
        }
-       
+
        php_http_querystring_set(getThis(), params, QS_MERGE);
        RETVAL_ZVAL(getThis(), 1, 0);
 }
@@ -504,7 +504,7 @@ PHP_METHOD(HttpQueryString, mod)
        zend_error_handling zeh;
 
        php_http_expect(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS(), "z", &params), invalid_arg, return);
-       
+
        zend_replace_error_handling(EH_THROW, php_http_get_exception_bad_querystring_class_entry(), &zeh);
        ZVAL_OBJ(return_value, Z_OBJ_HT_P(instance)->clone_obj(Z_OBJ_P(instance)));
        /* make sure we do not inherit the reference to _GET */
@@ -561,7 +561,7 @@ PHP_METHOD(HttpQueryString, xlate)
 
        php_http_querystring_set(getThis(), &na, 0);
        RETVAL_ZVAL(getThis(), 1, 0);
-       
+
        zval_ptr_dtor(&na);
 }
 #endif /* HAVE_ICONV */
@@ -605,7 +605,7 @@ ZEND_END_ARG_INFO();
 PHP_METHOD(HttpQueryString, unserialize)
 {
        zval *serialized;
-       
+
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "z", &serialized)) {
                return;
        }
@@ -628,7 +628,7 @@ PHP_METHOD(HttpQueryString, offsetGet)
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "S", &offset)) {
                return;
        }
-       
+
        qa = zend_read_property(php_http_querystring_class_entry, Z_OBJ_P(ZEND_THIS), ZEND_STRL("queryArray"), 0, &qa_tmp);
        ZVAL_DEREF(qa);
 
@@ -647,7 +647,7 @@ PHP_METHOD(HttpQueryString, offsetSet)
 {
        zend_string *offset;
        zval *value, param, znull;
-       
+
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "Sz", &offset, &value)) {
                return;
        }
@@ -675,7 +675,7 @@ PHP_METHOD(HttpQueryString, offsetExists)
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "S", &offset)) {
                return;
        }
-       
+
        qa = zend_read_property(php_http_querystring_class_entry, Z_OBJ_P(ZEND_THIS), ZEND_STRL("queryArray"), 0, &qa_tmp);
        ZVAL_DEREF(qa);
 
@@ -694,7 +694,7 @@ PHP_METHOD(HttpQueryString, offsetUnset)
 {
        zend_string *offset;
        zval param, znull;
-       
+
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS(), "S", &offset)) {
                return;
        }
@@ -706,12 +706,15 @@ PHP_METHOD(HttpQueryString, offsetUnset)
        zval_ptr_dtor(&param);
 }
 
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_HttpQueryString___toString, 0, 0, IS_STRING, 0)
+ZEND_END_ARG_INFO();
+
 static zend_function_entry php_http_querystring_methods[] = {
        PHP_ME(HttpQueryString, __construct, ai_HttpQueryString___construct, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
 
        PHP_ME(HttpQueryString, toArray, ai_HttpQueryString_toArray, ZEND_ACC_PUBLIC)
        PHP_ME(HttpQueryString, toString, ai_HttpQueryString_toString, ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(HttpQueryString, __toString, toString, ai_HttpQueryString_toString, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(HttpQueryString, __toString, toString, ai_HttpQueryString___toString, ZEND_ACC_PUBLIC)
 
        PHP_ME(HttpQueryString, get, ai_HttpQueryString_get, ZEND_ACC_PUBLIC)
        PHP_ME(HttpQueryString, set, ai_HttpQueryString_set, ZEND_ACC_PUBLIC)
index 21e38e248be4d2355ba5167f5ebc9ee61d1dc712..459396f347d57280858a37c6e55546ff2558d495 100644 (file)
@@ -73,7 +73,7 @@ static inline char *localhostname(void)
 static php_http_url_t *php_http_url_from_env(void)
 {
        zval *https, *zhost, *zport;
-       long port;
+       zend_long port;
        php_http_buffer_t buf;
 
        php_http_buffer_init_ex(&buf, MAX(PHP_HTTP_BUFFER_DEFAULT_SIZE, sizeof(php_http_url_t)<<2), PHP_HTTP_BUFFER_INIT_PREALLOC);
@@ -2034,11 +2034,14 @@ PHP_METHOD(HttpUrl, toArray)
        php_http_url_free(&purl);
 }
 
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(ai_HttpUrl___toString, 0, 0, IS_STRING, 0)
+ZEND_END_ARG_INFO();
+
 static zend_function_entry php_http_url_methods[] = {
        PHP_ME(HttpUrl, __construct,  ai_HttpUrl___construct, ZEND_ACC_PUBLIC)
        PHP_ME(HttpUrl, mod,          ai_HttpUrl_mod, ZEND_ACC_PUBLIC)
        PHP_ME(HttpUrl, toString,     ai_HttpUrl_toString, ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(HttpUrl, __toString, toString, ai_HttpUrl_toString, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(HttpUrl, __toString, toString, ai_HttpUrl___toString, ZEND_ACC_PUBLIC)
        PHP_ME(HttpUrl, toArray,      ai_HttpUrl_toArray, ZEND_ACC_PUBLIC)
        EMPTY_FUNCTION_ENTRY
 };
@@ -2108,4 +2111,3 @@ PHP_MINIT_FUNCTION(http_url)
  * vim600: noet sw=4 ts=4 fdm=marker
  * vim<600: noet sw=4 ts=4
  */
-
index 5dd15133dea9179e483db8bfe1efb9050cd7c172..3b1e1c0c2b9773605cb839a44f4aa693350667e3 100644 (file)
@@ -1,16 +1,19 @@
 --TEST--
 client ssl
 --SKIPIF--
-<?php 
+<?php
 include "skipif.inc";
 skip_online_test();
 skip_client_test();
 skip_curl_test("7.34.0");
+if (0 === strpos(http\Client\Curl\Versions\CURL, "7.87.0")) {
+       die("skip SSL bug in libcurl-7.87\n");
+}
 if (strpos(http\Client\Curl\Versions\SSL, "SecureTransport") !== false)
        die("skip SecureTransport\n");
 ?>
 --FILE--
-<?php 
+<?php
 echo "Test\n";
 
 $client = new http\Client;
@@ -24,7 +27,7 @@ var_dump(
        ) === $client->getSslOptions()
 );
 
-$client->attach($observer = new class implements SplObserver { 
+$client->attach($observer = new class implements SplObserver {
        public $data = [];
 
        #[ReturnTypeWillChange]
index aaf462556b6f02aaf5176ac181c65dfd629c245d..f8eeeb5911d45caed5e4846eb5df1459bdac62e4 100644 (file)
@@ -4,8 +4,9 @@ client cookies
 <?php
 include "skipif.inc";
 skip_client_test();
-if (0 === strpos(http\Client\Curl\Versions\CURL, "7.64.0")) {
-       die("skip - cookie handling broken or crashes with libcurl-7.64\n");
+if (0 === strpos(http\Client\Curl\Versions\CURL, "7.64.0") ||
+       0 === strpos(http\Client\Curl\Versions\CURL, "7.88.1")) {
+       die("skip - cookie handling broken or crashes with libcurl v" . http\Client\Curl\Versions\CURL ."\n");
 }
 ?>
 --FILE--
index 4cb63afc915e6ca2f3f4ca32f8baad78cc1ab9f4..21f4c2db12619037f54edfbae5c3a5e22c31f2d4 100644 (file)
@@ -36,8 +36,8 @@ PUT / HTTP/1.1
 Accept: */*
 Content-Length: %d
 Content-Range: bytes 1-2/3
-Expect: 100-continue
-Host: localhost:%d
+%r(Expect: 100-continue
+)?%rHost: localhost:%d
 User-Agent: %s
 X-Original-Content-Length: %d
 
index 5612d06e606eca70e860e9d168ee1c55cff06f07..59d258c46f8c9681e863ed82cc1d3e4e27eed59b 100644 (file)
@@ -18,7 +18,7 @@ function dump_message($stream, http\Message $msg, $parent = false) {
        fprintf($stream, "%s\n", $msg->getInfo());
        dump_headers($stream, $msg->getHeaders());
        $msg->getBody()->toStream($stream);
-       
+
        if ($parent && ($msg = $msg->getParentMessage())) {
                dump_message($stream, $msg, true);
        }
@@ -28,7 +28,9 @@ function dump_responses($client, array $expect_cookie = []) {
        while (($r = $client->getResponse())) {
                dump_headers(null, $r->getHeaders());
                if ($expect_cookie) {
-                       $got_cookies = array_merge(...array_map(fn($c) => $c->getCookies(), $r->getCookies()));
+                       $got_cookies = array_merge(...array_map(function($c) {
+                               return $c->getCookies();
+                       }, $r->getCookies()));
                        if ($expect_cookie != $got_cookies) {
                                var_dump($expect_cookie, $got_cookies);
                                echo $r->toString(true);
index f203ed6c50f1696253e1a06d6e3439e0db95cc7c..b5bc3b7f4564d014b8636870c2de1bd51bf92bba 100644 (file)
@@ -7,9 +7,9 @@ function logger() {
        if (!ini_get("date.timezone")) {
                date_default_timezone_set(@date_default_timezone_get());
        }
-       error_log(sprintf("%s(%s): %s", 
-               basename(getenv("SCRIPT_FILENAME"), ".php"), 
-               basename(current(get_included_files()), ".inc"), 
+       error_log(sprintf("%s(%s): %s",
+               basename(getenv("SCRIPT_FILENAME"), ".php"),
+               basename(current(get_included_files()), ".inc"),
                call_user_func_array("sprintf", func_get_args())
        ));
 }
@@ -72,11 +72,11 @@ function ext_lib_name($ext) {
 }
 
 function serve($cb) {
-       /* stream_socket_server() automatically sets SO_REUSEADDR, 
+       /* stream_socket_server() automatically sets SO_REUSEADDR,
         * which is, well, bad if the tests are run in parallel
         */
        $offset = rand(0,2000);
-       foreach (range(8000+$offset, 9000+$offset) as $port) {
+       foreach (range(40000+$offset, 50000+$offset) as $port) {
                logger("serve: Trying port %d", $port);
                if (($server = @stream_socket_server("tcp://localhost:$port"))) {
                        fprintf(STDERR, "%s\n", $port);
@@ -149,28 +149,28 @@ function nghttpd($cb) {
                        $stdin = $pipes[0];
                        $stdout = $pipes[1];
                        $stderr = $pipes[2];
-                       
+
                        sleep(1);
                        $status = proc_get_status($proc);
                        logger("nghttpd: %s", new http\Params($status));
                        if (!$status["running"]) {
                                continue;
                        }
-                       
+
                        try {
                                $cb($port, $stdin, $stdout, $stderr);
                        } catch (Exception $e) {
                                echo $e,"\n";
                        }
-               
+
                        proc_terminate($proc);
-               
+
                        fpassthru($stderr);
                        fpassthru($stdout);
                        return;
                }
        }
-                       
+
 }
 
 function proc($bin, $args, $cb) {
@@ -186,7 +186,7 @@ function proc($bin, $args, $cb) {
                        $port = trim(fgets($stderr));
                        $R = array($stderr); $W = array(); $E = array();
                } while (is_numeric($port) && stream_select($R, $W, $E, 0, 10000));
-       
+
                if (is_numeric($port)) {
                        try {
                                $cb($port, $stdin, $stdout, $stderr);
@@ -194,9 +194,9 @@ function proc($bin, $args, $cb) {
                                echo $e,"\n";
                        }
                }
-       
+
                proc_terminate($proc);
-       
+
                fpassthru($stderr);
                fpassthru($stdout);
        }