]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/request.c
Always use chunking unless it is a simple request.
[thirdparty/cups.git] / cups / request.c
index f526bf016004140fac9b6555bdcc2027ba9e209c..322ca660eae4e1b98a395dfd95335ed64ea2fdb7 100644 (file)
@@ -144,45 +144,7 @@ cupsDoIORequest(http_t     *http,  /* I - Connection to server or @code CUPS_HTTP
   */
 
   if (infile >= 0)
-  {
-    if (fstat(infile, &fileinfo))
-    {
-     /*
-      * Can't get file information!
-      */
-
-      _cupsSetError(errno == EBADF ? IPP_STATUS_ERROR_NOT_FOUND : IPP_STATUS_ERROR_NOT_AUTHORIZED,
-                    NULL, 0);
-
-      ippDelete(request);
-
-      return (NULL);
-    }
-
-#ifdef WIN32
-    if (fileinfo.st_mode & _S_IFDIR)
-#else
-    if (S_ISDIR(fileinfo.st_mode))
-#endif /* WIN32 */
-    {
-     /*
-      * Can't send a directory...
-      */
-
-      ippDelete(request);
-
-      _cupsSetError(IPP_STATUS_ERROR_NOT_POSSIBLE, strerror(EISDIR), 0);
-
-      return (NULL);
-    }
-
-#ifndef WIN32
-    if (!S_ISREG(fileinfo.st_mode))
-      length = 0;                      /* Chunk when piping */
-    else
-#endif /* !WIN32 */
-    length = ippLength(request) + (size_t)fileinfo.st_size;
-  }
+    length = 0;
   else
     length = ippLength(request);