• R/O
  • SSH
  • HTTPS

ewatch: Commit


Commit MetaInfo

Revision115 (tree)
Zeit2020-08-13 22:54:31
Autorbananajinn

Log Message

* Slack通知は半角スペースを + ではなく %20 でエンコードする

* 1.0.33

Ändern Zusammenfassung

Diff

--- trunk/EWatch/EWatch/Actions/ActionSlack.cs (revision 114)
+++ trunk/EWatch/EWatch/Actions/ActionSlack.cs (revision 115)
@@ -91,9 +91,15 @@
9191 var subject = string.Format("[{0}] {1}", data.HostName, GetSubject(data.Message));
9292 if (!Util.IsNullOrEmpty(data.Name))
9393 subject = string.Format("[{0}]{1}", data.Name, subject);
94- Send(string.Concat("payload=", HttpUtility.UrlEncode(GetJSON(subject, text.ToString()))));
94+ Send(string.Concat("payload=", Encode(GetJSON(subject, text.ToString()))));
9595 }
9696
97+ private string Encode(string value)
98+ {
99+ var result = WebUtility.UrlEncode(value);
100+ return result.Replace("+", "%20");
101+ }
102+
97103 private string GetSubject(string value)
98104 {
99105 if (!string.IsNullOrEmpty(value)) {
@@ -141,7 +147,7 @@
141147 req.Method = "POST";
142148 req.ContentType = "application/x-www-form-urlencoded";
143149 req.ContentLength = data.Length;
144-
150+
145151 using (Stream s = req.GetRequestStream()) {
146152 s.Write(data, 0, data.Length);
147153 }
--- trunk/EWatch/EWatch/Properties/AssemblyInfo.cs (revision 114)
+++ trunk/EWatch/EWatch/Properties/AssemblyInfo.cs (revision 115)
@@ -24,5 +24,5 @@
2424 //
2525 // You can specify all the values or you can use the default the Revision and
2626 // Build Numbers by using the '*' as shown below:
27-[assembly: AssemblyVersion ("1.0.32")]
27+[assembly: AssemblyVersion ("1.0.33")]
2828 //[assembly: log4net.Config.XmlConfigurator(ConfigFile=@"Log4net.Config.xml", Watch=true)]
--- trunk/EWatch/EWatch/Server/Commands/PutCommand.cs (revision 114)
+++ trunk/EWatch/EWatch/Server/Commands/PutCommand.cs (revision 115)
@@ -30,7 +30,8 @@
3030 {
3131 var actionTable = LogMatcher.Match(_config.ServerRules, LogData);
3232 if(!Util.IsNullOrEmpty(actionTable)) {
33- LogData.Name = LogData.Name ?? _config.General.Name;
33+ if(LogData.Name == null && _config.General != null)
34+ LogData.Name = _config.General.Name;
3435 ActionExecutor.ExecuteAction(actionTable.Actions, LogData);
3536 }
3637 }
--- trunk/EWatch/EWatchCLI/Properties/AssemblyInfo.cs (revision 114)
+++ trunk/EWatch/EWatchCLI/Properties/AssemblyInfo.cs (revision 115)
@@ -28,4 +28,4 @@
2828 //
2929 // You can specify all the values or you can use the default the Revision and
3030 // Build Numbers by using the '*' as shown below:
31-[assembly: AssemblyVersion("1.0.32")]
31+[assembly: AssemblyVersion("1.0.33")]
--- trunk/EWatch/EWatchUI/Properties/AssemblyInfo.cs (revision 114)
+++ trunk/EWatch/EWatchUI/Properties/AssemblyInfo.cs (revision 115)
@@ -28,4 +28,4 @@
2828 //
2929 // You can specify all the values or you can use the default the Revision and
3030 // Build Numbers by using the '*' as shown below:
31-[assembly: AssemblyVersion("1.0.32")]
31+[assembly: AssemblyVersion("1.0.33")]
--- trunk/EWatch/EWatchView/Properties/AssemblyInfo.cs (revision 114)
+++ trunk/EWatch/EWatchView/Properties/AssemblyInfo.cs (revision 115)
@@ -28,4 +28,4 @@
2828 //
2929 // You can specify all the values or you can use the default the Revision and
3030 // Build Numbers by using the '*' as shown below:
31-[assembly: AssemblyVersion("1.0.32")]
31+[assembly: AssemblyVersion("1.0.33")]
Show on old repository browser