The following error appears when using Web Interface on NetScaler in Firefox or Google Chrome:
Corrupted Content Error or Duplicate headers received from the server"
Complete the following steps to resolve the issue:
Run the following command from the command line interface of the appliance to add the rewrite action:
add rewrite action ReplaceContentLengthZeroHeader_act replace "HTTP.RES.FULL_HEADER.REGEX_SELECT(re!Content-Length: 0!)" "\"Cotnent-Length: 0\""
Note: The “Cotnent-Length” is intentionally spelt wrong in the rewrite policy to destroy the duplicate header.
Run the following command to add a rewrite policy:
add rewrite policy ReplaceContentLengthZero_pol "HTTP.RES.STATUS.EQ(302) && HTTP.RES.FULL_HEADER.REGEX_MATCH(re!Content-Length: 0!) && HTTP.RES.FULL_HEADER.REGEX_MATCH(re!Location: .*/login.jsp!)" ReplaceContentLengthZeroHeader_act
Run the following command to bind the policy at the global level:
bind rewrite global ReplaceContentLengthZero_pol 10 END -type RES_DEFAULT
The response from the NetScaler appliance has two instances of Content-Length header.