kassner / log-parser

PHP Web Server Log Parser Library
Apache License 2.0
339 stars 64 forks source link

Handle '-' in 'sentBytes' and 'receivedBytes' #66

Closed regdomain closed 3 months ago

regdomain commented 8 months ago

As '%O' may be '-' e.g. in case of a response with status 204 the regex should contain not '[0-9]+' but '[0-9]+|-' or '\d+|-' instead as you do for 'responseBytes': https://github.com/kassner/log-parser/blob/b0f21068f324b322d48785e482ca5fdbef02789f/src/LogParser.php#L42 The same probably applies to '%I' 'receivedBytes': https://github.com/kassner/log-parser/blob/b0f21068f324b322d48785e482ca5fdbef02789f/src/LogParser.php#L43

kassner commented 3 months ago

Thank you for the report.

Support was added on 2.2.0.