The error you're encountering, "cURL error 1: Received HTTP/0.9 when not allowed," typically indicates that the server is responding with an HTTP/0.9 response, which is not supported by modern HTTP clients like Guzzle. This can happen if the server is not properly configured to handle HTTP/1.0 or HTTP/1.1 requests, or if there's a misconfiguration in the server setup.
Here are a few steps you can take to troubleshoot and resolve this issue:
-
Check Server Configuration: Ensure that the server (Reverb in this case) is configured to handle HTTP/1.1 requests. You might need to check the server's documentation or configuration files to ensure it's set up correctly.
-
Verify Reverb Setup: Double-check the command you use to start Reverb. Ensure that the host and port are correctly set and that Reverb is configured to handle HTTP/1.1 requests. You might want to try different ports or host configurations to see if the issue persists.
-
Use a Proxy: As a temporary workaround, you can set up a local proxy using Nginx or Apache to forward requests to Reverb. This can help ensure that the requests are properly formatted and that the server responds with the correct HTTP version.
Here's a basic example of how you might configure an Nginx proxy:
server { listen 80; server_name my-app.test; location / { proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }This configuration forwards requests from
my-app.testtolocalhost:8080, where Reverb is running. -
Check for Updates: Ensure that both Reverb and any related libraries (like Guzzle) are up to date. Sometimes, bugs or compatibility issues are resolved in newer versions.
-
Debugging: Add logging or debugging statements in your application to capture the exact request and response headers. This can help identify if there's a specific part of the request causing the issue.
-
Contact Reverb Support: If the issue persists, consider reaching out to Reverb's support or community forums. There might be known issues or additional configuration steps required for your specific setup.
By following these steps, you should be able to identify and resolve the issue with the HTTP/0.9 response. If you continue to experience problems, further investigation into the server's response handling might be necessary.