[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [onionoo/master] Protocol: correct ordering in {first, last}_seen_days description.
commit 234f8dff6645a433f9072b26478325c3d6a00966
Author: vi <vi@xxxxxxxxxxxxxxx>
Date: Thu Dec 17 15:30:46 2015 +0000
Protocol: correct ordering in {first,last}_seen_days description.
For "at least x and at most y days" to be inhabited in cases where x /= y,
the relation must be x <= y, rather than y >= x. This interpretation is
consistent with that in the code; the server otherwise responds with 400s:
% curl -o /dev/null -w '%{http_code}\n' -s \
% 'https://onionoo.torproject.org/details?limit=1&first_seen_days=2-1'
400
% curl -o /dev/null -w '%{http_code}\n' -s \
% 'https://onionoo.torproject.org/details?limit=1&first_seen_days=1-2'
200
This bug accidentally discovered during performance analysis, using
<https://gist.github.com/fmap/6f44efe6f3ca3f79683b>.
---
web/protocol.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/protocol.html b/web/protocol.html
index e18afea..eee99ba 100644
--- a/web/protocol.html
+++ b/web/protocol.html
@@ -378,7 +378,7 @@ Filtering by flag is case-insensitive.
<p>
Return only relays or bridges which
have first been seen during the given range of days ago.
-A parameter value "x-y" with x >= y returns relays or bridges that have
+A parameter value "x-y" with x <= y returns relays or bridges that have
first been seen at least x and at most y days ago.
Accepted short forms are "x", "x-", and "-y" which are interpreted as
"x-x", "x-infinity", and "0-y".
@@ -390,7 +390,7 @@ Accepted short forms are "x", "x-", and "-y" which are interpreted as
<p>
Return only relays or bridges which
have last been seen during the given range of days ago.
-A parameter value "x-y" with x >= y returns relays or bridges that have
+A parameter value "x-y" with x <= y returns relays or bridges that have
last been seen at least x and at most y days ago.
Accepted short forms are "x", "x-", and "-y" which are interpreted as
"x-x", "x-infinity", and "0-y".
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits