Re: [PATCH 3/3] move shared code to get_mimetype_from_file()

2015-08-15 Thread Christian Hesse
John Keeping on Sat, 2015/08/15 12:29: > > + /* loop over all lines in the file */ > > + while (!*mimetype && fgets(line, sizeof(line), > > fd)) { > > + iterate = strtok(line, delimiters); > > + > > + /* skip e

Re: [PATCH 2/3] about: send images plain

2015-08-15 Thread Christian Hesse
"Jason A. Donenfeld" on Sat, 2015/08/15 01:07: > Excellent! This is a very wanted tweak indeed, and it's finally possible > thanks to the rework merged today that moves layout into each function. > Awesome. Yes, really glad we have the layout changes. ;) Just updated my patches after John's revi

[PATCH 2/3] refactor get_mimetype_from_file() to get_mimetype_from_qrypath()

2015-08-15 Thread Christian Hesse
From: Christian Hesse * handle mimetype within a single function + return allocated memory on success Signed-off-by: Christian Hesse --- cgit.h | 2 +- shared.c | 65 +++--- ui-plain.c | 29 +++- 3 files cha

[PATCH 3/3] ui-summary: send images plain for about page

2015-08-15 Thread Christian Hesse
From: Christian Hesse The about page used to display just fine, but images were broken: The binary image data was embedded in html code. Use cgit_print_plain() to send images in plain mode and make them available on about page. Signed-off-by: Christian Hesse --- ui-summary.c | 18 +

Re: [PATCH 2/3] about: send images plain

2015-08-15 Thread John Keeping
On Fri, Aug 14, 2015 at 11:16:36PM +0200, Christian Hesse wrote: > From: Christian Hesse > > The about page used to display just fine, but images were broken: The > binary image data was embedded in html code. > Use cgit_print_plain() to send images in plain mode and make them > available on abou

Re: [PATCH 3/3] move shared code to get_mimetype_from_file()

2015-08-15 Thread John Keeping
On Fri, Aug 14, 2015 at 11:16:37PM +0200, Christian Hesse wrote: > From: Christian Hesse > > Signed-off-by: Christian Hesse > --- > cgit.h | 2 +- > shared.c | 57 + > ui-plain.c | 25 - > ui-summary.c