|
|
@ -236,6 +236,7 @@ public class RobotsTxt {
|
|
|
|
|
|
|
|
|
|
|
|
public void ensureExist(final MultiProtocolURI theURL, final Set<String> thisAgents, boolean concurrent) {
|
|
|
|
public void ensureExist(final MultiProtocolURI theURL, final Set<String> thisAgents, boolean concurrent) {
|
|
|
|
final String urlHostPort = getHostPort(theURL);
|
|
|
|
final String urlHostPort = getHostPort(theURL);
|
|
|
|
|
|
|
|
if (urlHostPort == null) return;
|
|
|
|
final BEncodedHeap robotsTable;
|
|
|
|
final BEncodedHeap robotsTable;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
robotsTable = this.tables.getHeap(WorkTables.TABLE_ROBOTS_NAME);
|
|
|
|
robotsTable = this.tables.getHeap(WorkTables.TABLE_ROBOTS_NAME);
|
|
|
@ -371,6 +372,7 @@ public class RobotsTxt {
|
|
|
|
static final String getHostPort(final MultiProtocolURI theURL) {
|
|
|
|
static final String getHostPort(final MultiProtocolURI theURL) {
|
|
|
|
final int port = getPort(theURL);
|
|
|
|
final int port = getPort(theURL);
|
|
|
|
String host = theURL.getHost();
|
|
|
|
String host = theURL.getHost();
|
|
|
|
|
|
|
|
if (host == null) return null;
|
|
|
|
StringBuilder sb = new StringBuilder(host.length() + 6);
|
|
|
|
StringBuilder sb = new StringBuilder(host.length() + 6);
|
|
|
|
sb.append(host).append(':').append(Integer.toString(port));
|
|
|
|
sb.append(host).append(':').append(Integer.toString(port));
|
|
|
|
return sb.toString();
|
|
|
|
return sb.toString();
|
|
|
|