return crawl delete reply in json.

take out EDOCEVILREDIRECT errors.
This commit is contained in:
Matt Wells 2013-11-07 09:55:47 -08:00
parent 3b929917d1
commit 2ae04cff71
2 changed files with 14 additions and 5 deletions

@ -2262,6 +2262,15 @@ bool sendPageCrawlbot ( TcpSocket *socket , HttpRequest *hr ) {
name = NULL;
// no longer a delete function, we need to set "name" below
delColl = false;//NULL;
// john wants just a brief success reply
char *reply = "{\"reply\":\"Successfully deleted crawl.\"}";
return g_httpServer.sendDynamicPage( socket,
reply,
gbstrlen(reply),
0, // cacheTime
false, // POSTReply?
"application/json"
);
}
// if name is missing default to name of first existing

@ -8931,11 +8931,11 @@ Url **XmlDoc::getRedirUrl() {
return &m_redirUrlPtr;
}
// do not allow redirects to evil-G or bing
if ( strstr(loc->getUrl(),".google.com/") ||
strstr(loc->getUrl(),".bing.com/") ) {
m_redirError = EDOCEVILREDIRECT;
return &m_redirUrlPtr;
}
//if ( strstr(loc->getUrl(),".google.com/") ||
// strstr(loc->getUrl(),".bing.com/") ) {
// m_redirError = EDOCEVILREDIRECT;
// return &m_redirUrlPtr;
//}
// log a msg
//if ( g_conf.m_logSpideredUrls )
// logf(LOG_INFO,"build: %s redirected to %s",