Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
ac0bad24
Commit
ac0bad24
authored
24 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
remake Host: for each connection and it'll work with proxies too
parent
67d5c0a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/http.c
+8
-4
8 additions, 4 deletions
lib/http.c
with
8 additions
and
4 deletions
lib/http.c
+
8
−
4
View file @
ac0bad24
...
...
@@ -469,10 +469,14 @@ CURLcode Curl_http(struct connectdata *conn)
http
->
sendit
=
Curl_getFormData
(
data
->
httppost
,
&
http
->
postsize
);
}
if
(
!
checkheaders
(
data
,
"Host:"
)
&&
!
conn
->
allocptr
.
host
)
{
/* if ptr_host is already set, it is OK since we only re-use connections
to the very same host and port */
if
(
!
checkheaders
(
data
,
"Host:"
))
{
/* if ptr_host is already set, it is almost OK since we only re-use
connections to the very same host and port, but when we use a HTTP
proxy we have a persistant connect and yet we must change the Host:
header! */
if
(
conn
->
allocptr
.
host
)
free
(
conn
->
allocptr
.
host
);
if
(((
conn
->
protocol
&
PROT_HTTPS
)
&&
(
conn
->
remote_port
==
PORT_HTTPS
))
||
(
!
(
conn
->
protocol
&
PROT_HTTPS
)
&&
(
conn
->
remote_port
==
PORT_HTTP
))
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment