Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
mongoose
Commits
464113c5
Commit
464113c5
authored
Dec 19, 2019
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync mongoose changes
PUBLISHED_FROM=8b6ebf46728aca40f916dde88e372b4540ed6ea4
parent
c34f6c54
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
6 deletions
+8
-6
cookie_auth.c
examples/cookie_auth/cookie_auth.c
+2
-2
mongoose.c
mongoose.c
+2
-1
mongoose.h
mongoose.h
+1
-1
mg_common.h
src/mg_common.h
+1
-1
mg_http.c
src/mg_http.c
+2
-1
No files found.
examples/cookie_auth/cookie_auth.c
View file @
464113c5
...
...
@@ -58,11 +58,11 @@ static int check_pass(const char *user, const char *pass) {
* or NULL if not found.
*/
static
struct
session
*
get_session
(
struct
http_message
*
hm
)
{
struct
mg_str
*
cookie_header
=
mg_get_http_header
(
hm
,
"cookie"
);
if
(
cookie_header
==
NULL
)
goto
clean
;
char
ssid_buf
[
21
];
char
*
ssid
=
ssid_buf
;
struct
session
*
ret
=
NULL
;
struct
mg_str
*
cookie_header
=
mg_get_http_header
(
hm
,
"cookie"
);
if
(
cookie_header
==
NULL
)
goto
clean
;
if
(
!
mg_http_parse_header2
(
cookie_header
,
SESSION_COOKIE_NAME
,
&
ssid
,
sizeof
(
ssid_buf
)))
{
goto
clean
;
...
...
mongoose.c
View file @
464113c5
...
...
@@ -8526,7 +8526,8 @@ MG_INTERNAL void mg_send_http_file(struct mg_connection *nc, char *path,
#endif
}
else
if
(
mg_is_not_modified
(
hm
,
&
st
))
{
/* Note: not using mg_http_send_error in order to keep connection alive */
mg_send_head
(
nc
,
304
,
0
,
NULL
);
/* Note: passing extra headers allow users to control session cookies */
mg_send_head
(
nc
,
304
,
0
,
opts
->
extra_headers
);
}
else
{
mg_http_serve_file2
(
nc
,
index_file
?
index_file
:
path
,
hm
,
opts
);
}
...
...
mongoose.h
View file @
464113c5
...
...
@@ -23,7 +23,7 @@
#ifndef CS_MONGOOSE_SRC_COMMON_H_
#define CS_MONGOOSE_SRC_COMMON_H_
#define MG_VERSION "6.1
5
"
#define MG_VERSION "6.1
6
"
/* Local tweaks, applied before any of Mongoose's own headers. */
#ifdef MG_LOCALS
...
...
src/mg_common.h
View file @
464113c5
...
...
@@ -20,7 +20,7 @@
#ifndef CS_MONGOOSE_SRC_COMMON_H_
#define CS_MONGOOSE_SRC_COMMON_H_
#define MG_VERSION "6.1
5
"
#define MG_VERSION "6.1
6
"
/* Local tweaks, applied before any of Mongoose's own headers. */
#ifdef MG_LOCALS
...
...
src/mg_http.c
View file @
464113c5
...
...
@@ -2692,7 +2692,8 @@ MG_INTERNAL void mg_send_http_file(struct mg_connection *nc, char *path,
#endif
}
else
if
(
mg_is_not_modified
(
hm
,
&
st
))
{
/* Note: not using mg_http_send_error in order to keep connection alive */
mg_send_head
(
nc
,
304
,
0
,
NULL
);
/* Note: passing extra headers allow users to control session cookies */
mg_send_head
(
nc
,
304
,
0
,
opts
->
extra_headers
);
}
else
{
mg_http_serve_file2
(
nc
,
index_file
?
index_file
:
path
,
hm
,
opts
);
}
...
...
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