mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-02-17 04:03:35 +00:00
29 lines
618 B
Perl
Executable File
29 lines
618 B
Perl
Executable File
#!/usr/bin/perl -w
|
|
#
|
|
# Given a result on stdin, try and normalise some
|
|
# elements of it (such as HTTP Header dates) so that we can
|
|
# simply compare it with other results
|
|
#
|
|
|
|
use strict;
|
|
|
|
while( <STDIN> ) {
|
|
/^Date: [SMTWF][a-z]{2}, [0-9]{1,2} [JFMAJSOND][a-z]+ 20[0-9]{2} [012][0-9]:[0-5][0-9]:[0-5][0-9] GMT\r$/ && do {
|
|
$_ = "Date: Dow, 01 Jan 2000 00:00:00 GMT\r\n";
|
|
};
|
|
|
|
/^Server: Apache\/[0-9.]+/ && do {
|
|
$_ = "";
|
|
};
|
|
|
|
/^X-Powered-By: PHP\/[0-9.]+/ && do {
|
|
$_ = "";
|
|
};
|
|
|
|
/^X-RSCDS-Version: RSCDS\/[0-9.]+\.[0-9.]+\.[0-9.]+; DB\/[0-9.]+\.[0-9.]+\.[0-9.]+/ && do {
|
|
$_ = "";
|
|
};
|
|
|
|
print;
|
|
}
|