}
}
private HttpResponse generateEmptyResponse()
{
HttpResponse response = new DefaultHttpResponse(HTTP_1_1, OK);
//response.setContent(ChannelBuffers.wrappedBuffer(responseBody));
response.setHeader(CONTENT_TYPE, "text/plain; charset=UTF-8");
response.setHeader("Access-Control-Allow-Origin", "*");
setTrackingInfo(response);
// Encode the cookie.
String cookieString = _httpRequest.getHeader(COOKIE);
if (cookieString != null)
{
CookieDecoder cookieDecoder = new CookieDecoder();
Set<Cookie> cookies = cookieDecoder.decode(cookieString);
if(!cookies.isEmpty()) {
// Reset the cookies if necessary.
CookieEncoder cookieEncoder = new CookieEncoder(true);
for (Cookie cookie : cookies) {
cookieEncoder.addCookie(cookie);
}
response.addHeader(SET_COOKIE, cookieEncoder.encode());
}
}
return response;
}