-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable HTTP/2 for CURL #727
Comments
Sounds good, if anyone wants to work on a PR that's perfect! Thanks for the details! |
@atbreuer11 looks weird regarding this docker-library/php#567 (comment) and that bref/runtime/base/base.Dockerfile Line 210 in f639091
so... haven't tested yet but maybe related on the fact that your curl request is made by using HTTP/1 mode? 🤔 |
@shouze Here is the relevant code. I believe this is identical to the code I had been using locally, which was making successful HTTP/2 requests (to the Apple APNs servers).
|
Thanks! And can you please provide php layer version that you use? |
@shouze I'm using the |
@atbreuer11 thx, and which region & version of the layer runtime (latest ones are listed here for example)? |
Ok anyway I've checked on various php docker images and yes we miss HTTP2 support on bref's php: ❯ docker run php:7.4 php -i | grep HTTP2
HTTP2 => Yes
~ took 675ms
❯ docker run php:7.4-alpine php -i | grep HTTP2
HTTP2 => Yes
~ took 751ms
❯ docker run --entrypoint= bref/php-74:latest php -i | grep HTTP2
HTTP2 => No |
I have a lumen based API using the
php-74-fpm
layer as well as a custom layer to add sqlsrv extensions. When using the curl extension to make a request to Apple's APNs, I am receiving the following error:production.INFO: APNS request response: �������@��@u��Unexpected HTTP/1.x request
The cause seems simple enough, Bref's provided environment does not have HTTP/2 enabled for the curl extension. According to this Stackoverflow answer, there is a compile time option to enable HTTP/2.
This link may also be helpful: curl http2 docs
If anyone has been able to enable this functionality via a custom layer, I would appreciate any guidance.
The text was updated successfully, but these errors were encountered: