)]}'
{"swift/common/direct_client.py":[{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"b5ef5680823505836fd65f3a4e6983ff2dc86968","unresolved":false,"context_lines":[{"line_number":344,"context_line":"    if not contents:"},{"line_number":345,"context_line":"        headers[\u0027Content-Length\u0027] \u003d \u00270\u0027"},{"line_number":346,"context_line":"    if isinstance(contents, basestring):"},{"line_number":347,"context_line":"        contents \u003d [contents]"},{"line_number":348,"context_line":"    #Incase the caller want to insert an object with sepcific age"},{"line_number":349,"context_line":"    if headers.get(\u0027X-Timestamp\u0027, -1) !\u003d -1:"},{"line_number":350,"context_line":"        add_ts \u003d False"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAPn%2F%2F4%2FU%3D","line":347,"updated":"2013-06-18 22:15:51.000000000","message":"spelling: sepcific should be specific\n\nwhy is add_ts initialized way up at the top. would be better to keep everything together imo. also why the -1 thing? wouldn\u0027t this work:\n\nadd_ts \u003d \u0027X-Timestamp\u0027 not in headers","commit_id":"4906ed4dcc55c84cbf576f00c73a8f2bcb8e5b37"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"86325a6e00cf847cf081bdd06cdfb28d181bef87","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        conn \u003d http_connect(node[\u0027ip\u0027], node[\u0027port\u0027], node[\u0027device\u0027], part,"},{"line_number":355,"context_line":"                            \u0027PUT\u0027, path, headers\u003dgen_headers(headers, add_ts))"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    from swift.container.sync import _Iter2FileLikeObject"},{"line_number":358,"context_line":"    contents_f \u003d _Iter2FileLikeObject(contents)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    if content_length is None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fx3s%3D","line":357,"updated":"2013-06-21 13:18:32.000000000","message":"Usually we just put imports at the top of the file unless there\u0027s a really good reason for it to be nested.","commit_id":"a7c3396f90552959d4f9d08b2435a4426ae6fbd7"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"86325a6e00cf847cf081bdd06cdfb28d181bef87","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        chunk \u003d contents_f.read(chunk_size)"},{"line_number":362,"context_line":"        while chunk:"},{"line_number":363,"context_line":"            conn.send(\u0027%x\\r\\n%s\\r\\n\u0027 % (len(chunk), chunk))"},{"line_number":364,"context_line":"            chunk \u003d contents.read(chunk_size)"},{"line_number":365,"context_line":"        conn.send(\u00270\\r\\n\\r\\n\u0027)"},{"line_number":366,"context_line":"    else:"},{"line_number":367,"context_line":"        left \u003d content_length"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fx24%3D","line":364,"updated":"2013-06-21 13:18:32.000000000","message":"Shouldn\u0027t the contents here be contents_f?","commit_id":"a7c3396f90552959d4f9d08b2435a4426ae6fbd7"},{"author":{"_account_id":1216,"name":"gholt","email":"z-launchpad@brim.net","username":"gholt"},"change_message_id":"86325a6e00cf847cf081bdd06cdfb28d181bef87","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        conn.send(\u00270\\r\\n\\r\\n\u0027)"},{"line_number":366,"context_line":"    else:"},{"line_number":367,"context_line":"        left \u003d content_length"},{"line_number":368,"context_line":"        while left \u003e 0:"},{"line_number":369,"context_line":"            size \u003d chunk_size"},{"line_number":370,"context_line":"            if size \u003e left:"},{"line_number":371,"context_line":"                size \u003d left"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPn%2F%2Fx2g%3D","line":368,"updated":"2013-06-21 13:18:32.000000000","message":"This loop won\u0027t handle the case when contents_f reaches the end of its data (where chunk will end up an empty string) before the content_length is reached. In such case, it will just loop forever.","commit_id":"a7c3396f90552959d4f9d08b2435a4426ae6fbd7"}]}
