diff --git a/.gitignore b/.gitignore index e1f78ab..e61b5f8 100644 --- a/.gitignore +++ b/.gitignore @@ -252,4 +252,6 @@ paket-files/ .idea/ *.sln.iml -out/ \ No newline at end of file +out/ + +ASFui/FodyWeavers.xsd \ No newline at end of file diff --git a/ASFui/ASFui.cs b/ASFui/ASFui.cs index 4c26925..798ca69 100644 --- a/ASFui/ASFui.cs +++ b/ASFui/ASFui.cs @@ -501,7 +501,9 @@ private void btnAPI_Click(object sender, EventArgs e) private string sendCommand(string str) { string ret = Util.SendCommand(str); if (true){//!Settings.Default.IsLocal) { - rtbOutput.AppendText(ret + "\n"); + rtbOutput.Invoke(new MethodInvoker(() => {//also needed to avoid errors in debug mode + rtbOutput.AppendText(ret + "\n"); + })); } if (!"api".Equals(str)) { // don't know, why you did not had that here, but just to be sure. rtbOutput.Invoke(new MethodInvoker(() => {// In debug mode I get errors here, if I do not use invoke... diff --git a/ASFui/Properties/AssemblyInfo.cs b/ASFui/Properties/AssemblyInfo.cs index 5c4bc12..fe159c7 100644 --- a/ASFui/Properties/AssemblyInfo.cs +++ b/ASFui/Properties/AssemblyInfo.cs @@ -33,5 +33,5 @@ // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión // mediante el carácter '*', como se muestra a continuación: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.6.3.0")] -[assembly: AssemblyFileVersion("0.6.3.0")] +[assembly: AssemblyVersion("0.6.4.0")] +[assembly: AssemblyFileVersion("0.6.4.0")] diff --git a/ASFui/Util.cs b/ASFui/Util.cs index 73d370a..87dadaa 100644 --- a/ASFui/Util.cs +++ b/ASFui/Util.cs @@ -27,11 +27,14 @@ public static string SendCommand(string command) string address = GetEndpointAddress(); string msg=""; using (WebClient webclient = new WebClient()) { - if(!address.Contains("#")) - msg= webclient.UploadString(address + System.Net.WebUtility.UrlEncode(command), String.Empty); + webclient.Encoding = System.Text.Encoding.UTF8; + webclient.Headers[HttpRequestHeader.ContentType] = "application/json"; + + if (!address.Contains("#")) + msg= webclient.UploadString(address + Uri.EscapeUriString(command), String.Empty); else { var regex = new System.Text.RegularExpressions.Regex(System.Text.RegularExpressions.Regex.Escape("#")); - msg= webclient.UploadString(regex.Replace(address, System.Net.WebUtility.UrlEncode(command), 1), String.Empty); + msg= webclient.UploadString(regex.Replace(address, Uri.EscapeUriString(command), 1), String.Empty); } } dynamic tmp= JsonConvert.DeserializeObject(msg); diff --git a/version.txt b/version.txt index 1aa3ee4..0852b2a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.6.3.0 \ No newline at end of file +0.6.4.0 \ No newline at end of file