fix for npe

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5481 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 7608944081
commit 05c235de32

@ -57,12 +57,14 @@ public class FTPLoader {
}
protected indexDocumentMetadata createCacheEntry(final CrawlEntry entry, final String mimeType, final Date fileDate) {
if (entry == null) return null;
httpRequestHeader requestHeader = new httpRequestHeader();
requestHeader.put(httpRequestHeader.REFERER, sb.getURL(entry.referrerhash()).toNormalform(true, false));
if (entry.referrerhash() != null) requestHeader.put(httpRequestHeader.REFERER, sb.getURL(entry.referrerhash()).toNormalform(true, false));
httpResponseHeader responseHeader = new httpResponseHeader();
responseHeader.put(httpResponseHeader.LAST_MODIFIED, serverDate.formatRFC1123(fileDate));
responseHeader.put(httpResponseHeader.CONTENT_TYPE, mimeType);
indexDocumentMetadata metadata = new httpdProxyCacheEntry(entry.depth(), entry.url(), entry.name(), "OK",
indexDocumentMetadata metadata = new httpdProxyCacheEntry(
entry.depth(), entry.url(), entry.name(), "OK",
requestHeader, responseHeader,
entry.initiator(), sb.webIndex.profilesActiveCrawls.getEntry(entry.profileHandle()));
plasmaHTCache.storeMetadata(responseHeader, metadata);

Loading…
Cancel
Save