Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
29e68b20
Commit
29e68b20
authored
12 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
curl: add --post303 to set the CURL_REDIR_POST_303 option
parent
0b516b71
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/tool_cfgable.h
+1
-0
1 addition, 0 deletions
src/tool_cfgable.h
src/tool_getparam.c
+4
-0
4 additions, 0 deletions
src/tool_getparam.c
src/tool_help.c
+2
-0
2 additions, 0 deletions
src/tool_help.c
src/tool_operate.c
+6
-3
6 additions, 3 deletions
src/tool_operate.c
with
13 additions
and
3 deletions
src/tool_cfgable.h
+
1
−
0
View file @
29e68b20
...
...
@@ -187,6 +187,7 @@ struct Configurable {
bool
raw
;
bool
post301
;
bool
post302
;
bool
post303
;
bool
nokeepalive
;
/* for keepalive needs */
long
alivetime
;
bool
content_disposition
;
/* use Content-disposition filename */
...
...
This diff is collapsed.
Click to expand it.
src/tool_getparam.c
+
4
−
0
View file @
29e68b20
...
...
@@ -171,6 +171,7 @@ static const struct LongShort aliases[]= {
{
"$F"
,
"resolve"
,
TRUE
},
{
"$G"
,
"delegation"
,
TRUE
},
{
"$H"
,
"mail-auth"
,
TRUE
},
{
"$I"
,
"post303"
,
FALSE
},
{
"0"
,
"http1.0"
,
FALSE
},
{
"1"
,
"tlsv1"
,
FALSE
},
{
"2"
,
"sslv2"
,
FALSE
},
...
...
@@ -764,6 +765,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
case
'4'
:
/* --post302 */
config
->
post302
=
toggle
;
break
;
case
'I'
:
/* --post303 */
config
->
post303
=
toggle
;
break
;
case
'5'
:
/* --noproxy */
/* This specifies the noproxy list */
GetStr
(
&
config
->
noproxy
,
nextarg
);
...
...
This diff is collapsed.
Click to expand it.
src/tool_help.c
+
2
−
0
View file @
29e68b20
...
...
@@ -140,6 +140,8 @@ static const char *const helptext[] = {
"Do not switch to GET after following a 301 redirect (H)"
,
" --post302 "
"Do not switch to GET after following a 302 redirect (H)"
,
" --post303 "
"Do not switch to GET after following a 303 redirect (H)"
,
" -#, --progress-bar Display transfer progress as a progress bar"
,
" --proto PROTOCOLS Enable/disable specified protocols"
,
" --proto-redir PROTOCOLS "
...
...
This diff is collapsed.
Click to expand it.
src/tool_operate.c
+
6
−
3
View file @
29e68b20
...
...
@@ -916,9 +916,12 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
if
(
config
->
authtype
)
my_setopt_flags
(
curl
,
CURLOPT_HTTPAUTH
,
config
->
authtype
);
/* curl 7.19.1 (the 301 version existed in 7.18.2) */
my_setopt
(
curl
,
CURLOPT_POSTREDIR
,
config
->
post301
|
(
config
->
post302
?
CURL_REDIR_POST_302
:
FALSE
));
/* curl 7.19.1 (the 301 version existed in 7.18.2),
303 was added in 7.26.0 */
my_setopt
(
curl
,
CURLOPT_POSTREDIR
,
(
config
->
post301
?
CURL_REDIR_POST_301
:
0
)
|
(
config
->
post302
?
CURL_REDIR_POST_302
:
0
)
|
(
config
->
post303
?
CURL_REDIR_POST_303
:
0
));
/* new in libcurl 7.21.6 */
if
(
config
->
encoding
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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