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
0bd4ec92
Unverified
Commit
0bd4ec92
authored
Dec 10, 2019
by
honfika
Committed by
GitHub
Dec 10, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #699 from justcoding121/master
No body for head request (#695)
parents
b3bbac37
9c2bc8bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
HttpWebClient.cs
src/Titanium.Web.Proxy/Http/HttpWebClient.cs
+2
-0
Response.cs
src/Titanium.Web.Proxy/Http/Response.cs
+7
-0
No files found.
src/Titanium.Web.Proxy/Http/HttpWebClient.cs
View file @
0bd4ec92
...
@@ -166,6 +166,8 @@ namespace Titanium.Web.Proxy.Http
...
@@ -166,6 +166,8 @@ namespace Titanium.Web.Proxy.Http
return
;
return
;
}
}
Response
.
RequestMethod
=
Request
.
Method
;
var
httpStatus
=
await
Connection
.
Stream
.
ReadResponseStatus
(
cancellationToken
);
var
httpStatus
=
await
Connection
.
Stream
.
ReadResponseStatus
(
cancellationToken
);
Response
.
HttpVersion
=
httpStatus
.
Version
;
Response
.
HttpVersion
=
httpStatus
.
Version
;
Response
.
StatusCode
=
httpStatus
.
StatusCode
;
Response
.
StatusCode
=
httpStatus
.
StatusCode
;
...
...
src/Titanium.Web.Proxy/Http/Response.cs
View file @
0bd4ec92
...
@@ -36,6 +36,8 @@ namespace Titanium.Web.Proxy.Http
...
@@ -36,6 +36,8 @@ namespace Titanium.Web.Proxy.Http
/// </summary>
/// </summary>
public
string
StatusDescription
{
get
;
set
;
}
=
string
.
Empty
;
public
string
StatusDescription
{
get
;
set
;
}
=
string
.
Empty
;
internal
string
RequestMethod
{
get
;
set
;
}
/// <summary>
/// <summary>
/// Has response body?
/// Has response body?
/// </summary>
/// </summary>
...
@@ -43,6 +45,11 @@ namespace Titanium.Web.Proxy.Http
...
@@ -43,6 +45,11 @@ namespace Titanium.Web.Proxy.Http
{
{
get
get
{
{
if
(
RequestMethod
==
"HEAD"
)
{
return
false
;
}
long
contentLength
=
ContentLength
;
long
contentLength
=
ContentLength
;
// If content length is set to 0 the response has no body
// If content length is set to 0 the response has no 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