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
a9181f8f
Commit
a9181f8f
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
added the option CURLOPT_HTTP_VERSION that can specify which HTTP version
libcurl should use in its request
parent
3685f792
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/http.c
+6
-2
6 additions, 2 deletions
lib/http.c
lib/url.c
+7
-9
7 additions, 9 deletions
lib/url.c
lib/urldata.h
+3
-1
3 additions, 1 deletion
lib/urldata.h
with
16 additions
and
12 deletions
lib/http.c
+
6
−
2
View file @
a9181f8f
...
...
@@ -555,6 +555,10 @@ CURLcode Curl_http(struct connectdata *conn)
}
do
{
/* Use 1.1 unless the use specificly asked for 1.0 */
const
char
*
httpstring
=
data
->
set
.
httpversion
==
CURL_HTTP_VERSION_1_0
?
"1.0"
:
"1.1"
;
send_buffer
*
req_buffer
;
struct
curl_slist
*
headers
=
data
->
set
.
headers
;
...
...
@@ -564,7 +568,7 @@ CURLcode Curl_http(struct connectdata *conn)
/* add the main request stuff */
add_bufferf
(
req_buffer
,
"%s "
/* GET/HEAD/POST/PUT */
"%s HTTP/
1.1
\r\n
"
/* path */
"%s HTTP/
%s
\r\n
"
/* path */
"%s"
/* proxyuserpwd */
"%s"
/* userpwd */
"%s"
/* range */
...
...
@@ -580,7 +584,7 @@ CURLcode Curl_http(struct connectdata *conn)
((
HTTPREQ_POST
==
data
->
set
.
httpreq
)
||
(
HTTPREQ_POST_FORM
==
data
->
set
.
httpreq
))
?
"POST"
:
(
HTTPREQ_PUT
==
data
->
set
.
httpreq
)
?
"PUT"
:
"GET"
),
ppath
,
ppath
,
httpstring
,
(
conn
->
bits
.
proxy_user_passwd
&&
conn
->
allocptr
.
proxyuserpwd
)
?
conn
->
allocptr
.
proxyuserpwd
:
""
,
(
conn
->
bits
.
user_passwd
&&
conn
->
allocptr
.
userpwd
)
?
...
...
This diff is collapsed.
Click to expand it.
lib/url.c
+
7
−
9
View file @
a9181f8f
...
...
@@ -444,6 +444,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
*/
data
->
set
.
http_follow_location
=
va_arg
(
param
,
long
)
?
TRUE
:
FALSE
;
break
;
case
CURLOPT_HTTP_VERSION
:
/*
* This sets a requested HTTP version to be used. The value is one of
* the listed enums in curl/curl.h.
*/
data
->
set
.
httpversion
=
va_arg
(
param
,
long
);
break
;
case
CURLOPT_TRANSFERTEXT
:
/*
* This option was previously named 'FTPASCII'. Renamed to work with
...
...
@@ -461,15 +468,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
if
(
va_arg
(
param
,
long
))
data
->
set
.
httpreq
=
HTTPREQ_PUT
;
break
;
#if 0
/* obsolete stuff, kept here a while for informational purposes */
case CURLOPT_MUTE:
/*
* Stay absolutely quiet.
*/
data->set.mute = va_arg(param, long)?TRUE:FALSE;
break;
#endif
case
CURLOPT_TIMECONDITION
:
/*
* Set HTTP time condition. This must be one of the defines in the
...
...
This diff is collapsed.
Click to expand it.
lib/urldata.h
+
3
−
1
View file @
a9181f8f
...
...
@@ -520,11 +520,13 @@ struct UserDefined {
struct
curl_slist
*
quote
;
/* before the transfer */
struct
curl_slist
*
postquote
;
/* after the transfer */
struct
curl_slist
*
telnet_options
;
/* linked list of telnet options */
TimeCond
timecondition
;
/* kind of time/date comparison */
curl_
TimeCond
timecondition
;
/* kind of time/date comparison */
time_t
timevalue
;
/* what time to compare with */
curl_closepolicy
closepolicy
;
/* connection cache close concept */
Curl_HttpReq
httpreq
;
/* what kind of HTTP request (if any) is this */
char
*
customrequest
;
/* HTTP/FTP request to use */
long
httpversion
;
/* when non-zero, a specific HTTP version requested to
be used in the library's request(s) */
char
*
auth_host
;
/* if set, this is the allocated string to the host name
* to which to send the authorization data to, and no other
* host (which location-following otherwise could lead to)
...
...
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