Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
f4f73a8d
Commit
f4f73a8d
authored
Nov 23, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Init vars in handle_cgi_request()
parent
74711c68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
cgi.c
build/src/cgi.c
+2
-1
mongoose.c
mongoose.c
+2
-1
No files found.
build/src/cgi.c
View file @
f4f73a8d
...
@@ -235,7 +235,7 @@ static void prepare_cgi_environment(struct mg_connection *conn,
...
@@ -235,7 +235,7 @@ static void prepare_cgi_environment(struct mg_connection *conn,
}
}
static
void
handle_cgi_request
(
struct
mg_connection
*
conn
,
const
char
*
prog
)
{
static
void
handle_cgi_request
(
struct
mg_connection
*
conn
,
const
char
*
prog
)
{
int
headers_len
,
data_len
,
i
,
fdin
[
2
]
,
fdout
[
2
]
;
int
headers_len
,
data_len
,
i
,
fdin
[
2
]
=
{
-
1
,
-
1
},
fdout
[
2
]
=
{
-
1
,
-
1
}
;
const
char
*
status
,
*
status_text
;
const
char
*
status
,
*
status_text
;
char
buf
[
16384
],
*
pbuf
,
dir
[
PATH_MAX
],
*
p
;
char
buf
[
16384
],
*
pbuf
,
dir
[
PATH_MAX
],
*
p
;
struct
mg_request_info
ri
;
struct
mg_request_info
ri
;
...
@@ -243,6 +243,7 @@ static void handle_cgi_request(struct mg_connection *conn, const char *prog) {
...
@@ -243,6 +243,7 @@ static void handle_cgi_request(struct mg_connection *conn, const char *prog) {
FILE
*
in
=
NULL
,
*
out
=
NULL
;
FILE
*
in
=
NULL
,
*
out
=
NULL
;
pid_t
pid
=
(
pid_t
)
-
1
;
pid_t
pid
=
(
pid_t
)
-
1
;
memset
(
&
ri
,
0
,
sizeof
(
ri
));
prepare_cgi_environment
(
conn
,
prog
,
&
blk
);
prepare_cgi_environment
(
conn
,
prog
,
&
blk
);
// CGI must be executed in its own directory. 'dir' must point to the
// CGI must be executed in its own directory. 'dir' must point to the
...
...
mongoose.c
View file @
f4f73a8d
...
@@ -3253,7 +3253,7 @@ static void prepare_cgi_environment(struct mg_connection *conn,
...
@@ -3253,7 +3253,7 @@ static void prepare_cgi_environment(struct mg_connection *conn,
}
}
static
void
handle_cgi_request
(
struct
mg_connection
*
conn
,
const
char
*
prog
)
{
static
void
handle_cgi_request
(
struct
mg_connection
*
conn
,
const
char
*
prog
)
{
int
headers_len
,
data_len
,
i
,
fdin
[
2
]
,
fdout
[
2
]
;
int
headers_len
,
data_len
,
i
,
fdin
[
2
]
=
{
-
1
,
-
1
},
fdout
[
2
]
=
{
-
1
,
-
1
}
;
const
char
*
status
,
*
status_text
;
const
char
*
status
,
*
status_text
;
char
buf
[
16384
],
*
pbuf
,
dir
[
PATH_MAX
],
*
p
;
char
buf
[
16384
],
*
pbuf
,
dir
[
PATH_MAX
],
*
p
;
struct
mg_request_info
ri
;
struct
mg_request_info
ri
;
...
@@ -3261,6 +3261,7 @@ static void handle_cgi_request(struct mg_connection *conn, const char *prog) {
...
@@ -3261,6 +3261,7 @@ static void handle_cgi_request(struct mg_connection *conn, const char *prog) {
FILE
*
in
=
NULL
,
*
out
=
NULL
;
FILE
*
in
=
NULL
,
*
out
=
NULL
;
pid_t
pid
=
(
pid_t
)
-
1
;
pid_t
pid
=
(
pid_t
)
-
1
;
memset
(
&
ri
,
0
,
sizeof
(
ri
));
prepare_cgi_environment
(
conn
,
prog
,
&
blk
);
prepare_cgi_environment
(
conn
,
prog
,
&
blk
);
// CGI must be executed in its own directory. 'dir' must point to the
// CGI must be executed in its own directory. 'dir' must point to the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment