Closed GoogleCodeExporter closed 9 years ago
I would need this as well. Ability s.a.
mg_add_header( conn, "Content-type", mime ); // no such thing
to provide the MIME type of content we're giving out. I'm using Mongoose as an
embedded server (not serving
any files from the disk at all, just programmatically tying to HTTP interface).
Original comment by akau...@gmail.com
on 29 Apr 2010 at 10:19
In embedded mode, what stops you from doing
mg_printf(conn, "Content-Type: %s\r\n", "my-mime-type"); ?
Why do you need mg_add_header? mg_printf() can do it call. You are free to
construct any headers you want.
Original comment by valenok
on 29 Apr 2010 at 10:30
Yes. I came to think of this just a bit after posting the message.
I've been working with frameworks that handled content and headers differently.
That's why it took some time
for me to realize Mongoose does not.
Original comment by akau...@gmail.com
on 2 May 2010 at 4:12
Original comment by valenok
on 7 Sep 2010 at 7:38
Consider the following issue:
for loop unknown length printed
totalLength += mg_printf(conn, "content");
totalLength += mg_printf(conn, "some more content");
end for loop
mg_add_header( conn, "Content-length", totalLength); // no such thing
Original comment by josephjk...@gmail.com
on 26 Jul 2012 at 6:10
Original issue reported on code.google.com by
shidongc...@gmail.com
on 10 Apr 2009 at 7:25