{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "fixed in changeset 79368.  This fix will first be available in v1.9.1.6.",
    "ClosedDate": "2011-06-17T21:40:44.567-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "// class ZipInputStream\n        public ZipEntry GetNextEntry()\n        {\n            if (_findRequired)\n            {\n...\n            }\n \n            _inputStream.Seek(_endOfEntry, SeekOrigin.Begin); // fix code here\n \n            _currentEntry = ZipEntry.ReadEntry(_container, !_firstEntry);\n            _endOfEntry = _inputStream.Position;\n            _firstEntry = true;\n            _needSetup = true;\n            _findRequired= false;\n            return _currentEntry;\n        }",
    "LastUpdatedDate": "2013-05-16T05:31:48.267-07:00",
    "PlannedForRelease": "v1.9.1.8 DotNetZip - Latest Stable",
    "ReleaseVisibleToPublic": true,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2010-05-24T08:22:48.157-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Using ZipInputStream with ZipEntry.OpenReader() gives a \"Bad Signature\" error",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 2,
    "Id": 10923
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "what do you mean \"Fix the \"bad signature\" problem\" .  Do you have code that reproduces a problem?  IS the code above a suggested fix? \r\n",
      "PostedDate": "2010-05-26T06:47:58.51-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Poor English, sorry.\r\nWhile using ZipInputStream with HttpPostedFileBase.InputStream, you will get \"Bad Signature\" Exception when calling GetNextEntry 2nd time. See code below.\r\n        Stream stm = Request.Files[\"uploadfile\"].InputStream;\r\n\r\n        using (var zip = new ZipInputStream(stm, true))\r\n        {\r\n          ZipEntry entity;\r\n          while ((entity = zip.GetNextEntry()) != null)\r\n          {\r\n            using (Stream file = entity.OpenReader())\r\n            {\r\n              processStream(file);\r\n            } // using (Stream file = entity.OpenReader())\r\n          } // while ((entity = zip.GetNextEntry()) != null)\r\n        } // using (var zip = new ZipInputStream(stm, true))\r\n\r\n\r\n\r\nAnd the code I've posted before is a suggested fix.",
      "PostedDate": "2010-05-31T02:51:01.383-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Think, Nanalich means the line \"_inputStream.Seek(_endOfEntry, SeekOrigin.Begin); // fix code here\" IS THE FIX.",
      "PostedDate": "2010-06-17T08:50:25.073-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2010-06-17T08:51:42.617-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-06-17T21:33:33.693-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Ok, I've looked at this further and decided that the error is poor.  However, I do think there should be an exception thrown by DotNetZip.  You should not use OpenReader() to read a zip entry from a ZipInputStream.  The ZipInputStream() programming model does not require it, and is actually simpler without OpenReader().  Check the doc for full details.  \r\n\r\nI will change DotNetZip to throw a more descriptive, appropriate exception in the future. \r\n",
      "PostedDate": "2011-06-17T21:37:44.13-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-06-17T21:40:44.567-07:00",
      "Id": -2147483648
    },
    {
      "Message": "The ZipInputStream uses ZipEntry, and ZipEntry has OpenReader.\r\nNow you tell us we should use ZipInputStream.Read instead of the OpenReader way... \r\nSure this why is much simpler, but this model is so weird.",
      "PostedDate": "2011-07-18T05:32:47.02-07:00",
      "Id": -2147483648
    },
    {
      "Message": "I mean, this \"way\"...",
      "PostedDate": "2011-07-18T05:33:17.537-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:31.613-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:31:48.267-07:00",
      "Id": -2147483648
    }
  ]
}