Bug ID 692310: ICAP modified HTTP 1.1 request/response without content-length gets "chunked" even with no body

Last Modified: Oct 06, 2020

Bug Tracker

Affected Product:  See more info
BIG-IP LTM(all modules)

Known Affected Versions:
13.0.0, 13.0.0 HF1, 13.0.0 HF2, 13.0.0 HF3, 13.0.1, 13.1.0,,,,,,,

Fixed In:

Opened: Nov 02, 2017
Severity: 3-Major
Related AskF5 Article:


When a modified HTTP v1.1 request or response is returned from an ICAP server and has no body (and also no content-length), a 'Transfer-Encoding: chunked' header is added and a zero-length chunk is appended.


The HTTP server or client to which the modified request or response is destined, receives invalid HTTP and might behave in an unexpected manner.


-- HTTP profile. -- Either request-adapt or response-adapt profile. -- Modified HTTP v1.1 request/response has no body (and no content-length header).


Use an iRule to detect the lack of a Content-Length header in the modified request or response, and insert 'Content-Length: 0'. For example with modified request: when ADAPT_REQUEST_HEADERS { if {([HTTP::method] eq "GET") and (not [HTTP::header exists 'Content-Length'])} { HTTP::header insert Content-Length 0 } } Similarly when ADAPT_RESPONSE_HEADERS {} for a response.

Fix Information

A modified HTTP v1.1 request or response with no body is never 'chunked'.

Behavior Change