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
e1653322
Commit
e1653322
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
minor fix to support multiple files in one formadd() call
parent
d25310cb
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/formdata.c
+10
-9
10 additions, 9 deletions
lib/formdata.c
with
10 additions
and
9 deletions
lib/formdata.c
+
10
−
9
View file @
e1653322
...
...
@@ -411,7 +411,7 @@ static struct HttpPost * AddHttpPost (char * name,
if
(
post
)
{
memset
(
post
,
0
,
sizeof
(
struct
HttpPost
));
post
->
name
=
name
;
post
->
namelength
=
namelength
?
namelength
:
(
long
)
strlen
(
name
);
post
->
namelength
=
name
?
(
namelength
?
namelength
:
(
long
)
strlen
(
name
)
)
:
0
;
post
->
contents
=
value
;
post
->
contentslength
=
contentslength
;
post
->
contenttype
=
contenttype
;
...
...
@@ -832,10 +832,12 @@ FORMcode FormAdd(struct HttpPost **httppost,
if
(
FORMADD_OK
==
return_value
)
{
/* go through the list, check for copleteness and if everything is
* alright add the HttpPost item otherwise set return_value accordingly */
form
=
first_form
;
while
(
form
!=
NULL
)
{
if
(
(
!
form
->
name
)
||
(
!
form
->
value
)
||
post
=
NULL
;
for
(
form
=
first_form
;
form
!=
NULL
;
form
=
form
->
more
)
{
if
(
((
!
form
->
name
||
!
form
->
value
)
&&
!
post
)
||
(
(
form
->
contentslength
)
&&
(
form
->
flags
&
HTTPPOST_FILENAME
)
)
||
(
(
form
->
flags
&
HTTPPOST_FILENAME
)
&&
...
...
@@ -880,7 +882,6 @@ FORMcode FormAdd(struct HttpPost **httppost,
if
(
form
->
contenttype
)
prevtype
=
form
->
contenttype
;
}
form
=
form
->
more
;
}
}
...
...
@@ -1391,12 +1392,12 @@ int main()
if
(
-
1
==
nread
)
break
;
fwrite
(
buffer
,
nread
,
1
,
std
err
);
fwrite
(
buffer
,
nread
,
1
,
std
out
);
}
while
(
1
);
fprintf
(
std
err
,
"size: %d
\n
"
,
size
);
fprintf
(
std
out
,
"size: %d
\n
"
,
size
);
if
(
errors
)
fprintf
(
std
err
,
"
\n
==> %d Test(s) failed!
\n
"
,
errors
);
fprintf
(
std
out
,
"
\n
==> %d Test(s) failed!
\n
"
,
errors
);
else
fprintf
(
stdout
,
"
\n
All Tests seem to have worked (please check output)
\n
"
);
...
...
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