Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
644ee7c2
Commit
644ee7c2
authored
Sep 20, 2012
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prototype v0.5.2: Forward-porting v0.4.1 (Bugfix for URI-encoding)
parent
874f4cd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
trackrdr.pl
prototyp/trackrdr.pl
+10
-9
No files found.
prototyp/trackrdr.pl
View file @
644ee7c2
...
...
@@ -202,6 +202,7 @@ use threads;
use
threads::
shared
;
use
LWP::
UserAgent
;
use
LWP::
ConnCache
;
use
HTTP::
Request
;
use
HTTP::
Status
qw(RC_NO_CONTENT RC_INTERNAL_SERVER_ERROR)
;
use
Net::STOMP::
Client
;
use
Net::STOMP::Client::
Error
;
...
...
@@ -211,7 +212,7 @@ use Getopt::Std;
use
Pod::
Usage
;
$
Getopt::Std::
STANDARD_HELP_VERSION
=
1
;
$
main::
VERSION
=
"0.5.
1
"
;
$
main::
VERSION
=
"0.5.
2
"
;
sub
HELP_MESSAGE
{
pod2usage
(
-
exit
=>
0
,
-
verbose
=>
1
);
...
...
@@ -356,6 +357,7 @@ use constant {
};
my
@logtag
=
(
"DEBUG"
,
"NOTICE"
,
"WARN"
,
"ERROR"
,
"FATAL"
);
use
constant
{
ctPost
=>
'application/x-www-form-urlencoded'
};
my
$PIDFH
=
new
FileHandle
">"
.
$config
{
'pid.file'
};
unless
(
defined
$PIDFH
)
{
...
...
@@ -454,7 +456,13 @@ sub submitHTTP {
my
(
$connect
,
$data
)
=
@_
;
my
$ua
=
$connect
->
{
ua
};
my
$resp
=
$ua
->
post
(
$connect
->
{
url
},
Content
=>
$data
);
my
$req
=
HTTP::
Request
->
new
(
POST
=>
$connect
->
{
url
},
[
'Content_Type'
=>
ctPost
,
'Content_Length'
=>
length
(
$data
),
],
$data
);
logg
(
DEBUG
,
"Prepared request: "
,
$req
->
as_string
);
my
$resp
=
$ua
->
request
(
$req
);
if
(
$resp
->
code
!=
RC_NO_CONTENT
)
{
logg
(
ERROR
,
"Processor error: "
,
$resp
->
status_line
());
}
...
...
@@ -597,13 +605,6 @@ sub run_varnishlog {
my $data = join('
&
', @{$record{$tid}{data}});
$records++;
logg(DEBUG, "$records complete records found");
#if ($PROCLOGFH) {
# print $PROCLOGFH
# '
[
', scalar(localtime), "] $data\n";
#}
#submitHTTP({url => $config{'
http
.
url
'}, ua => $ua},
# $data);
#submitMQ({queue => '
track
', mq => $mq}, $data);
&{$connect{submit}}(\%connect, $data);
logg(DEBUG,
'
DATA:
', join('
&
', @{$record{$tid}{data}}));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment