)]}'
{"swift/common/middleware/catch_errors.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"34781423d05d4fa5534913c9074b687c405e85ac","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from swift.common.wsgi import WSGIContext"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class BadResponseLength(Exception):"},{"line_number":24,"context_line":"    pass"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_9fb7d2d8","line":23,"updated":"2018-06-26 23:21:51.000000000","message":"I vaguely wonder if this should inherit from ChunkRead/WriteError or something, but maybe it\u0027s better that we make something up out of whole cloth.","commit_id":"4a0afa9fea60bf2d1943b59a1f4ab49cb89e682a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"34781423d05d4fa5534913c9074b687c405e85ac","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                raise BadResponseLength("},{"line_number":46,"context_line":"                    \"Too many bytes; truncating after %d bytes \""},{"line_number":47,"context_line":"                    \"with at least %d surplus bytes remaining\" % ("},{"line_number":48,"context_line":"                        nbytes, len(chunk) - bytes_left))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        if bytes_left:"},{"line_number":51,"context_line":"            raise BadResponseLength(\u0027Expected another %d bytes\u0027 % ("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_df430aaf","line":48,"updated":"2018-06-26 23:21:51.000000000","message":"It bugs me a little that if the caller\n\n- knows how many bytes to expect,\n- *also* counts bytes as it iterates, and\n- closes the iterator once it thinks it has them all,\n\nwe never so much as log the fact that the underlying iterator already knew it had too many bytes...\n\nAt the same time, though, I don\u0027t have a better idea. We have to do one or the other; we can\u0027t both yield what we\u0027ve got and raise the error *at the same time* :-/","commit_id":"4a0afa9fea60bf2d1943b59a1f4ab49cb89e682a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"34781423d05d4fa5534913c9074b687c405e85ac","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        if self._response_headers:"},{"line_number":105,"context_line":"            content_lengths \u003d [val for header, val in self._response_headers"},{"line_number":106,"context_line":"                               if header.lower() \u003d\u003d \"content-length\"]"},{"line_number":107,"context_line":"            if len(content_lengths) \u003d\u003d 1:"},{"line_number":108,"context_line":"                try:"},{"line_number":109,"context_line":"                    content_length \u003d int(content_lengths[0])"},{"line_number":110,"context_line":"                except ValueError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_3f223e02","line":107,"range":{"start_line":107,"start_character":12,"end_line":107,"end_character":41},"updated":"2018-06-26 23:21:51.000000000","message":"I suppose this check is why we didn\u0027t want to use self._response_header_value(\u0027content-length\u0027)?","commit_id":"4a0afa9fea60bf2d1943b59a1f4ab49cb89e682a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"34781423d05d4fa5534913c9074b687c405e85ac","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                else:"},{"line_number":113,"context_line":"                    resp \u003d enforce_byte_count("},{"line_number":114,"context_line":"                        resp,"},{"line_number":115,"context_line":"                        0 if method \u003d\u003d \u0027HEAD\u0027 else content_length)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # make sure the response has the trans_id"},{"line_number":118,"context_line":"        if self._response_headers is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_9f7832f8","line":115,"range":{"start_line":115,"start_character":24,"end_line":115,"end_character":45},"updated":"2018-06-26 23:21:51.000000000","message":"Seems like it might be worth having this part even if the app *doesn\u0027t* provide a content-length...","commit_id":"4a0afa9fea60bf2d1943b59a1f4ab49cb89e682a"}],"swift/common/middleware/dlo.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"34781423d05d4fa5534913c9074b687c405e85ac","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        con_resp \u003d con_req.get_response(self.dlo.app)"},{"line_number":156,"context_line":"        if not is_success(con_resp.status_int):"},{"line_number":157,"context_line":"            if req.method \u003d\u003d \u0027HEAD\u0027:"},{"line_number":158,"context_line":"                close_if_possible(con_resp.app_iter)"},{"line_number":159,"context_line":"                con_resp.body \u003d \u0027\u0027"},{"line_number":160,"context_line":"            return con_resp, None"},{"line_number":161,"context_line":"        with closing_if_possible(con_resp.app_iter):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_5f7e1ae3","line":158,"range":{"start_line":158,"start_character":16,"end_line":158,"end_character":52},"updated":"2018-06-26 23:21:51.000000000","message":"That feels like something that ought to happen in the _resp_body_property setter...","commit_id":"4a0afa9fea60bf2d1943b59a1f4ab49cb89e682a"}]}
