diff --git a/nanohttp.c b/nanohttp.c index f8c5bdb9..d8e40398 100644 --- a/nanohttp.c +++ b/nanohttp.c @@ -1581,7 +1581,7 @@ xmlNanoHTTPFetch(const char *URL, const char *filename, char **contentType) { if (ctxt == NULL) return(-1); if (!strcmp(filename, "-")) - fd = 0; + fd = 1; /* STDOUT_FILENO */ else { fd = open(filename, O_CREAT | O_WRONLY, 00644); if (fd < 0) {