ShareFile: Large File Uploads Fails on NetScaler 11.1 54.14 and later

Bug ShareFile

Large File Uploads Fails on NetScaler 11.1 54.14 and later with Length 0 POST request

Note: Even with the latest NetScaler Firmware (as today 12.0 Build 53.13), the issue persist and the workaround is need.

Symptoms or Error

If any large file upload is being failed in 11.1 54+  for HTTP POST streams and if there are any requests with content length 0 prior request sent by Netscaler before sending actual large POST request, and the server is rejecting the request as the server might not be configured to respond to 0 Length requests.

Analysis :
POST /traveler?s=USERNAME&action=sync&orig=dm&deviceId=Android_12345678gh7 HTTP/1.1
Accept-Charset: UTF-8
Content-Type: application/vnd.syncml+wbxml
Cache-Control: private
Connection: Keep-Alive
User-Agent: Lotus Traveler Android 9.0
Content-Encoding: deflate
ntCoent-Length: 90977
Accept-Language: de-AT, en-US
Accept-Language: de-AT, en-US
Host: abcd.xyz.com
Cookie: DomAuthSessId=73BDE6B8B8AECA6ECB3D649F951AA4BD; SessionID=D4EE8D6F33BC734B08D6887956530A8A5196909D; NSC_wt_mc00_usbwfmfs=ffffffffc3a0b60745525d5f4f58455e445a4a423660
Accept-Encoding: identity
Content-Length: 0

HTTP/1.1 400 Bad Request
Server: Lotus-Domino
Date: Sun, 02 Jul 2017 07:23:26 GMT
Connection: close
Pragma: no-cache
Cache-Control: no-store
X-IBM-TRAVELER-HTTP-TIME: 16
X-IBM-TRAVELER-ERROR-MESSAGE: Action sync or Content-Encoding deflate requires data, and there is no data.
X-IBM-TRAVELER-HOST: 5050
Content-Type: text/plain;charset=UTF-8
Content-Length: 41

Unnecessary requirement for IBM Traveler.


Solution

We have nsapimgr knob to handle this, Below knob will disable new functionality to handle Large Post request.

nsapimgr_wr.sh -ys arg1=0 -ys arg2=1 -ys arg3=16 -ys call=”set_sso_post_data_handler”

Note: The command should be executed in Shell prompt. Also to make it persistent with Netscaler restart make an entry under rc.netscaler file. This Article outlines the process to write the entry in rc.netscaler file:  https://support.citrix.com/article/CTX122271


Problem Cause
Why 0 length request are being forwarded by the Netscaler:
Special handling is done to overcome the memory build-up issue when client tries to upload large POST data to backend serverNetscaler 11.1 54+ handle special case for POST request from client in SSO module. where Netscaler sends additional POST request with content length 0 to backend server in case of large file uploading to avoid failure during large file size document upload.In many cases where Netscaler is sending 0 length packets but backend server is not expecting content-length 0 POST requests, it may cause an issue returning the error from Backend server and terminating the session.