warn in case of implicit discarding of input stream
chansen [Sat, 2 Oct 2010 13:28:51 +0000 (15:28 +0200)]
perl/FCGI.XL

index 1867ca3..4b07c72 100644 (file)
@@ -195,8 +195,12 @@ FCGI_Finish(FCGP_Request* request) {
 
     if (was_bound = request->bound)
         FCGI_UndoBinding(request);
-    if (was_bound)
+    if (was_bound) {
+        FCGX_Stream *stream = request->requestPtr->in;
+        if (stream && FCGX_GetChar(stream) != EOF)
+            warn("implicit discarding of input stream");
         FCGX_Finish_r(request->requestPtr);
+    }
     else
         FCGX_Free(request->requestPtr, 1);
     request->accepted = FALSE;