chiark / gitweb /
document new choose screen properly
[disorder] / lib / t-cgi.c
index a3b9f37c8cf4862b1dc87120d808cd650b9c1c98..de44fcbd17188608dbc1e3ec1e0c0ffa0e2a923b 100644 (file)
@@ -24,7 +24,10 @@ static void input_from(const char *s) {
   FILE *fp = tmpfile();
   char buffer[64];
 
-  if(fputs(s, fp) < 0 || fflush(fp) < 0)
+  if(fputs(s, fp) < 0
+     || fputs("wibble wibble\r\nspong", fp) < 0 /* ensure CONTENT_LENGTH
+                                                 * honored */
+     || fflush(fp) < 0)
     fatal(errno, "writing to temporary file");
   rewind(fp);
   xdup2(fileno(fp), 0);