Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
efdb577d
Commit
efdb577d
authored
Jun 28, 2015
by
titanium007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow abandon request as per issue #3
parent
3193e7d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
ProxyTestController.cs
Titanium.Web.Proxy.Test/ProxyTestController.cs
+1
-1
SessionEventArgs.cs
Titanium.Web.Proxy/Models/SessionEventArgs.cs
+11
-2
No files found.
Titanium.Web.Proxy.Test/ProxyTestController.cs
View file @
efdb577d
...
@@ -84,7 +84,7 @@ namespace Titanium.Web.Proxy.Test
...
@@ -84,7 +84,7 @@ namespace Titanium.Web.Proxy.Test
}
}
e
.
Ok
();
e
.
Ok
(
null
);
_lastURL
=
URL
;
_lastURL
=
URL
;
}
}
}
}
...
...
Titanium.Web.Proxy/Models/SessionEventArgs.cs
View file @
efdb577d
...
@@ -51,13 +51,19 @@ namespace Titanium.Web.Proxy.Models
...
@@ -51,13 +51,19 @@ namespace Titanium.Web.Proxy.Models
mw
.
Close
();
mw
.
Close
();
return
Encoding
.
Default
.
GetString
(
mw
.
ToArray
());
return
Encoding
.
Default
.
GetString
(
mw
.
ToArray
());
}
}
public
void
Ok
()
public
void
Ok
(
string
Html
)
{
{
if
(
Html
==
null
)
Html
=
string
.
Empty
;
var
result
=
Encoding
.
Default
.
GetBytes
(
Html
);
StreamWriter
connectStreamWriter
=
new
StreamWriter
(
ClientStream
);
StreamWriter
connectStreamWriter
=
new
StreamWriter
(
ClientStream
);
var
s
=
String
.
Format
(
"HTTP/{0}.{1} {2} {3}"
,
HttpVersion
.
Major
,
HttpVersion
.
Minor
,
200
,
"Ok"
);
var
s
=
String
.
Format
(
"HTTP/{0}.{1} {2} {3}"
,
HttpVersion
.
Major
,
HttpVersion
.
Minor
,
200
,
"Ok"
);
connectStreamWriter
.
WriteLine
(
s
);
connectStreamWriter
.
WriteLine
(
s
);
connectStreamWriter
.
WriteLine
(
String
.
Format
(
"Timestamp: {0}"
,
DateTime
.
Now
.
ToString
()));
connectStreamWriter
.
WriteLine
(
String
.
Format
(
"Timestamp: {0}"
,
DateTime
.
Now
.
ToString
()));
connectStreamWriter
.
WriteLine
(
"content-length:
0"
);
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"
);
connectStreamWriter
.
WriteLine
(
"Pragma: no-cache"
);
connectStreamWriter
.
WriteLine
(
"Pragma: no-cache"
);
connectStreamWriter
.
WriteLine
(
"Expires: 0"
);
connectStreamWriter
.
WriteLine
(
"Expires: 0"
);
...
@@ -72,6 +78,9 @@ namespace Titanium.Web.Proxy.Models
...
@@ -72,6 +78,9 @@ namespace Titanium.Web.Proxy.Models
connectStreamWriter
.
WriteLine
();
connectStreamWriter
.
WriteLine
();
connectStreamWriter
.
Flush
();
connectStreamWriter
.
Flush
();
ClientStream
.
Write
(
result
,
0
,
result
.
Length
);
Cancel
=
true
;
Cancel
=
true
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment