What steps will reproduce the problem?
1. The line that says: send_http_error(conn, 304, "Not Modified", "%s", "");
What is the expected output?
An empty response without errors in the debug output.
What do you see instead?
a cry about vsnprintf() error in the debug output.
What version of the product are you using? On what operating system?
Mongoose 3.1
On Windows 7 64 bit
Please provide any additional information below.
vsnprintf is called with a format string of "%s" and an empty string "".
This causes vsnprintf to return 0, as it has 0 bytes written.
A return value of 0 is not an error of vsnprintf.
In case of an error vsnprintf returns -1.
Therefore the line that checks the return value is incorrect.
This can be fixed in the function mg_printf:
Line 1494: if (len <= 0) {
should be: if (len < 0) {
Original issue reported on code.google.com by jeroen.w...@gmail.com on 19 Sep 2012 at 8:25
Original issue reported on code.google.com by
jeroen.w...@gmail.com
on 19 Sep 2012 at 8:25