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
21f81907
Commit
21f81907
authored
Nov 16, 2019
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fi for #652
parent
a2e8172e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
SessionEventArgs.cs
src/Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
+9
-5
Http2Helper.cs
src/Titanium.Web.Proxy/Http2/Http2Helper.cs
+4
-1
No files found.
src/Titanium.Web.Proxy/EventArguments/SessionEventArgs.cs
View file @
21f81907
...
...
@@ -22,8 +22,6 @@ namespace Titanium.Web.Proxy.EventArguments
/// </summary>
public
class
SessionEventArgs
:
SessionEventArgsBase
{
private
static
readonly
byte
[]
emptyData
=
new
byte
[
0
];
/// <summary>
/// Backing field for corresponding public property
/// </summary>
...
...
@@ -110,7 +108,10 @@ namespace Titanium.Web.Proxy.EventArguments
else
{
var
body
=
await
readBodyAsync
(
true
,
cancellationToken
);
request
.
Body
=
body
;
if
(!
request
.
BodyAvailable
)
{
request
.
Body
=
body
;
}
// Now set the flag to true
// So that next time we can deliver body from cache
...
...
@@ -182,7 +183,10 @@ namespace Titanium.Web.Proxy.EventArguments
else
{
var
body
=
await
readBodyAsync
(
false
,
cancellationToken
);
response
.
Body
=
body
;
if
(!
response
.
BodyAvailable
)
{
response
.
Body
=
body
;
}
// Now set the flag to true
// So that next time we can deliver body from cache
...
...
@@ -595,7 +599,7 @@ namespace Titanium.Web.Proxy.EventArguments
var
response
=
new
RedirectResponse
();
response
.
HttpVersion
=
HttpClient
.
Request
.
HttpVersion
;
response
.
Headers
.
AddHeader
(
KnownHeaders
.
Location
,
url
);
response
.
Body
=
emptyData
;
response
.
Body
=
Array
.
Empty
<
byte
>()
;
Respond
(
response
,
closeServerConnection
);
}
...
...
src/Titanium.Web.Proxy/Http2/Http2Helper.cs
View file @
21f81907
...
...
@@ -389,7 +389,10 @@ namespace Titanium.Web.Proxy.Http2
}
}
rr
.
Body
=
body
;
if
(!
rr
.
BodyAvailable
)
{
rr
.
Body
=
body
;
}
}
rr
.
IsBodyRead
=
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