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
dbbda02f
Commit
dbbda02f
authored
Feb 27, 2014
by
Klaus Wagner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue #338
parent
725c3044
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
mongoose.c
mongoose.c
+6
-1
No files found.
mongoose.c
View file @
dbbda02f
...
...
@@ -2262,11 +2262,13 @@ void mg_printf_data(struct mg_connection *c, const char *fmt, ...) {
struct
connection
*
conn
=
MG_CONN_2_CONN
(
c
);
struct
iobuf
*
io
=
&
conn
->
ns_conn
->
send_iobuf
;
va_list
ap
;
int
len
,
n
;
int
len
,
n
,
iolen
;
char
*
p
;
terminate_headers
(
c
);
// Remember original io->len
iolen
=
io
->
len
;
// Write the placeholder for the chunk size
p
=
io
->
buf
+
io
->
len
;
iobuf_append
(
io
,
"
\r\n
"
,
10
);
...
...
@@ -2276,6 +2278,9 @@ void mg_printf_data(struct mg_connection *c, const char *fmt, ...) {
len
=
ns_vprintf
(
conn
->
ns_conn
,
fmt
,
ap
);
va_end
(
ap
);
// Recalculate pointer p because of potential realloc within iobuf_append
p
=
io
->
buf
+
iolen
;
// Record size
n
=
mg_snprintf
(
p
,
7
,
"%X"
,
len
);
p
[
n
]
=
' '
;
...
...
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