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
ec1f42a1
Commit
ec1f42a1
authored
24 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
Treat 302-redirects the same way we treat 303-redirects
parent
aa1c3bb4
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/transfer.c
+18
-1
18 additions, 1 deletion
lib/transfer.c
with
18 additions
and
1 deletion
lib/transfer.c
+
18
−
1
View file @
ec1f42a1
...
...
@@ -874,7 +874,6 @@ CURLcode Curl_perform(CURL *curl)
switch
(
data
->
progress
.
httpcode
)
{
case
300
:
/* Multiple Choices */
case
301
:
/* Moved Permanently */
case
302
:
/* Found */
case
306
:
/* Not used */
case
307
:
/* Temporary Redirect */
default:
/* for all unknown ones */
...
...
@@ -882,6 +881,24 @@ CURLcode Curl_perform(CURL *curl)
* seem to be OK to POST to.
*/
break
;
case
302
:
/* Found */
/* (From 10.3.3)
Note: RFC 1945 and RFC 2068 specify that the client is not allowed
to change the method on the redirected request. However, most
existing user agent implementations treat 302 as if it were a 303
response, performing a GET on the Location field-value regardless
of the original request method. The status codes 303 and 307 have
been added for servers that wish to make unambiguously clear which
kind of reaction is expected of the client.
(From 10.3.4)
Note: Many pre-HTTP/1.1 user agents do not understand the 303
status. When interoperability with such clients is a concern, the
302 status code may be used instead, since most user agents react
to a 302 response as described here for 303.
*/
case
303
:
/* See Other */
/* Disable both types of POSTs, since doing a second POST when
* following isn't what anyone would want! */
...
...
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