* @param uriString the request URL
* @return the request object
*/
protected HttpRequest createEmptyRequest(String uriString)
{
HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, uriString);
request.setHeader(HttpHeaders.Names.HOST, _server.getAddress().toString());
request.setHeader(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.KEEP_ALIVE);
request.setHeader(HttpHeaders.Names.ACCEPT_ENCODING, HttpHeaders.Values.GZIP);
String hostHdr = DbusHttpUtils.getLocalHostName();
String svcHdr = DbusConstants.getServiceIdentifier();
if (! hostHdr.isEmpty())
{
request.setHeader(DatabusHttpHeaders.DBUS_CLIENT_HOST_HDR, hostHdr);
}
if (! svcHdr.isEmpty())
{
request.setHeader(DatabusHttpHeaders.DBUS_CLIENT_SERVICE_HDR, svcHdr);
}
return request;
}