1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

enhanced to bypass compression detection code when input file is stdin

* xmlIO.c: enhanced to bypass compression detection code
  when input file is stdin (bug 125801)
This commit is contained in:
William M. Brack
2003-10-29 22:15:13 +00:00
parent 28232438a0
commit c5cbf99db1
2 changed files with 7 additions and 1 deletions

View File

@ -2145,7 +2145,8 @@ xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
ret->readcallback = xmlInputCallbackTable[i].readcallback;
ret->closecallback = xmlInputCallbackTable[i].closecallback;
#ifdef HAVE_ZLIB_H
if (xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) {
if ((xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) &&
(strcmp(URI, "-") != 0)) {
if (((z_stream *)context)->avail_in > 4) {
char *cptr, buff4[4];
cptr = (char *) ((z_stream *)context)->next_in;