mirror of
https://github.com/yacy/yacy_search_server.git
synced 2025-07-17 08:26:08 -04:00
*) direct access to requestheader of htCache.Entry removed to make it more http independent
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2486 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
source/de/anomic
@ -630,7 +630,7 @@ public final class httpdProxyHandler extends httpdAbstractHandler implements htt
|
||||
|
||||
String storeError = cacheEntry.shallStoreCacheForProxy();
|
||||
boolean storeHTCache = cacheEntry.profile().storeHTCache();
|
||||
boolean isSupportedContent = plasmaParser.supportedContent(plasmaParser.PARSER_MODE_PROXY,cacheEntry.url(),cacheEntry.responseHeader().mime());
|
||||
boolean isSupportedContent = plasmaParser.supportedContent(plasmaParser.PARSER_MODE_PROXY,cacheEntry.url(),cacheEntry.getMimeType());
|
||||
if (
|
||||
/*
|
||||
* Now we store the response into the htcache directory if
|
||||
|
@ -842,14 +842,33 @@ public final class plasmaHTCache {
|
||||
return this.cacheArray;
|
||||
}
|
||||
|
||||
public httpHeader requestHeader() {
|
||||
return this.requestHeader;
|
||||
}
|
||||
// public httpHeader requestHeader() {
|
||||
// return this.requestHeader;
|
||||
// }
|
||||
|
||||
public httpHeader responseHeader() {
|
||||
return this.responseHeader;
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
return (this.responseHeader == null) ? null : this.responseHeader.mime();
|
||||
}
|
||||
|
||||
public Date ifModifiedSince() {
|
||||
return (this.requestHeader == null) ? null : this.requestHeader.ifModifiedSince();
|
||||
}
|
||||
|
||||
public boolean requestWithCookie() {
|
||||
return (this.requestHeader == null) ? false : this.requestHeader.containsKey(httpHeader.COOKIE);
|
||||
}
|
||||
|
||||
public boolean requestProhibitsIndexing() {
|
||||
return (this.requestHeader == null)
|
||||
? false
|
||||
: this.requestHeader.containsKey(httpHeader.X_YACY_INDEX_CONTROL) &&
|
||||
((String)this.requestHeader.get(httpHeader.X_YACY_INDEX_CONTROL)).toUpperCase().equals("NO-INDEX");
|
||||
}
|
||||
|
||||
/*
|
||||
public boolean update() {
|
||||
return ((status == CACHE_FILL) || (status == CACHE_STALE_RELOAD_GOOD));
|
||||
|
@ -813,8 +813,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
|
||||
*
|
||||
* Testing if the content type is supported by the available parsers
|
||||
* ========================================================================= */
|
||||
boolean isSupportedContent = (entry.responseHeader() != null) &&
|
||||
plasmaParser.supportedContent(entry.url(),entry.responseHeader().mime());
|
||||
boolean isSupportedContent = plasmaParser.supportedContent(entry.url(),entry.getMimeType());
|
||||
|
||||
/* =========================================================================
|
||||
* INDEX CONTROL HEADER
|
||||
@ -823,13 +822,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
|
||||
* yacy to index the response returned as answer to a request
|
||||
* ========================================================================= */
|
||||
boolean doIndexing = true;
|
||||
if (entry.requestHeader() != null) {
|
||||
if (
|
||||
(entry.requestHeader().containsKey(httpHeader.X_YACY_INDEX_CONTROL)) &&
|
||||
(((String) entry.requestHeader().get(httpHeader.X_YACY_INDEX_CONTROL)).toUpperCase().equals("NO-INDEX"))
|
||||
) {
|
||||
if (entry.requestProhibitsIndexing()) {
|
||||
doIndexing = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* =========================================================================
|
||||
@ -896,8 +890,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
|
||||
enQueue(this.sbQueue.newEntry(
|
||||
entry.url(),
|
||||
indexURL.urlHash(entry.referrerURL()),
|
||||
entry.requestHeader().ifModifiedSince(),
|
||||
entry.requestHeader().containsKey(httpHeader.COOKIE),
|
||||
entry.ifModifiedSince(),
|
||||
entry.requestWithCookie(),
|
||||
entry.initiator(),
|
||||
entry.depth(),
|
||||
entry.profile().handle(),
|
||||
|
Reference in New Issue
Block a user