Commit 6800b598 authored by titanium007's avatar titanium007

Merge pull request #39 from titanium007/release

Release
parents cc9e7826 b8c85c74
...@@ -326,7 +326,7 @@ namespace Titanium.Web.Proxy.EventArguments ...@@ -326,7 +326,7 @@ namespace Titanium.Web.Proxy.EventArguments
var result = Encoding.Default.GetBytes(html); var result = Encoding.Default.GetBytes(html);
var connectStreamWriter = new StreamWriter(this.Client.ClientStream); var connectStreamWriter = new StreamWriter(this.Client.ClientStream);
connectStreamWriter.WriteLine(string.Format("{0} {2} {3}", ProxySession.Request.HttpVersion, 200, "Ok")); connectStreamWriter.WriteLine(string.Format("{0} {1} {2}", ProxySession.Request.HttpVersion, 200, "Ok"));
connectStreamWriter.WriteLine("Timestamp: {0}", DateTime.Now); connectStreamWriter.WriteLine("Timestamp: {0}", DateTime.Now);
connectStreamWriter.WriteLine("content-length: " + result.Length); connectStreamWriter.WriteLine("content-length: " + result.Length);
connectStreamWriter.WriteLine("Cache-Control: no-cache, no-store, must-revalidate"); connectStreamWriter.WriteLine("Cache-Control: no-cache, no-store, must-revalidate");
......
...@@ -3,6 +3,7 @@ using System.IO; ...@@ -3,6 +3,7 @@ using System.IO;
using System.Diagnostics; using System.Diagnostics;
using System.Collections.Generic; using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Reflection;
namespace Titanium.Web.Proxy.Helpers namespace Titanium.Web.Proxy.Helpers
{ {
...@@ -112,14 +113,16 @@ namespace Titanium.Web.Proxy.Helpers ...@@ -112,14 +113,16 @@ namespace Titanium.Web.Proxy.Helpers
{ {
using (var process = new Process()) using (var process = new Process())
{ {
if (!File.Exists("makecert.exe")) string file = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "makecert.exe");
if (!File.Exists(file))
throw new Exception("Unable to locate 'makecert.exe'."); throw new Exception("Unable to locate 'makecert.exe'.");
process.StartInfo.Verb = "runas"; process.StartInfo.Verb = "runas";
process.StartInfo.Arguments = args != null ? args[0] : string.Empty; process.StartInfo.Arguments = args != null ? args[0] : string.Empty;
process.StartInfo.CreateNoWindow = true; process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false; process.StartInfo.UseShellExecute = false;
process.StartInfo.FileName = "makecert.exe"; process.StartInfo.FileName = file;
process.Start(); process.Start();
process.WaitForExit(); process.WaitForExit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment