Hi I am trying to upload a 2G file via tyk-gateway with v3.2.2, by curl and I found the file is being uploaded successfully but the response from the server is seen in the packet capture but the tyk is responding back with an Empty reply from the Server.
Curl_http_done: called premature == 0
Empty reply from server
Connection #0 to host left intact
curl: (52) Empty reply from server
Note that the tyk tested with and without docker in both the cases the response is the same
Tyk.conf
{
“listen_address”: “”,
“listen_port”: 8080,
“secret”: “”,
“template_path”: “/opt/tyk-gateway/templates”,
“middleware_path”: “/opt/tyk-gateway/middleware”,
“use_db_app_configs”: false,
“app_path”: “/opt/tyk/apps/”,
“storage”: {
“type”: “redis”,
“host”: “”,
“port”: 6379,
“username”: “”,
“password”: “”,
“database”: 0,
“optimisation_max_idle”: 100
},
“enable_analytics”: true,
“analytics_config”: {
“type”: “csv”,
“csv_dir”: “/var/log/tyk-gateway/metrics/”,
“purge_delay”: 2
},
“health_check”: {
“enable_health_checks”: false,
“health_check_value_timeouts”: 60
},
“optimisations_use_async_session_write”: true,
“allow_master_keys”: false,
“policies”: {
“policy_source”: “file”,
“policy_record_name”: “/var/config/default/tyk/policies/policies.json”
},
“hash_keys”: false,
“close_connections”: true,
“allow_insecure_configs”: true,
“global_session_lifetime”: 100,
“force_global_session_lifetime”: false,
“max_idle_connections_per_host”: 100,
“http_server_options”: {
“enable_websockets”:true
}
}
We are aware about the scenario and as you’ve confirmed Tyk completes the operation. You can get around the Empty rely from Server` response by setting the proxy_default_timeout.
Could you upload your current tyk.conf and any environment variables used to configure the gateway please? I would also be interested in knowing what headers you use during the upload. For example are you setting Content-Type or Content-Length or even Transfer-Encoding?
If you have an example curl -v that would be very helpful to see, but if not that more detail on how the upload is being done would be great