I have a hydra requests that works well in development. But fails in production. Response looks like this
options:
:return_code: :ok
:response_headers: ! "HTTP/1.1 200 OK\r\nContent-Type: application/json; charset=utf-8\r\nTransfer-Encoding:
chunked\r\nConnection: keep-alive\r\nStatus: 200\r\nX-Powered-By: Phusion Passenger
(mod_rails/mod_rack) 3.0.19\r\nX-UA-Compatible: IE=Edge,chrome=1\r\nETag: \"2ef0bc08f9b4fa4c7ecc4092f387c4c7\"\r\nCache-Control:
max-age=0, private, must-revalidate\r\nX-Request-Id: df304fd28b406f8b3a97c84a7ce4de5e\r\nX-Runtime:
0.614748\r\nDate: Sat, 27 Jul 2013 08:03:09 GMT\r\nX-Rack-Cache: invalidate, pass\r\nServer:
nginx/1.2.6 + Phusion Passenger 3.0.19\r\n\r\n"
:response_body: ! '{"status":"success","message":"Message Sent","code":"200"}'
:httpauth_avail: 0
:total_time: 5.700828
:starttransfer_time: 5.700666
:appconnect_time: 4.387121
:pretransfer_time: 4.387193
:connect_time: 0.446846
:namelookup_time: 0.001348
:effective_url: !binary |-
aHR0cHM6Ly9maXJlZmx5YXBpLmNvbS9hcGkvc21z
:primary_ip: !binary |-
MTczLjI0Ni40MC4yNA==
:response_code: 200
But in production it returns a ssl_cacert
code:
options:
:return_code: :ssl_cacert
:response_headers: ''
:response_body: ''
:httpauth_avail: 0
:total_time: 0.419993
:starttransfer_time: 0.0
:appconnect_time: 0.0
:pretransfer_time: 0.0
:connect_time: 0.321081
:namelookup_time: 0.245361
:effective_url: !binary |-
aHR0cHM6Ly9maXJlZmx5YXBpLmNvbS9hcGkvc21z
:primary_ip: !binary |-
MTczLjI0Ni40MC4yNA==
:response_code: 0
Any idea why this happens?
Fixed this by adding the below to the typhoeus request:
ssl_verifypeer: false
Thanks guys!