# 11206: HTTP protocol violation

Log Type: APPLICATION

Log Level: ERROR

## Description

This error occurs when a valid HTTP exchange can't be completed with the webhook URL configured for your messaging workflow. For incoming messages, Twilio makes an HTTP request to your webhook and expects a valid response. Invalid cookie data in that response can also trigger this error.

### Possible causes

* Your webhook endpoint 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 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.

### Possible solutions

* Make sure your webhook URL returns a valid HTTP response. When you respond to an incoming message with TwiML, return a supported content type such as `text/xml`, `application/xml`, or `text/html`.
* Confirm that the URL and port match the protocol you configured. Do not send HTTP traffic to an HTTPS-only port.
* Check your application, proxy, and network path for interruptions that can corrupt the HTTP exchange.
* Remove invalid control characters from cookies, and make sure every cookie has a non-empty name before your application returns the response.
* Review the failed request and response in Messaging Logs to inspect what Twilio received from your endpoint.

#### Additional resources

* [Twilio's request to your incoming message Webhook URL](/docs/messaging/guides/webhook-request)
* [TwiML for Programmable Messaging](/docs/messaging/twiml)
* [Webhooks security](/docs/usage/webhooks/webhooks-security)
