)]}'
{
  "commit": "882d03f70e089bfad2fe2e84f4f9cd69e805e332",
  "tree": "ef97df9c1d85fc64078a4494ea9a571e43d23459",
  "parents": [
    "d8c3e98d73a4fb7409580a7d9f3395ac506f7e5d"
  ],
  "author": {
    "name": "Shawn O. Pearce",
    "email": "spearce@spearce.org",
    "time": "Thu Feb 11 18:02:22 2010 -0800"
  },
  "committer": {
    "name": "Shawn O. Pearce",
    "email": "spearce@spearce.org",
    "time": "Fri Mar 12 16:08:14 2010 -0800"
  },
  "message": "Fix smart HTTP client buffer alignment\n\nThis proved to be a pretty difficult to find bug.  If we read exactly\nthe number of response bytes from the UnionInputStream and didn\u0027t\ntry to read beyond that length, the last connection\u0027s InputStream is\nstill inside of the UnionInputStream, and UnionInputStream.isEmpty()\nreturns false.  But there is no data present, so the next read\nrequest to our UnionInputStream returns EOF at a point where the\nHTTP client code should have started a new request in order to get\nmore data.\n\nInstead of wrapping the UnionInputStream, push an dummy stream onto\nthe end of it which when invoked always starts the next request and\nthen returns EOF.  The UnionInputStream will automatically pop that\ndummy stream out, and then read the next request\u0027s stream.\n\nThis way we never get into the state where we don\u0027t think we need\nto run another request in order to satisfy the current read request,\nbut we really do.\n\nThe bug was hidden for so long because BasePackConnection.init()\nwas always wrapping the InputStream into a BufferedInputStream\nwith an 8 KiB buffer.  This made the odds of us reading from the\nUnionInputStream the exact number of available bytes quite low, as\nthe BufferedInputStream would always try to read a full buffer size.\n\nChange-Id: I02b5ec3ef6853688687d91de000a5fbe2354915d\nSigned-off-by: Shawn O. Pearce \u003cspearce@spearce.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8de16c13d03f6b6eb68fe59e5c0d74d804b6e4fc",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java",
      "new_id": "f49828bf2d57301ae9201ce8991e32988b2c2ee9",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java"
    }
  ]
}
