Skip to content

Commit

Permalink
Getting response headers into userland for URL fopen
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmorris committed Nov 27, 2024
1 parent e011e25 commit 191634f
Show file tree
Hide file tree
Showing 88 changed files with 2,038 additions and 4,027 deletions.
338 changes: 338 additions & 0 deletions LICENSE-GPL

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ cjs: ${CJS}

mjs: ${MJS}

tags: ${TAG_JS}

web-mjs: $(addprefix ${PHP_DIST_DIR}/,PhpBase.mjs PhpWeb.mjs OutputBuffer.mjs fsOps.mjs webTransactions.mjs resolveDependencies.mjs _Event.mjs php-web.mjs)
web-js: $(addprefix ${PHP_DIST_DIR}/,PhpBase.js PhpWeb.js OutputBuffer.js fsOps.js webTransactions.js resolveDependencies.js _Event.js php-web.js)

Expand Down Expand Up @@ -168,8 +170,6 @@ EXTRA_FLAGS?=
PHP_ARCHIVE_DEPS=third_party/php${PHP_VERSION}-src/configured third_party/php${PHP_VERSION}-src/patched
ARCHIVES=
SHARED_LIBS=
# EXPORTED_FUNCTIONS="_pib_init", "_pib_storage_init", "_pib_destroy", "_pib_run", "_pib_exec", "_pib_refresh", "_pib_flush", "_main", "_malloc", "_free", "_realloc"
# EXPORTED_FUNCTIONS="_pib_init", "_pib_run", "_pib_exec", "_pib_refresh"
PRE_JS_FILES=source/env.js
EXTRA_PRE_JS_FILES?=
PHPIZE=third_party/php${PHP_VERSION}-src/scripts/phpize
Expand Down Expand Up @@ -392,7 +392,8 @@ BUILD_FLAGS=-f ../../php.mk \
EXTRA_LDFLAGS_PROGRAM='-O${OPTIMIZE} -static \
-Wl,-zcommon-page-size=2097152 -Wl,-zmax-page-size=2097152 -L/src/lib/lib \
${SYMBOL_FLAGS} -flto -fPIC \
-s EXPORTED_RUNTIME_METHODS='\''["ccall", "UTF8ToString", "lengthBytesUTF8", "getValue", "FS", "ENV"]'\'' \
-s EXPORTED_FUNCTIONS='\''["_malloc", "_free", "_main"]'\'' \
-s EXPORTED_RUNTIME_METHODS='\''["ccall", "UTF8ToString", "lengthBytesUTF8", "stringToUTF8", "getValue", "setValue", "lengthBytesUTF8", "FS", "ENV"]'\'' \
-s INITIAL_MEMORY=${INITIAL_MEMORY} \
-s MAXIMUM_MEMORY=${MAXIMUM_MEMORY} \
-s ENVIRONMENT=${ENVIRONMENT} \
Expand Down
11 changes: 7 additions & 4 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
php-wasm

Copyright 2019-2024 Sean Morris
Copyright 2018-2020 Oraoto
Copyright 2019-2020 Sean Morris

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Dual licensed under the Apache License, Version 2.0 and the GNU General
Public License Version 2. You may obtain a copy of the Licenses at:

http://www.apache.org/licenses/LICENSE-2.0
https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

You should have received a copy of the GNU General Public License
and/or the Apache License, Version 2.0 along with this program.
128 changes: 64 additions & 64 deletions demo-node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions demo-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
"start": "./index.mjs"
},
"dependencies": {
"php-cgi-wasm": "0.0.9-alpha-20",
"php-wasm-dom": "0.0.9-alpha-20",
"php-wasm-gd": "0.0.9-alpha-20",
"php-wasm-iconv": "0.0.9-alpha-20",
"php-wasm-intl": "0.0.9-alpha-20",
"php-wasm-libxml": "0.0.9-alpha-20",
"php-wasm-libzip": "0.0.9-alpha-20",
"php-wasm-mbstring": "0.0.9-alpha-20",
"php-wasm-openssl": "0.0.9-alpha-20",
"php-wasm-phar": "0.0.9-alpha-20",
"php-wasm-simplexml": "0.0.9-alpha-20",
"php-wasm-sqlite": "0.0.9-alpha-20",
"php-wasm-tidy": "0.0.9-alpha-20",
"php-wasm-xml": "0.0.9-alpha-20",
"php-wasm-yaml": "0.0.9-alpha-20",
"php-wasm-zlib": "0.0.9-alpha-20"
"php-cgi-wasm": "0.0.9-alpha-27",
"php-wasm-dom": "0.0.9-alpha-27",
"php-wasm-gd": "0.0.9-alpha-27",
"php-wasm-iconv": "0.0.9-alpha-27",
"php-wasm-intl": "0.0.9-alpha-27",
"php-wasm-libxml": "0.0.9-alpha-27",
"php-wasm-libzip": "0.0.9-alpha-27",
"php-wasm-mbstring": "0.0.9-alpha-27",
"php-wasm-openssl": "0.0.9-alpha-27",
"php-wasm-phar": "0.0.9-alpha-27",
"php-wasm-simplexml": "0.0.9-alpha-27",
"php-wasm-sqlite": "0.0.9-alpha-27",
"php-wasm-tidy": "0.0.9-alpha-27",
"php-wasm-xml": "0.0.9-alpha-27",
"php-wasm-yaml": "0.0.9-alpha-27",
"php-wasm-zlib": "0.0.9-alpha-27"
}
}
8 changes: 7 additions & 1 deletion demo-web/npm-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set -eux;

if [ -d 'public/static/media/mapped' ]; then {
rm public/static/media/*.map || true
rm -rf public/static/media/mapped
}
fi

rm -f build/*.wasm;
rm -f build/*.data;
rm -f build/*.map;
Expand All @@ -22,4 +28,4 @@ cp build/index.html build/embedded-php.html;
cp build/index.html build/select-framework.html;
cp build/index.html build/install-demo.html;
cp build/index.html build/code-editor.html;
git add ../docs/static/js/*
git add ../docs/*js ../docs/static/js/* ../demo-web/public/*.js
2 changes: 1 addition & 1 deletion demo-web/npm-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eux;

if [ -d 'public/static/media/mapped' ]; then {
rm public/static/media/*.map
rm public/static/media/*.map || true
rm -rf public/static/media/mapped
}
fi
Expand Down
Loading

0 comments on commit 191634f

Please sign in to comment.