// unfortunately we can't read response cookies without completely reimplementing
// 'HessianProxy.invoke()'. Currently (3.0.13) it doesn't allow to cleanly
// intercept response... so extract session id from the RemoteSession....
// add session cookie
RemoteSession session = clientConnection.getSession();
if (session != null && session.getSessionId() != null) {
connection.setRequestProperty("Cookie", SESSION_COOKIE_NAME
+ "="
+ session.getSessionId());
}
return connection;
}