List<Object> vs = e.getValue();
if (vs.size() == 1) {
urlConnection.setRequestProperty(e.getKey(),
ClientRequest.getHeaderValue(vs.get(0)));
} else {
CommaStringBuilder sb = new CommaStringBuilder();
for (Object v : e.getValue()) {
sb.add(ClientRequest.getHeaderValue(v));
}
urlConnection.setRequestProperty(e.getKey(), sb.toString());
}
}
}