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
ef38da77
Commit
ef38da77
authored
Mar 27, 2018
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to set custom response body on redirect
parent
9c3a4f25
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
RequestResponseBase.cs
Titanium.Web.Proxy/Http/RequestResponseBase.cs
+1
-1
Response.cs
Titanium.Web.Proxy/Http/Response.cs
+15
-0
OkResponse.cs
Titanium.Web.Proxy/Http/Responses/OkResponse.cs
+8
-0
No files found.
Titanium.Web.Proxy/Http/RequestResponseBase.cs
View file @
ef38da77
...
...
@@ -173,7 +173,7 @@ namespace Titanium.Web.Proxy.Http
internal
byte
[]
CompressBodyAndUpdateContentLength
()
{
if
(!
IsBodyRead
)
if
(!
IsBodyRead
&&
BodyInternal
==
null
)
{
return
null
;
}
...
...
Titanium.Web.Proxy/Http/Response.cs
View file @
ef38da77
...
...
@@ -128,6 +128,21 @@ namespace Titanium.Web.Proxy.Http
}
}
/// <summary>
/// Constructor.
/// </summary>
public
Response
()
{
}
/// <summary>
/// Constructor.
/// </summary>
public
Response
(
byte
[]
body
)
{
Body
=
body
;
}
internal
static
string
CreateResponseLine
(
Version
version
,
int
statusCode
,
string
statusDescription
)
{
return
$"HTTP/
{
version
.
Major
}
.
{
version
.
Minor
}
{
statusCode
}
{
statusDescription
}
"
;
...
...
Titanium.Web.Proxy/Http/Responses/OkResponse.cs
View file @
ef38da77
...
...
@@ -15,5 +15,13 @@ namespace Titanium.Web.Proxy.Http.Responses
StatusCode
=
(
int
)
HttpStatusCode
.
OK
;
StatusDescription
=
"OK"
;
}
/// <summary>
/// Constructor.
/// </summary>
public
OkResponse
(
byte
[]
body
)
:
this
()
{
Body
=
body
;
}
}
}
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