[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #22983 [Metrics/Library]: Add a Descriptor subinterface and implementation for Tor web server logs



#22983: Add a Descriptor subinterface and implementation for Tor web server logs
-----------------------------+-----------------------------------
 Reporter:  iwakeh           |          Owner:  metrics-team
     Type:  enhancement      |         Status:  needs_revision
 Priority:  Medium           |      Milestone:  metrics-lib 2.2.0
Component:  Metrics/Library  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:  metrics-2017     |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+-----------------------------------

Comment (by iwakeh):

 Clarification regarding the pattern question:

 The pattern start `^((?:\\d{1,3}\\.){3}\\d{1,3}) ...` results in one group
 {{{
               ^((?:\\d{1,3}\\.){3}\\d{1,3})
                ^--------------------------^
 }}}
 The `?:` prevents sub-groups.

 The pattern is used for extracting the various parts of a log line and
 these are further checked.
 The code follows the spec
 {{{
 if (!res.ip.startsWith("0.0.0.")) {
           res.ip = "0.0.0.0";
 }
 }}}

 [https://metrics.torproject.org/web-server-logs.html#n-rewriting-matching-
 lines Spec]:
 {{{
  If the remote hostname starts with "0.0.0.", it is kept unchanged,
 otherwise it's rewritten to "0.0.0.0".
 }}}

 (cf.[https://gitweb.torproject.org/user/iwakeh/metrics-
 lib.git/tree/src/test/java/org/torproject/descriptor/log/AccessLogLineSanValTest.java?h=task-22983-4&id=629ef152be1fd2f5a00d203b614fc01e946c518d
 test cases])

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22983#comment:49>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs