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
f2b40e5f
Commit
f2b40e5f
authored
Mar 22, 2015
by
Miodrag Milanovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added comment for time_t change
parent
86ad7922
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mongoose.c
mongoose.c
+3
-3
No files found.
mongoose.c
View file @
f2b40e5f
...
...
@@ -3357,7 +3357,7 @@ static void open_file_endpoint(struct connection *conn, const char *path,
// Prepare Etag, Date, Last-Modified headers. Must be in UTC, according to
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3
gmt_time_string
(
date
,
sizeof
(
date
),
&
curtime
);
time_t
t
=
st
->
st_mtime
;
time_t
t
=
st
->
st_mtime
;
// store in local variable for NDK compile
gmt_time_string
(
lm
,
sizeof
(
lm
),
&
t
);
construct_etag
(
etag
,
sizeof
(
etag
),
st
);
...
...
@@ -3578,7 +3578,7 @@ static void print_dir_entry(const struct dir_entry *de) {
mg_snprintf
(
size
,
sizeof
(
size
),
"%.1fG"
,
(
double
)
fsize
/
1073741824
);
}
}
time_t
t
=
de
->
st
.
st_mtime
;
time_t
t
=
de
->
st
.
st_mtime
;
// store in local variable for NDK compile
strftime
(
mod
,
sizeof
(
mod
),
"%d-%b-%Y %H:%M"
,
localtime
(
&
t
));
mg_url_encode
(
de
->
file_name
,
strlen
(
de
->
file_name
),
href
,
sizeof
(
href
));
mg_printf_data
(
&
de
->
conn
->
mg_conn
,
...
...
@@ -3650,7 +3650,7 @@ static void send_directory_listing(struct connection *conn, const char *dir) {
static
void
print_props
(
struct
connection
*
conn
,
const
char
*
uri
,
file_stat_t
*
stp
)
{
char
mtime
[
64
];
time_t
t
=
stp
->
st_mtime
;
time_t
t
=
stp
->
st_mtime
;
// store in local variable for NDK compile
gmt_time_string
(
mtime
,
sizeof
(
mtime
),
&
t
);
mg_printf
(
&
conn
->
mg_conn
,
"<d:response>"
...
...
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