Compare commits
2 commits
9a4873e00e
...
f3b184f2e3
| Author | SHA1 | Date | |
|---|---|---|---|
| f3b184f2e3 | |||
| deb812da58 |
3 changed files with 8 additions and 3 deletions
|
|
@ -411,8 +411,8 @@ sub ClientStats {
|
|||
# parse header
|
||||
# User-Agent style
|
||||
if ($Header{'x-newsreader'} =~ /^([^\/ ]+\/[^\/ ]+ ?)+$/) {
|
||||
# transfer to user-agent and parse from there
|
||||
$Header{'user-agent'} = $Header{'x-newsreader'};
|
||||
# transfer to user-agent, if not set, and parse from there
|
||||
$Header{'user-agent'} = $Header{'x-newsreader'} if !$Header{'user-agent'};
|
||||
# "client name version"
|
||||
} elsif ($Header{'x-newsreader'} =~ / /) {
|
||||
($Client, $Version) = ParseXNewsreader($Header{'x-newsreader'});
|
||||
|
|
@ -428,7 +428,7 @@ sub ClientStats {
|
|||
version => $Version);
|
||||
push @Clients, { %UserAgent };
|
||||
} else {
|
||||
$Header{'user-agent'} = $Header{'x-newsreader'};
|
||||
$Header{'user-agent'} = $Header{'x-newsreader'} if !$Header{'user-agent'};
|
||||
}
|
||||
}
|
||||
### User-Agent
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ NewsStats 0.5.0 (unreleased)
|
|||
* Add addpost (to add post data dropped by feedlog).
|
||||
* Rename postingstats.pl to poststats.pl, rename
|
||||
dopostingstats.sh accordingly, fix all references.
|
||||
* Fix missing variable initialisation in FormatOutput().
|
||||
* gatherstats: Don't' overwrite User-Agent with X-Newsreader.
|
||||
|
||||
NewsStats 0.4.0 (2025-06-02)
|
||||
* Reformat $Conf{TLH} for GroupStats only.
|
||||
|
|
|
|||
|
|
@ -501,6 +501,9 @@ sub FormatOutput {
|
|||
my ($Format, $Comments, $LeadIn, $Caption, $Key, $Value, $Precision, $PadField,
|
||||
$PadValue, $LastIteration) = @_;
|
||||
my ($Output);
|
||||
# initialise $PadValue; $PadField needs not to be initialised,
|
||||
# as access to both is gated by valid $PadField
|
||||
$PadValue = 0 if !$PadValue;
|
||||
# create one line of output
|
||||
if ($Format eq 'dump') {
|
||||
# output as dump (key value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue