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
a00b6e25
Commit
a00b6e25
authored
16 years ago
by
Dan Fandrich
Browse files
Options
Downloads
Patches
Plain Diff
Return an error when a proxy option is set when configured with
--disable-proxy mode. Removed some unnecessary prototypes.
parent
7ded272b
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/url.c
+45
-53
45 additions, 53 deletions
lib/url.c
with
45 additions
and
53 deletions
lib/url.c
+
45
−
53
View file @
a00b6e25
...
...
@@ -140,24 +140,9 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
/* Local static prototypes */
static
long
ConnectionKillOne
(
struct
SessionHandle
*
data
);
static
bool
ConnectionExists
(
struct
SessionHandle
*
data
,
struct
connectdata
*
needle
,
struct
connectdata
**
usethis
);
static
long
ConnectionStore
(
struct
SessionHandle
*
data
,
struct
connectdata
*
conn
);
static
bool
IsPipeliningPossible
(
const
struct
SessionHandle
*
handle
);
static
void
conn_free
(
struct
connectdata
*
conn
);
static
void
signalPipeClose
(
struct
curl_llist
*
pipeline
);
static
struct
SessionHandle
*
gethandleathead
(
struct
curl_llist
*
pipeline
);
static
CURLcode
do_init
(
struct
connectdata
*
conn
);
static
void
do_complete
(
struct
connectdata
*
conn
);
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
static
void
flush_cookies
(
struct
SessionHandle
*
data
,
int
cleanup
);
#endif
#ifdef CURL_DISABLE_VERBOSE_STRINGS
#define verboseconnect(x) do { } while (0)
#endif
...
...
@@ -1309,13 +1294,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data
->
set
.
httpversion
=
va_arg
(
param
,
long
);
break
;
case
CURLOPT_HTTPPROXYTUNNEL
:
/*
* Tunnel operations through the proxy instead of normal proxy use
*/
data
->
set
.
tunnel_thru_httpproxy
=
(
bool
)(
0
!=
va_arg
(
param
,
long
));
break
;
case
CURLOPT_CUSTOMREQUEST
:
/*
* Set a custom string to use as request
...
...
@@ -1329,13 +1307,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
and this just changes the actual request keyword */
break
;
case
CURLOPT_PROXYPORT
:
/*
* Explicitly set HTTP proxy port number.
*/
data
->
set
.
proxyport
=
va_arg
(
param
,
long
);
break
;
case
CURLOPT_HTTPAUTH
:
/*
* Set HTTP Authentication type BITMASK.
...
...
@@ -1356,6 +1327,21 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
}
break
;
#ifndef CURL_DISABLE_PROXY
case
CURLOPT_HTTPPROXYTUNNEL
:
/*
* Tunnel operations through the proxy instead of normal proxy use
*/
data
->
set
.
tunnel_thru_httpproxy
=
(
bool
)(
0
!=
va_arg
(
param
,
long
));
break
;
case
CURLOPT_PROXYPORT
:
/*
* Explicitly set HTTP proxy port number.
*/
data
->
set
.
proxyport
=
va_arg
(
param
,
long
);
break
;
case
CURLOPT_PROXYAUTH
:
/*
* Set HTTP Authentication type BITMASK.
...
...
@@ -1391,6 +1377,32 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
va_arg
(
param
,
char
*
));
break
;
case
CURLOPT_PROXYTYPE
:
/*
* Set proxy type. HTTP/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME
*/
data
->
set
.
proxytype
=
(
curl_proxytype
)
va_arg
(
param
,
long
);
break
;
case
CURLOPT_PROXY_TRANSFER_MODE
:
/*
* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy
*/
switch
(
va_arg
(
param
,
long
))
{
case
0
:
data
->
set
.
proxy_transfer_mode
=
FALSE
;
break
;
case
1
:
data
->
set
.
proxy_transfer_mode
=
TRUE
;
break
;
default:
/* reserve other values for future use */
result
=
CURLE_FAILED_INIT
;
break
;
}
break
;
#endif
case
CURLOPT_WRITEHEADER
:
/*
* Custom pointer to pass the header write callback function
...
...
@@ -1589,6 +1601,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data
->
set
.
progress_client
=
va_arg
(
param
,
void
*
);
break
;
#ifndef CURL_DISABLE_PROXY
case
CURLOPT_PROXYUSERPWD
:
/*
* user:password needed to use the proxy
...
...
@@ -1611,6 +1625,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
result
=
setstropt
(
&
data
->
set
.
str
[
STRING_PROXYPASSWORD
],
va_arg
(
param
,
char
*
));
break
;
#endif
case
CURLOPT_RANGE
:
/*
* What range of the file you want to transfer
...
...
@@ -1955,13 +1971,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
}
break
;
case
CURLOPT_PROXYTYPE
:
/*
* Set proxy type. HTTP/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME
*/
data
->
set
.
proxytype
=
(
curl_proxytype
)
va_arg
(
param
,
long
);
break
;
case
CURLOPT_PRIVATE
:
/*
* Set private data pointer.
...
...
@@ -2117,23 +2126,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/
data
->
set
.
new_directory_perms
=
va_arg
(
param
,
long
);
break
;
case
CURLOPT_PROXY_TRANSFER_MODE
:
/*
* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy
*/
switch
(
va_arg
(
param
,
long
))
{
case
0
:
data
->
set
.
proxy_transfer_mode
=
FALSE
;
break
;
case
1
:
data
->
set
.
proxy_transfer_mode
=
TRUE
;
break
;
default:
/* reserve other values for future use */
result
=
CURLE_FAILED_INIT
;
break
;
}
break
;
case
CURLOPT_ADDRESS_SCOPE
:
/*
...
...
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