NetScaler AppFirewall gives 400 error while uploading files

NetScaler AppFirewall gives 400 error while uploading files

book

Article ID: CTX217539

calendar_today

Updated On:

Description

Uploading files give 400 error with application firewall policy applied. This is the log message which is reported by NetScaler:

Aug  1 11:16:09 <local0.info> pp.qq.rr.ss 08/01/2016:05:46:09 GMT NS-11 0-PPE-0 : default APPFW AF_400_RESP 215136 0 :  <aa.bb.cc.dd> 216410-PPE0 - test http://ww.xx.yy.zz Bad request headers.Content-length exceeds post body limit <blocked>

And this is the counter which gets incremented every time this happens.

root@NS-11# nsconmsg -d current | grep as_
   1867       0              5          1        0 as_req_hdrs_content_len_exceeds_post_limit
   2182       0              6          1        0 as_req_hdrs_content_len_exceeds_post_limit
 

Resolution

This is the default behavior of appfw if the request size i.e. content-length exceeds the post body limit, (default value of 20 mb) we will send the 400 error and abort the connection.

For this, we have to increase the POST Body Limit under the Profile Settings of the APPFW_PROFILE.


User-added image

Problem Cause

APPFW sends a 400 error back to the client.

Issue/Introduction

Uploading files gives 400 error with application firewall policy applied.