mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-08-07 14:43:13 +00:00
rtorrent: fix SCGI headers
Newer versions of rtorrent stopped responding to these plugins, and comparing it to another (working) XML-RPC client, the difference was the 1 after the SCGI in the header (\000 1 vs \001). This matches up with the example on Wikipedia's "Simple Common Gateway Interface" page.
This commit is contained in:
parent
cceb4a7db7
commit
7106ecaec0
8 changed files with 16 additions and 16 deletions
|
@ -90,7 +90,7 @@ sub rtorrent_version_lower_than {
|
|||
}
|
||||
my $line_version= "<?xml version=\"1.0\" encoding=\"utf-8\"?><methodCall><methodName>system.client_version</methodName></methodCall>";
|
||||
my $llen = length $line_version;
|
||||
my $header = "CONTENT_LENGTH\000${llen}\000SCGI\001\000";
|
||||
my $header = "CONTENT_LENGTH\000${llen}\000SCGI\0001\000";
|
||||
my $hlen = length $header;
|
||||
$line_version= "${hlen}:${header},${line_version}";
|
||||
print SOCK $line_version;
|
||||
|
@ -137,7 +137,7 @@ foreach ( @views ) {
|
|||
$line = "<?xml version=\"1.0\" encoding=\"utf-8\"?><methodCall><methodName>$function_multicall</methodName><params>$function_multicall_arg<param><value><string>${_}</string></value></param><param><value><string>$function_hash</string></value></param></params></methodCall>";
|
||||
|
||||
$llen = length $line;
|
||||
$header = "CONTENT_LENGTH\000${llen}\000SCGI\001\000";
|
||||
$header = "CONTENT_LENGTH\000${llen}\000SCGI\0001\000";
|
||||
$hlen = length $header;
|
||||
$line = "${hlen}:${header},${line}";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue