11251: Fatal protocol violation
ERROR
Twilio encountered an unrecoverable HTTP protocol violation while speaking to the target URL you configured. This usually means Twilio could not complete a valid HTTP exchange with your webhook or callback endpoint, or the response included invalid cookie data.
- Your target URL returned malformed or incomplete HTTP data.
- A network interruption broke the connection before Twilio received a valid response.
- The configured URL sent
http://traffic to an HTTPS-only port. - Your response included an invalid cookie character such as
\t,\r,\n,\v, or\f. - Your response set a cookie with an empty name.
- Make sure the target URL returns a complete and valid HTTP response. If Twilio expects TwiML, return valid TwiML. If Twilio only needs an acknowledgment, return
200 OKor204 No Content. - Confirm that the URL scheme and port match your server configuration. Do not send
http://traffic to an HTTPS-only port. - Review your application, proxy, load balancer, and network path for interruptions that can corrupt or truncate the HTTP exchange.
- Remove invalid control characters from any
Set-Cookieheader, and make sure every cookie has a non-empty name. - Test the endpoint directly with a browser,
curl, or Postman so you can inspect the raw response and catch malformed headers or unexpected redirects. - Review the Twilio Debugger and request inspector to see the request Twilio made and the response your application returned.