Closed ghost closed 1 year ago
This Pull requests contains the following fixes for iOS webserver:
The path property is actually on the dataRequest object not on dataRequest.url
path
dataRequest.url
convert the request content into base64 otherwise we cannot handle binary requests. On the javascript side you can do something like this
const body = request.body && request.bodyIsBase64 ? base64Utils.decode(request.body) : request.body
with base64Util coming from https://github.com/niklasvh/base64-arraybuffer. This is a breaking change but since the webserver couldn't have worked that might be fine?
Change the logic to not use an infinite loop but rather save the request locally and wait until the javascript plugin sends a response, then respond to the request with that
@bykof I finally manage to create a Pull request for our fixes that we applied to get the iOS webserver to work in our application.
Thank you for contributing @saschal-j5int 🙏
This Pull requests contains the following fixes for iOS webserver:
The
path
property is actually on the dataRequest object not ondataRequest.url
convert the request content into base64 otherwise we cannot handle binary requests. On the javascript side you can do something like this
with base64Util coming from https://github.com/niklasvh/base64-arraybuffer. This is a breaking change but since the webserver couldn't have worked that might be fine?
Change the logic to not use an infinite loop but rather save the request locally and wait until the javascript plugin sends a response, then respond to the request with that