A patch to specify Content-type
Brought to you by:
rafaelsteil
I wanted to use your library to decide between which image to pipe through my CGI program. But your cgi_init_headers() function only outputs the Content-type text/html, so I can't 'output' an image. So I modified it a little bit, adding a few lines here and there. I've attached the patch if you are interested in opening up that little extra feature.
Patch to allow content type argument
Logged In: YES
user_id=197178
Originator: NO
By the looks of your patch, this uses function overloading which breaks C support. A better solution (I might supply a patch) is to track headers as an slist, then output them in one go, just before output. This allows a default content-type to be set, and then overridden on demand. It also allows for other improvements.