KB Article #172687
Configuring an API Gateway to use HTTP 1.1
Problem
How do I configured the API Server to use HTTP 1.1? By default the API Server uses HTTP 1.0.
Resolution
HTTP 1.1 can be enabled for both incoming and outgoing connections via the use of a Remote Host. A remote host overrides the default settings in place under System Settings > General for a particular host and port. To get HTTP/1.1 responses and enable keep-alive and chunked transfer encoding with incoming clients, it is necessary to use an 'incoming' remote host as described in the documentation on remote hosts. Otherwise, the API Gateway will send back a response with Connection: close and no chunked transfer encoding.
HTTP 1.1 can also be enabled globally for an API Gateway instance by editing /groups/group-X/instance-Y/conf/service.xml and adding allowHTTP11="true" as shown in the example below. This avoids the need to create remote hosts, though you should also enable HTTP/1.1 in any remote hosts you create for other reasons (e.g. to change timeouts) so that they do not override this setting.
<?xml version="1.0" encoding="UTF-8"?>
<NetService provider="NetService">
<!-- Configuration file for service. Note that if you wish for the user to enter a passphrase at start up then give the "secret" attribute a value "(prompt)", for example: secret="(prompt)" -->
<include file="serviceids.xml"/>
<include file="../../conf/group.xml"/>
<SystemSettings tracelevel="INFO" secret="${secret}"
serviceID="${serviceID}" groupID="${groupID}"
serviceName="${serviceName}"
groupName="${groupName}"
domainID="${domainID}" title="API Server"
allowHTTP11="true"/>
<set property="headless" value="true"/>
<include file="$VDISTDIR/system/conf/platform.xml"/>
<include file="$VDISTDIR/system/conf/trace.xml"/>
<include file="$VDISTDIR/system/conf/libxml.xml"/>
<include file="$VDISTDIR/system/conf/jvm.xml"/>
<include file="$VDISTDIR/system/conf/nativeJAXP.xml"/>
<include file="esconnection.xml"/>
<include file="mgmt.xml"/>
<includes dir="extensions" pattern="*.xml"/>
</NetService>
Adding this setting will enable HTTP 1.1 globally for this particular Instance. You must restart the instance for the setting to take effect.