202 |
w.write("Automatic Proxy Configuration location can be set to "); |
w.write("Automatic Proxy Configuration location can be set to "); |
203 |
w.write("<a href=\""+ROOTURL+URNPAC+"\">" |
w.write("<a href=\""+ROOTURL+URNPAC+"\">" |
204 |
+ROOTURL+URNPAC+"</a></p>\n"); |
+ROOTURL+URNPAC+"</a></p>\n"); |
205 |
} |
} |
206 |
|
|
207 |
protected HTTPResponse serveHomePage(boolean rewrite, |
protected HTTPResponse serveHomePage(boolean rewrite, |
208 |
boolean backlinks, |
boolean backlinks, |
224 |
|
|
225 |
PointerIndex pIndex = |
PointerIndex pIndex = |
226 |
(PointerIndex)pool.getIndex(PointerIndex.uri); |
(PointerIndex)pool.getIndex(PointerIndex.uri); |
227 |
|
|
228 |
SetCollector ids = pool.getIds(); |
SetCollector ids = pool.getIds(); |
229 |
Collector pIds = pIndex.getIds(); |
Collector pIds = pIndex.getIds(); |
230 |
|
|
234 |
} catch(InterruptedException _) {} |
} catch(InterruptedException _) {} |
235 |
|
|
236 |
synchronized(pIds) { |
synchronized(pIds) { |
237 |
for(Iterator i=pIds.iterator(); i.hasNext();) { |
for(Iterator i=pIds.iterator(); i.hasNext();) { |
238 |
PointerId id = (PointerId)i.next(); |
PointerId id = (PointerId)i.next(); |
239 |
String s = id.getURI(); |
try { |
240 |
if(rewrite) s = base + s; |
PointerBlock pb = pIndex.getPointerBlock(id); |
241 |
w.write("<a href=\""+s+"\">"+id+"</a><br>\n"); |
String n = pb.getName(); |
242 |
} |
String s = id.getURI(); |
243 |
|
if(rewrite) |
244 |
|
s = base + s; |
245 |
|
w.write(n+"<a href=\""+s+"\">"+id+"</a><br>\n"); |
246 |
|
} |
247 |
|
catch(GeneralSecurityException _) { _.printStackTrace(); w.write("<p> error X"); } |
248 |
|
} |
249 |
} |
} |
250 |
|
|
251 |
w.write("<p>"); |
w.write("<p>"); |
254 |
for(Iterator i=ids.iterator(); i.hasNext();) { |
for(Iterator i=ids.iterator(); i.hasNext();) { |
255 |
BlockId id = (BlockId)i.next(); |
BlockId id = (BlockId)i.next(); |
256 |
String s = id.getURI(); |
String s = id.getURI(); |
257 |
if(rewrite) |
if(rewrite) |
258 |
s = base + s; |
s = base + s; |
259 |
w.write("<a href=\""+s+"\">"+id+"</a><br>\n"); |
w.write("<a href=\""+s+"\">"+id+"</a><br>\n"); |
260 |
} |
} |