* @param cacheManager the CacheManager (may be null)
*/
private void setConnectionHeaders(HttpURLConnection conn, URL u, HeaderManager headerManager, CacheManager cacheManager) {
// Add all the headers from the HeaderManager
if (headerManager != null) {
CollectionProperty headers = headerManager.getHeaders();
if (headers != null) {
PropertyIterator i = headers.iterator();
while (i.hasNext()) {
Header header = (Header) i.next().getObjectValue();
String n = header.getName();
String v = header.getValue();
conn.addRequestProperty(n, v);