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
32fb8174
Commit
32fb8174
authored
May 20, 2016
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set content-length correctly
parent
34a68075
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
3 deletions
+8
-3
Request.cs
Titanium.Web.Proxy/Http/Request.cs
+2
-0
Response.cs
Titanium.Web.Proxy/Http/Response.cs
+2
-0
RequestHandler.cs
Titanium.Web.Proxy/RequestHandler.cs
+1
-1
ResponseHandler.cs
Titanium.Web.Proxy/ResponseHandler.cs
+3
-2
No files found.
Titanium.Web.Proxy/Http/Request.cs
View file @
32fb8174
...
...
@@ -74,6 +74,8 @@ namespace Titanium.Web.Proxy.Http
header
.
Value
=
value
.
ToString
();
else
RequestHeaders
.
Add
(
new
HttpHeader
(
"content-length"
,
value
.
ToString
()));
IsChunked
=
false
;
}
else
{
...
...
Titanium.Web.Proxy/Http/Response.cs
View file @
32fb8174
...
...
@@ -91,6 +91,8 @@ namespace Titanium.Web.Proxy.Http
header
.
Value
=
value
.
ToString
();
else
ResponseHeaders
.
Add
(
new
HttpHeader
(
"content-length"
,
value
.
ToString
()));
IsChunked
=
false
;
}
else
{
...
...
Titanium.Web.Proxy/RequestHandler.cs
View file @
32fb8174
...
...
@@ -303,7 +303,7 @@ namespace Titanium.Web.Proxy
{
args
.
WebSession
.
Request
.
RequestBody
=
await
GetCompressedResponseBody
(
args
.
WebSession
.
Request
.
ContentEncoding
,
args
.
WebSession
.
Request
.
RequestBody
);
}
//chunked send is not supported as of now
args
.
WebSession
.
Request
.
ContentLength
=
args
.
WebSession
.
Request
.
RequestBody
.
Length
;
var
newStream
=
args
.
WebSession
.
ServerConnection
.
Stream
;
...
...
Titanium.Web.Proxy/ResponseHandler.cs
View file @
32fb8174
...
...
@@ -66,9 +66,10 @@ namespace Titanium.Web.Proxy
if
(
contentEncoding
!=
null
)
{
args
.
WebSession
.
Response
.
ResponseBody
=
await
GetCompressedResponseBody
(
contentEncoding
,
args
.
WebSession
.
Response
.
ResponseBody
).
ConfigureAwait
(
false
);
}
args
.
WebSession
.
Response
.
ContentLength
=
args
.
WebSession
.
Response
.
ResponseBody
.
Length
;
if
(
isChunked
==
false
)
args
.
WebSession
.
Response
.
ContentLength
=
args
.
WebSession
.
Response
.
ResponseBody
.
Length
;
}
await
WriteResponseHeaders
(
args
.
Client
.
ClientStreamWriter
,
args
.
WebSession
.
Response
.
ResponseHeaders
).
ConfigureAwait
(
false
);
await
WriteResponseBody
(
args
.
Client
.
ClientStream
,
args
.
WebSession
.
Response
.
ResponseBody
,
isChunked
).
ConfigureAwait
(
false
);
...
...
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