Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

safari - NSPOSIXErrorDomain:100

I created API with PHP and am testing it now.

It goes success with chrome and firefox, but safari gets error, "NSPOSIXErrorDomain:100."

This error sometime happens and sometime I can get a correct response from API.

Does anyone know anything about this kind of error? I still don't understand even which part is causing this error...Is this because of server, AWS, SSL, PHP, or client browser?

Here is some info of my API.

  • allowing https access only (ex https://xxxdomain/xxx?id=000)
  • using php (Lumen)
  • deployed on AWS
  • receiving GET request with some params
like image 820
datenshidon Avatar asked Jun 19 '18 03:06

datenshidon


2 Answers

I had the same problem calling PHP APIs deployed behind an AWS Load Balancer (I don't know if Load Balancer is present in your settings). I have solved the issue by disabling the use of HTTP 2.0 in the load balancer. In order to disable HTTP 2.0, select your Load Balancer in the AWS console then select Action -> Edit Attributes and disable HTTP/2

enter image description here

If you're not using a Load Balancer you have to check your webserver settings in order to figure out which HTTP version is enabled.

like image 120
Andrea Gorrieri Avatar answered Nov 03 '22 01:11

Andrea Gorrieri


I fixed this problem by inserting the following as the very first line of the .htaccess file:

Header unset Upgrade
like image 36
Scott Regan Avatar answered Nov 03 '22 01:11

Scott Regan