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
675b83a3
Commit
675b83a3
authored
Jan 03, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let mongoose binary change CWD to document_root
parent
dfdfcc06
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
main.c
build/main.c
+4
-0
mongoose.c
mongoose.c
+0
-1
No files found.
build/main.c
View file @
675b83a3
...
...
@@ -449,6 +449,10 @@ static void start_mongoose(int argc, char *argv[]) {
free
(
options
[
i
+
1
]);
}
// Change current working directory to document root. This way,
// scripts can use relative paths.
chdir
(
mg_get_option
(
server
,
"document_root"
));
// Add an ability to pass listening socket to mongoose
{
const
char
*
env
=
getenv
(
"MONGOOSE_LISTENING_SOCKET"
);
...
...
mongoose.c
View file @
675b83a3
...
...
@@ -2048,7 +2048,6 @@ static int mg_write_chunked(struct connection *conn, const char *buf, int len) {
return
n
;
}
static
void
print_dir_entry
(
const
struct
dir_entry
*
de
)
{
char
size
[
64
],
mod
[
64
],
href
[
MAX_PATH_SIZE
*
3
],
chunk
[
MAX_PATH_SIZE
*
4
];
int64_t
fsize
=
de
->
st
.
st_size
;
...
...
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