public HttpConnection getResource(RequestedResource resource, BrowserContent referrer) {
   if ((resource != null) && (resource.getUrl() != null) && !resource.isCacheOnly()) {
     String url = resource.getUrl().trim();
     if ((referrer == null) || (ConnectionManager.isInternal(url, resource))) {
       return ConnectionManager.getUnmanagedConnection(url, resource.getRequestHeaders(), null);
     } else {
       SecondaryResourceFetchThread.enqueue(resource, referrer);
     }
     url = null;
   }
   return null;
 }