summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-02-26 10:33:17 +0100
committerGravatar Christian Hesse <mail@eworm.de>2014-02-26 10:33:17 +0100
commitd0e3b7be5a5f79e52a6469c3480b288213580a02 (patch)
tree8a26ba0d629baf50bde2329a06f3d3f24bcfb541
parent87ec997436fe0c1599869b1bccbf3cb75515030b (diff)
downloadcqrlogo-d0e3b7be5a5f79e52a6469c3480b288213580a02.tar.gz
cqrlogo-d0e3b7be5a5f79e52a6469c3480b288213580a02.tar.zst
move output of CGI header down
-rw-r--r--cqrlogo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cqrlogo.c b/cqrlogo.c
index 6153cb7..a822c6d 100644
--- a/cqrlogo.c
+++ b/cqrlogo.c
@@ -94,15 +94,15 @@ int main(int argc, char **argv) {
}
}
- /* print HTTP header */
- printf("Content-Type: image/png\n\n");
-
/* generate PNG data */
if ((png = generate_png(bitmap, CQR_COMMENT|CQR_REFERER|CQR_VERSION|CQR_LIBVERSION, uri)) == NULL) {
fprintf(stderr, "Failed to generate PNG.\n");
return EXIT_FAILURE;
}
+ /* print HTTP header */
+ printf("Content-Type: image/png\n\n");
+
/* write PNG data to stdout */
if (fwrite(png->buffer, png->size, 1, stdout) != 1) {
fprintf(stderr, "Failed writing PNG data to stdout.\n");