KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Our environment requires the use of an outbound proxy for offsite services. Normally this isn't a problem. In this case with Twilio, the extra header returned breaks the client. Outgoing headers: POST /2010-04-01/Accounts/FOO/SMS/Messages.json HTTP/1.1 Authorization: Basic FOO== User-Agent: twilio-php/3.10.0 Host: api.twilio.com Accept: */* Accept-Charset: utf-8 Content-Type: application/x-www-form-urlencoded Content-Length: 108 Response Headers: HTTP/1.0 200 Connection established HTTP/1.1 201 Created Server: nginx Date: Thu, 06 Jun 2013 14:39:24 GMT Content-Type: application/json; charset=utf-8 Content-Length: 551 Connection: close X-Powered-By: PHP/5.3.11 I can only assume the proxy is adding the extra HTTP header. The Twilio client does check for: list($head, $body) = ($parts[0] == 'HTTP/1.1 100 Continue') As I understand it, there are times or versions of curl that will automatically add an Expect header in the request, and the HTTP 100 would be returned in the response, but in this case it is not, and the response is 200 Connection established. For what it's worth adding an empty Expect: or an Expect:bacon didn't change the results. I'd really prefer not to hack on the Twilio client too much here, and I especially would like to avoid just adding a || $parts[0] == 'HTTP/1.0 200 Connection established' as it seems like that's messy. Is it possible to send a request header in the that will suppress/hide the extra header? Or, a curl option I'm not seeing to ignore it? The outbound proxy is Linux/Squid
Tags (comma-separated)
Save Edits
Cancel