Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 6800b59

Browse files
committed
Merge pull request #39 from titanium007/release
Release
2 parents cc9e782 + b8c85c7 commit 6800b59

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public void Ok(string html)
326326
var result = Encoding.Default.GetBytes(html);
327327

328328
var connectStreamWriter = new StreamWriter(this.Client.ClientStream);
329-
connectStreamWriter.WriteLine(string.Format("{0} {2} {3}", ProxySession.Request.HttpVersion, 200, "Ok"));
329+
connectStreamWriter.WriteLine(string.Format("{0} {1} {2}", ProxySession.Request.HttpVersion, 200, "Ok"));
330330
connectStreamWriter.WriteLine("Timestamp: {0}", DateTime.Now);
331331
connectStreamWriter.WriteLine("content-length: " + result.Length);
332332
connectStreamWriter.WriteLine("Cache-Control: no-cache, no-store, must-revalidate");

Titanium.Web.Proxy/Helpers/CertificateManager.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Diagnostics;
44
using System.Collections.Generic;
55
using System.Security.Cryptography.X509Certificates;
6+
using System.Reflection;
67

78
namespace Titanium.Web.Proxy.Helpers
89
{
@@ -112,14 +113,16 @@ protected virtual void CreateCertificate(string[] args)
112113
{
113114
using (var process = new Process())
114115
{
115-
if (!File.Exists("makecert.exe"))
116+
string file = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "makecert.exe");
117+
118+
if (!File.Exists(file))
116119
throw new Exception("Unable to locate 'makecert.exe'.");
117120

118121
process.StartInfo.Verb = "runas";
119122
process.StartInfo.Arguments = args != null ? args[0] : string.Empty;
120123
process.StartInfo.CreateNoWindow = true;
121124
process.StartInfo.UseShellExecute = false;
122-
process.StartInfo.FileName = "makecert.exe";
125+
process.StartInfo.FileName = file;
123126

124127
process.Start();
125128
process.WaitForExit();

0 commit comments

Comments
 (0)