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
e3c1483f
Commit
e3c1483f
authored
Oct 13, 2019
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some nullable (for build test)
parent
4d1782f7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
7 deletions
+8
-7
SessionEventArgs.cs
src/Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
+2
-2
SessionEventArgsBase.cs
...Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs
+1
-1
ProxyHttpException.cs
src/Titanium.Web.Proxy/Exceptions/ProxyHttpException.cs
+1
-1
HttpWebClient.cs
src/Titanium.Web.Proxy/Http/HttpWebClient.cs
+1
-1
RequestHandler.cs
src/Titanium.Web.Proxy/RequestHandler.cs
+2
-2
Titanium.Web.Proxy.csproj
src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
+1
-0
No files found.
src/Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
View file @
e3c1483f
...
@@ -43,7 +43,7 @@ namespace Titanium.Web.Proxy.EventArguments
...
@@ -43,7 +43,7 @@ namespace Titanium.Web.Proxy.EventArguments
}
}
protected
SessionEventArgs
(
ProxyServer
server
,
ProxyEndPoint
endPoint
,
protected
SessionEventArgs
(
ProxyServer
server
,
ProxyEndPoint
endPoint
,
Request
request
,
CancellationTokenSource
cancellationTokenSource
)
Request
?
request
,
CancellationTokenSource
cancellationTokenSource
)
:
base
(
server
,
endPoint
,
cancellationTokenSource
,
request
)
:
base
(
server
,
endPoint
,
cancellationTokenSource
,
request
)
{
{
}
}
...
@@ -519,7 +519,7 @@ namespace Titanium.Web.Proxy.EventArguments
...
@@ -519,7 +519,7 @@ namespace Titanium.Web.Proxy.EventArguments
/// <param name="html">HTML content to sent.</param>
/// <param name="html">HTML content to sent.</param>
/// <param name="headers">HTTP response headers.</param>
/// <param name="headers">HTTP response headers.</param>
/// <param name="closeServerConnection">Close the server connection used by request if any?</param>
/// <param name="closeServerConnection">Close the server connection used by request if any?</param>
public
void
Ok
(
string
html
,
Dictionary
<
string
,
HttpHeader
>
headers
=
null
,
public
void
Ok
(
string
html
,
Dictionary
<
string
,
HttpHeader
>
?
headers
=
null
,
bool
closeServerConnection
=
false
)
bool
closeServerConnection
=
false
)
{
{
var
response
=
new
OkResponse
();
var
response
=
new
OkResponse
();
...
...
src/Titanium.Web.Proxy/EventArguments/SessionEventArgsBase.cs
View file @
e3c1483f
...
@@ -49,7 +49,7 @@ namespace Titanium.Web.Proxy.EventArguments
...
@@ -49,7 +49,7 @@ namespace Titanium.Web.Proxy.EventArguments
protected
SessionEventArgsBase
(
ProxyServer
server
,
ProxyEndPoint
endPoint
,
protected
SessionEventArgsBase
(
ProxyServer
server
,
ProxyEndPoint
endPoint
,
CancellationTokenSource
cancellationTokenSource
,
CancellationTokenSource
cancellationTokenSource
,
Request
request
)
:
this
(
server
)
Request
?
request
)
:
this
(
server
)
{
{
CancellationTokenSource
=
cancellationTokenSource
;
CancellationTokenSource
=
cancellationTokenSource
;
...
...
src/Titanium.Web.Proxy/Exceptions/ProxyHttpException.cs
View file @
e3c1483f
...
@@ -14,7 +14,7 @@ namespace Titanium.Web.Proxy.Exceptions
...
@@ -14,7 +14,7 @@ namespace Titanium.Web.Proxy.Exceptions
/// <param name="message">Message for this exception</param>
/// <param name="message">Message for this exception</param>
/// <param name="innerException">Associated inner exception</param>
/// <param name="innerException">Associated inner exception</param>
/// <param name="session">Instance of <see cref="EventArguments.SessionEventArgs" /> associated to the exception</param>
/// <param name="session">Instance of <see cref="EventArguments.SessionEventArgs" /> associated to the exception</param>
internal
ProxyHttpException
(
string
message
,
Exception
innerException
,
SessionEventArgs
session
)
:
base
(
internal
ProxyHttpException
(
string
message
,
Exception
?
innerException
,
SessionEventArgs
session
)
:
base
(
message
,
innerException
)
message
,
innerException
)
{
{
Session
=
session
;
Session
=
session
;
...
...
src/Titanium.Web.Proxy/Http/HttpWebClient.cs
View file @
e3c1483f
...
@@ -17,7 +17,7 @@ namespace Titanium.Web.Proxy.Http
...
@@ -17,7 +17,7 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
/// </summary>
public
class
HttpWebClient
public
class
HttpWebClient
{
{
internal
HttpWebClient
(
Request
request
)
internal
HttpWebClient
(
Request
?
request
)
{
{
Request
=
request
??
new
Request
();
Request
=
request
??
new
Request
();
Response
=
new
Response
();
Response
=
new
Response
();
...
...
src/Titanium.Web.Proxy/RequestHandler.cs
View file @
e3c1483f
...
@@ -46,12 +46,12 @@ namespace Titanium.Web.Proxy
...
@@ -46,12 +46,12 @@ namespace Titanium.Web.Proxy
private
async
Task
handleHttpSessionRequest
(
ProxyEndPoint
endPoint
,
TcpClientConnection
clientConnection
,
private
async
Task
handleHttpSessionRequest
(
ProxyEndPoint
endPoint
,
TcpClientConnection
clientConnection
,
CustomBufferedStream
clientStream
,
HttpResponseWriter
clientStreamWriter
,
CustomBufferedStream
clientStream
,
HttpResponseWriter
clientStreamWriter
,
CancellationTokenSource
cancellationTokenSource
,
string
httpsConnectHostname
,
TunnelConnectSessionEventArgs
connectArgs
,
CancellationTokenSource
cancellationTokenSource
,
string
httpsConnectHostname
,
TunnelConnectSessionEventArgs
connectArgs
,
Task
<
TcpServerConnection
>
prefetchConnectionTask
=
null
)
Task
<
TcpServerConnection
>
?
prefetchConnectionTask
=
null
)
{
{
var
connectRequest
=
connectArgs
?.
HttpClient
.
ConnectRequest
;
var
connectRequest
=
connectArgs
?.
HttpClient
.
ConnectRequest
;
var
prefetchTask
=
prefetchConnectionTask
;
var
prefetchTask
=
prefetchConnectionTask
;
TcpServerConnection
connection
=
null
;
TcpServerConnection
?
connection
=
null
;
bool
closeServerConnection
=
false
;
bool
closeServerConnection
=
false
;
try
try
...
...
src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj
View file @
e3c1483f
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<AssemblyOriginatorKeyFile>StrongNameKey.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>StrongNameKey.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<DelaySign>False</DelaySign>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<LangVersion>8.0</LangVersion>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
</PropertyGroup>
...
...
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