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
283f5903
Commit
283f5903
authored
Feb 27, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #106 from BusyJay/feature-2
Fix bugs about range request and explorer crashes
parents
27735f29
690eff4f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
main.c
main.c
+5
-0
mongoose.c
mongoose.c
+1
-1
No files found.
main.c
View file @
283f5903
...
...
@@ -697,6 +697,7 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam,
char
buf
[
200
],
*
service_argv
[]
=
{
__argv
[
0
],
NULL
};
POINT
pt
;
HMENU
hMenu
;
static
UINT
s_uTaskbarRestart
;
// for taskbar creation
switch
(
msg
)
{
case
WM_CREATE
:
...
...
@@ -707,6 +708,7 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam,
exit
(
EXIT_SUCCESS
);
}
else
{
start_mongoose
(
__argc
,
__argv
);
s_uTaskbarRestart
=
RegisterWindowMessage
(
TEXT
(
"TaskbarCreated"
));
}
break
;
case
WM_COMMAND
:
...
...
@@ -764,6 +766,9 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam,
Shell_NotifyIcon
(
NIM_DELETE
,
&
TrayIcon
);
PostQuitMessage
(
0
);
return
0
;
// We've just sent our own quit message, with proper hwnd.
default:
if
(
msg
==
s_uTaskbarRestart
)
Shell_NotifyIcon
(
NIM_ADD
,
&
TrayIcon
);
}
return
DefWindowProc
(
hWnd
,
msg
,
wParam
,
lParam
);
...
...
mongoose.c
View file @
283f5903
...
...
@@ -2786,7 +2786,7 @@ static void handle_file_request(struct mg_connection *conn, const char *path,
r1
=
r2
=
0
;
hdr
=
mg_get_header
(
conn
,
"Range"
);
if
(
hdr
!=
NULL
&&
(
n
=
parse_range_header
(
hdr
,
&
r1
,
&
r2
))
>
0
&&
r1
>=
0
&&
r2
>
0
)
{
r1
>=
0
&&
r2
>
=
0
)
{
conn
->
status_code
=
206
;
cl
=
n
==
2
?
(
r2
>
cl
?
cl
:
r2
)
-
r1
+
1
:
cl
-
r1
;
mg_snprintf
(
conn
,
range
,
sizeof
(
range
),
...
...
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