[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionoo/master] Clarify how searches by IP address are performed.
commit 2a7048f8119eb40dae86ec6b5e9d04efe06ea0ae
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Thu Aug 15 11:49:33 2013 +0200
Clarify how searches by IP address are performed.
---
test/org/torproject/onionoo/ResourceServletTest.java | 17 ++++++++---------
web/index.html | 3 +++
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/test/org/torproject/onionoo/ResourceServletTest.java b/test/org/torproject/onionoo/ResourceServletTest.java
index 2d131b4..9ef12d8 100644
--- a/test/org/torproject/onionoo/ResourceServletTest.java
+++ b/test/org/torproject/onionoo/ResourceServletTest.java
@@ -557,15 +557,20 @@ public class ResourceServletTest {
}
@Test()
- public void testSearchIpv6Slash64() {
- /* TODO This request should return one bridge. */
+ public void testSearchIpv6Slash64NoTrailingBracket() {
+ ResourceServletTestHelper.assertSummaryDocument(this.tempOutDir,
+ "/summary?search=[2001:4f8:3:2e::", 1,
+ new String[] { "Ferrari458" }, 0, null);
+ }
+
+ @Test()
+ public void testSearchIpv6Slash64TrailingBracket() {
ResourceServletTestHelper.assertSummaryDocument(this.tempOutDir,
"/summary?search=[2001:4f8:3:2e::]", 0, null, 0, null);
}
@Test()
public void testSearchIpv6Uncompressed() {
- /* TODO This request should return one bridge. */
ResourceServletTestHelper.assertSummaryDocument(this.tempOutDir,
"/summary?search=[2001:04f8:0003:002e:0000:0000:0000:0051]", 0,
null, 0, null);
@@ -580,24 +585,18 @@ public class ResourceServletTest {
@Test()
public void testSearchIpv6ThreeColons() {
- /* TODO This request should fail with a 400 status code, because the
- * given IPv6 address is invalid. */
ResourceServletTestHelper.assertSummaryDocument(this.tempOutDir,
"/summary?search=[2001:4f8:3:2e:::51]", 0, null, 0, null);
}
@Test()
public void testSearchIpv6FiveHex() {
- /* TODO This request should fail with a 400 status code, because the
- * given IPv6 address is invalid. */
ResourceServletTestHelper.assertSummaryDocument(this.tempOutDir,
"/summary?search=[20014:f80:3:2e::51]", 0, null, 0, null);
}
@Test()
public void testSearchIpv6NineGroups() {
- /* TODO This request should fail with a 400 status code, because the
- * given IPv6 address is invalid. */
ResourceServletTestHelper.assertSummaryDocument(this.tempOutDir,
"/summary?search=[1:2:3:4:5:6:7:8:9]", 0, null, 0, null);
}
diff --git a/web/index.html b/web/index.html
index 888130e..e0b2b99 100755
--- a/web/index.html
+++ b/web/index.html
@@ -666,6 +666,9 @@ Parameter values are case-insensitive.
matching (part of a) nickname, (possibly $-prefixed) beginning of a
fingerprint, or beginning of an IP address, and bridges with (part of a)
nickname or (possibly $-prefixed) beginning of a hashed fingerprint.
+Searches for beginnings of IP addresses are performed on textual
+representations of canonical IP address forms, so that searches using CIDR
+notation or non-canonical forms will return empty results.
Searches are case-insensitive.
If multiple search terms are given, separated by spaces, the intersection
of all relays and bridges matching all search terms will be returned.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits