)]}'
{"doc/saio/swift/proxy-server.conf":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fef7d9685e6e24960b5007e83dc098a703dbd3e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"[pipeline:main]"},{"line_number":10,"context_line":"# Yes, proxy-logging appears twice. This is so that"},{"line_number":11,"context_line":"# middleware-originated requests get logged too."},{"line_number":12,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache bulk tempurl ratelimit crossdomain container_sync tempauth staticweb container-quotas account-quotas server_side_copy slo dlo versioned_writes proxy-logging proxy-server"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[filter:catch_errors]"},{"line_number":15,"context_line":"use \u003d egg:swift#catch_errors"}],"source_content_type":"text/plain","patch_set":38,"id":"dab17558_e0e14c00","line":12,"range":{"start_line":12,"start_character":168,"end_line":12,"end_character":184},"updated":"2016-05-05 23:18:49.000000000","message":"This needs to move left of quotas, right?","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"607fab1eef339b9fc2edcd84a5a1e84ed10186bb","unresolved":false,"context_lines":[{"line_number":9,"context_line":"[pipeline:main]"},{"line_number":10,"context_line":"# Yes, proxy-logging appears twice. This is so that"},{"line_number":11,"context_line":"# middleware-originated requests get logged too."},{"line_number":12,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache bulk tempurl ratelimit crossdomain container_sync tempauth staticweb container-quotas account-quotas server_side_copy slo dlo versioned_writes proxy-logging proxy-server"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[filter:catch_errors]"},{"line_number":15,"context_line":"use \u003d egg:swift#catch_errors"}],"source_content_type":"text/plain","patch_set":38,"id":"dab17558_85ddc944","line":12,"in_reply_to":"dab17558_e0e14c00","updated":"2016-05-06 20:32:13.000000000","message":"Done","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"}],"doc/source/middleware.rst":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e4c83cba1cf93fb6670dc18dd856ae57ed53c287","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":".. _server_side_copy:"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"Server Side Copy"},{"line_number":170,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":".. automodule:: swift.common.middleware.server_side_copy"}],"source_content_type":"text/x-rst","patch_set":37,"id":"1a122d0e_c79a296e","line":169,"updated":"2016-04-22 19:05:15.000000000","message":"Seems like this list is alphabetical; should this go between Recon and Static Large Objects instead?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":".. _server_side_copy:"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"Server Side Copy"},{"line_number":170,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":".. automodule:: swift.common.middleware.server_side_copy"}],"source_content_type":"text/x-rst","patch_set":37,"id":"1a122d0e_0956c2d1","line":169,"in_reply_to":"1a122d0e_c79a296e","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"}],"doc/source/overview_server_side_copy.rst":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"685d9742663286b30aefce9768d1602be13ee69e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":40,"id":"dab17558_e3e35fd7","line":7,"updated":"2016-05-11 02:55:02.000000000","message":"Do we actually need this extra file. For 1 thing it isn\u0027t linked anywhere from the main page, so you have to search for it.\n\nAnd secondly it\u0027s exact copy of what will be present in the server side copy middleware section, do we really need it twice?","commit_id":"2dd96c191ae82cab17c86e6030e26a7a62cb1211"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"04dd073e91b7a44362e870df0f4353bf51a35f6c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":40,"id":"dab17558_32df453b","line":7,"in_reply_to":"dab17558_e3e35fd7","updated":"2016-05-11 18:57:39.000000000","message":"Done. removed","commit_id":"2dd96c191ae82cab17c86e6030e26a7a62cb1211"}],"etc/proxy-server.conf-sample":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e4c83cba1cf93fb6670dc18dd856ae57ed53c287","unresolved":false,"context_lines":[{"line_number":79,"context_line":"[pipeline:main]"},{"line_number":80,"context_line":"# This sample pipeline uses tempauth and is used for SAIO dev work and"},{"line_number":81,"context_line":"# testing. See below for a pipeline using keystone."},{"line_number":82,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit tempauth container-quotas account-quotas server_side_copy slo dlo versioned_writes proxy-logging proxy-server"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# The following pipeline shows keystone integration. Comment out the one"},{"line_number":85,"context_line":"# above and uncomment this one. Additional steps for integrating keystone are"}],"source_content_type":"application/octet-stream","patch_set":37,"id":"1a122d0e_71f22108","line":82,"range":{"start_line":82,"start_character":114,"end_line":82,"end_character":145},"updated":"2016-04-22 19:05:15.000000000","message":"This should probably be a follow-up, but I think we can simplify the quota middlewares a decent bit if copy is left of them.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":79,"context_line":"[pipeline:main]"},{"line_number":80,"context_line":"# This sample pipeline uses tempauth and is used for SAIO dev work and"},{"line_number":81,"context_line":"# testing. See below for a pipeline using keystone."},{"line_number":82,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit tempauth container-quotas account-quotas server_side_copy slo dlo versioned_writes proxy-logging proxy-server"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# The following pipeline shows keystone integration. Comment out the one"},{"line_number":85,"context_line":"# above and uncomment this one. Additional steps for integrating keystone are"}],"source_content_type":"application/octet-stream","patch_set":37,"id":"1a122d0e_50cc6469","line":82,"range":{"start_line":82,"start_character":114,"end_line":82,"end_character":145},"in_reply_to":"1a122d0e_71f22108","updated":"2016-05-05 20:11:13.000000000","message":"I\u0027d prefer to do this now, so that we don\u0027t need to move copy in the pipeline later. It seemed like a simple fix where we just needed to remove a bunch of copy code, please check it out and thanks for pointing it out...","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fef7d9685e6e24960b5007e83dc098a703dbd3e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"[pipeline:main]"},{"line_number":80,"context_line":"# This sample pipeline uses tempauth and is used for SAIO dev work and"},{"line_number":81,"context_line":"# testing. See below for a pipeline using keystone."},{"line_number":82,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit tempauth container-quotas account-quotas server_side_copy slo dlo versioned_writes proxy-logging proxy-server"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# The following pipeline shows keystone integration. Comment out the one"},{"line_number":85,"context_line":"# above and uncomment this one. Additional steps for integrating keystone are"}],"source_content_type":"application/octet-stream","patch_set":38,"id":"dab17558_40ce5884","line":82,"range":{"start_line":82,"start_character":146,"end_line":82,"end_character":162},"updated":"2016-05-05 23:18:49.000000000","message":"Still need to move this left of quotas.","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"607fab1eef339b9fc2edcd84a5a1e84ed10186bb","unresolved":false,"context_lines":[{"line_number":79,"context_line":"[pipeline:main]"},{"line_number":80,"context_line":"# This sample pipeline uses tempauth and is used for SAIO dev work and"},{"line_number":81,"context_line":"# testing. See below for a pipeline using keystone."},{"line_number":82,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit tempauth container-quotas account-quotas server_side_copy slo dlo versioned_writes proxy-logging proxy-server"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"# The following pipeline shows keystone integration. Comment out the one"},{"line_number":85,"context_line":"# above and uncomment this one. Additional steps for integrating keystone are"}],"source_content_type":"application/octet-stream","patch_set":38,"id":"dab17558_45b641dd","line":82,"in_reply_to":"dab17558_40ce5884","updated":"2016-05-06 20:32:13.000000000","message":"Done","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fef7d9685e6e24960b5007e83dc098a703dbd3e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# The following pipeline shows keystone integration. Comment out the one"},{"line_number":85,"context_line":"# above and uncomment this one. Additional steps for integrating keystone are"},{"line_number":86,"context_line":"# covered further below in the filter sections for authtoken and keystoneauth."},{"line_number":87,"context_line":"#pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit authtoken keystoneauth container-quotas account-quotas server_side_copy slo dlo versioned_writes proxy-logging proxy-server"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"[app:proxy-server]"},{"line_number":90,"context_line":"use \u003d egg:swift#proxy"}],"source_content_type":"application/octet-stream","patch_set":38,"id":"dab17558_60c55c5a","line":87,"range":{"start_line":87,"start_character":161,"end_line":87,"end_character":177},"updated":"2016-05-05 23:18:49.000000000","message":"And here.","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"607fab1eef339b9fc2edcd84a5a1e84ed10186bb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"# The following pipeline shows keystone integration. Comment out the one"},{"line_number":85,"context_line":"# above and uncomment this one. Additional steps for integrating keystone are"},{"line_number":86,"context_line":"# covered further below in the filter sections for authtoken and keystoneauth."},{"line_number":87,"context_line":"#pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit authtoken keystoneauth container-quotas account-quotas server_side_copy slo dlo versioned_writes proxy-logging proxy-server"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"[app:proxy-server]"},{"line_number":90,"context_line":"use \u003d egg:swift#proxy"}],"source_content_type":"application/octet-stream","patch_set":38,"id":"dab17558_25bb3dc6","line":87,"in_reply_to":"dab17558_60c55c5a","updated":"2016-05-06 20:32:13.000000000","message":"Done","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"}],"swift/common/constraints.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"3cb6283fc25fd685a7fb0294b4a8079ea53e4fc9","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                  request\u003dreq,"},{"line_number":181,"context_line":"                                  content_type\u003d\u0027text/plain\u0027)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    if \u0027X-Copy-From\u0027 in req.headers and req.content_length:"},{"line_number":184,"context_line":"        return HTTPBadRequest(body\u003d\u0027Copy requests require a zero byte body\u0027,"},{"line_number":185,"context_line":"                              request\u003dreq, content_type\u003d\u0027text/plain\u0027)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_954be885","side":"PARENT","line":183,"updated":"2015-03-20 19:58:52.000000000","message":"wondering if this should be removed from here, since the constraints is also called by the object server....","commit_id":"6d18ad3185252b948a2a28573e2895586631e901"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"061e336d2edd627cee2cb7e4e12e5f3c83d4acc3","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                  request\u003dreq,"},{"line_number":181,"context_line":"                                  content_type\u003d\u0027text/plain\u0027)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"    if \u0027X-Copy-From\u0027 in req.headers and req.content_length:"},{"line_number":184,"context_line":"        return HTTPBadRequest(body\u003d\u0027Copy requests require a zero byte body\u0027,"},{"line_number":185,"context_line":"                              request\u003dreq, content_type\u003d\u0027text/plain\u0027)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_b625290c","side":"PARENT","line":183,"in_reply_to":"9a80dd14_954be885","updated":"2015-03-23 05:55:08.000000000","message":"Yes it should be. X-Copy-From header is removed in copy middleware and hence the header never reaches object controller. Also, \"check_object_creation\" is  never invoked from copy middleware.","commit_id":"6d18ad3185252b948a2a28573e2895586631e901"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"974127862a1344f8af4b0358c3c17b5b85941357","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    # So, we should catch both UnicodeDecodeError \u0026 UnicodeEncodeError"},{"line_number":353,"context_line":"    except UnicodeError:"},{"line_number":354,"context_line":"        return False"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"def check_name_format(req, name, target_type):"},{"line_number":358,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":41,"id":"dab17558_c64f1690","line":355,"updated":"2016-05-11 21:38:49.000000000","message":"I kinda hate to suggest this but... should we leave stubs here for a cycle or two, in case there are third-party middlewares that expect these here? With a deprecation warning, of course.\n\nI almost wouldn\u0027t worry about it, but check_path_header is just generic enough that I could see someone wanting to use it for something not COPY-related.","commit_id":"46d61a4dcd9a5d9157625c06d6fe7d916e80c3d2"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"580c6979a7445b121d6e470197f829b5099106fc","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    # So, we should catch both UnicodeDecodeError \u0026 UnicodeEncodeError"},{"line_number":353,"context_line":"    except UnicodeError:"},{"line_number":354,"context_line":"        return False"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"def check_name_format(req, name, target_type):"},{"line_number":358,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":41,"id":"dab17558_4c006534","line":355,"in_reply_to":"dab17558_c64f1690","updated":"2016-05-11 21:57:03.000000000","message":"that\u0027s not part of any documented or public API","commit_id":"46d61a4dcd9a5d9157625c06d6fe7d916e80c3d2"}],"swift/common/middleware/server_side_copy.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"3cb6283fc25fd685a7fb0294b4a8079ea53e4fc9","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        del req.headers[\u0027Destination\u0027]"},{"line_number":299,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def handle_PUT(self, req, start_response):"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        # Sometimes the \u0027content-type\u0027 header exists, but is set to None."},{"line_number":304,"context_line":"        content_type_manually_set \u003d True"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_b57d4ce9","line":301,"updated":"2015-03-20 19:58:52.000000000","message":"this method is pretty long, would it make sense to break it up into smaller pieces, maybe the GET part and the PUT part??","commit_id":"cd6e5b3224a7bbe19f7fd9bca696a81856d3cd81"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"73077c7111cce43631d6e4c82eea672d0d1496ce","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        del req.headers[\u0027Destination\u0027]"},{"line_number":299,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def handle_PUT(self, req, start_response):"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        # Sometimes the \u0027content-type\u0027 header exists, but is set to None."},{"line_number":304,"context_line":"        content_type_manually_set \u003d True"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_f75e8344","line":301,"in_reply_to":"9a80dd14_b57d4ce9","updated":"2015-03-24 10:15:46.000000000","message":"Done","commit_id":"cd6e5b3224a7bbe19f7fd9bca696a81856d3cd81"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"3cb6283fc25fd685a7fb0294b4a8079ea53e4fc9","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def handle_PUT(self, req, start_response):"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        # Sometimes the \u0027content-type\u0027 header exists, but is set to None."},{"line_number":304,"context_line":"        content_type_manually_set \u003d True"},{"line_number":305,"context_line":"        detect_content_type \u003d \\"},{"line_number":306,"context_line":"            config_true_value(req.headers.get(\u0027x-detect-content-type\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_15d298ff","line":303,"updated":"2015-03-20 19:58:52.000000000","message":"does this need to be done here since it will happen in the obj controller already?","commit_id":"cd6e5b3224a7bbe19f7fd9bca696a81856d3cd81"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"73077c7111cce43631d6e4c82eea672d0d1496ce","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def handle_PUT(self, req, start_response):"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        # Sometimes the \u0027content-type\u0027 header exists, but is set to None."},{"line_number":304,"context_line":"        content_type_manually_set \u003d True"},{"line_number":305,"context_line":"        detect_content_type \u003d \\"},{"line_number":306,"context_line":"            config_true_value(req.headers.get(\u0027x-detect-content-type\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_40ba340b","line":303,"in_reply_to":"1a6ced46_36c77914","updated":"2015-03-24 10:15:46.000000000","message":"I had a look at that again, you were right about this. All the copy middleware should care and check for is presence/absence of content-type header in the COPY/PUT request.","commit_id":"cd6e5b3224a7bbe19f7fd9bca696a81856d3cd81"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"061e336d2edd627cee2cb7e4e12e5f3c83d4acc3","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def handle_PUT(self, req, start_response):"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        # Sometimes the \u0027content-type\u0027 header exists, but is set to None."},{"line_number":304,"context_line":"        content_type_manually_set \u003d True"},{"line_number":305,"context_line":"        detect_content_type \u003d \\"},{"line_number":306,"context_line":"            config_true_value(req.headers.get(\u0027x-detect-content-type\u0027))"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_36c77914","line":303,"in_reply_to":"9a80dd14_15d298ff","updated":"2015-03-23 05:55:08.000000000","message":"This piece of code was moved here from object controller (it doesn\u0027t exist there anymore). This code was only used during object copy. (Refer line 386)","commit_id":"cd6e5b3224a7bbe19f7fd9bca696a81856d3cd81"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"3cb6283fc25fd685a7fb0294b4a8079ea53e4fc9","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        source_req.headers.pop(\u0027X-Backend-Storage-Policy-Index\u0027, None)"},{"line_number":338,"context_line":"        source_req.path_info \u003d source_header"},{"line_number":339,"context_line":"        source_req.headers[\u0027X-Newest\u0027] \u003d \u0027true\u0027"},{"line_number":340,"context_line":"        orig_obj_name \u003d self.object_name"},{"line_number":341,"context_line":"        orig_container_name \u003d self.container_name"},{"line_number":342,"context_line":"        orig_account_name \u003d self.account_name"},{"line_number":343,"context_line":"        self.object_name \u003d src_obj_name"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_f5350445","line":340,"updated":"2015-03-20 19:58:52.000000000","message":"I was hoping we could get rid of these global variables here in the middleware. This whole thing of setting it to different values back and forth is just confusing...","commit_id":"cd6e5b3224a7bbe19f7fd9bca696a81856d3cd81"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"73077c7111cce43631d6e4c82eea672d0d1496ce","unresolved":false,"context_lines":[{"line_number":337,"context_line":"        source_req.headers.pop(\u0027X-Backend-Storage-Policy-Index\u0027, None)"},{"line_number":338,"context_line":"        source_req.path_info \u003d source_header"},{"line_number":339,"context_line":"        source_req.headers[\u0027X-Newest\u0027] \u003d \u0027true\u0027"},{"line_number":340,"context_line":"        orig_obj_name \u003d self.object_name"},{"line_number":341,"context_line":"        orig_container_name \u003d self.container_name"},{"line_number":342,"context_line":"        orig_account_name \u003d self.account_name"},{"line_number":343,"context_line":"        self.object_name \u003d src_obj_name"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6ced46_3759fb5a","line":340,"in_reply_to":"9a80dd14_f5350445","updated":"2015-03-24 10:15:46.000000000","message":"Done","commit_id":"cd6e5b3224a7bbe19f7fd9bca696a81856d3cd81"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"54ce93344bc2806422e55ef874fb85fc8879bb04","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        source_req.headers[\u0027X-Newest\u0027] \u003d \u0027true\u0027"},{"line_number":302,"context_line":"        if req.headers.get(\u0027X-Copy-From-Account\u0027, False):"},{"line_number":303,"context_line":"            # Used in proxy server to delay the auth response"},{"line_number":304,"context_line":"            source_req.environ[\u0027swift.cross.account.copy\u0027] \u003d True"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        source_resp \u003d ssc_ctx.get_source_resp(source_req)"},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_76194dd0","line":304,"updated":"2015-09-07 17:02:02.000000000","message":"can we make the key \u0027swift.cross_account_copy\u0027 ie uses underscores to be consistent with other swift.* keys in environ","commit_id":"fefd1e387e914391447a9b7e73045024916b8a1b"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"5b1f4801c5b2177ad0b2cfe02e39a790c7f080cb","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        source_req.headers[\u0027X-Newest\u0027] \u003d \u0027true\u0027"},{"line_number":302,"context_line":"        if req.headers.get(\u0027X-Copy-From-Account\u0027, False):"},{"line_number":303,"context_line":"            # Used in proxy server to delay the auth response"},{"line_number":304,"context_line":"            source_req.environ[\u0027swift.cross.account.copy\u0027] \u003d True"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        source_resp \u003d ssc_ctx.get_source_resp(source_req)"},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_a4cebd2a","line":304,"in_reply_to":"da20952f_76194dd0","updated":"2015-09-08 04:39:42.000000000","message":"Will do.","commit_id":"fefd1e387e914391447a9b7e73045024916b8a1b"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"6c3c1ed5eaa84acd0c75acc2f8e3851f28f78079","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        source_req.headers[\u0027X-Newest\u0027] \u003d \u0027true\u0027"},{"line_number":302,"context_line":"        if req.headers.get(\u0027X-Copy-From-Account\u0027, False):"},{"line_number":303,"context_line":"            # Used in proxy server to delay the auth response"},{"line_number":304,"context_line":"            source_req.environ[\u0027swift.cross.account.copy\u0027] \u003d True"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        source_resp \u003d ssc_ctx.get_source_resp(source_req)"},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"ba8a016a_c658988c","line":304,"in_reply_to":"da20952f_a4cebd2a","updated":"2015-11-20 02:38:09.000000000","message":"Done","commit_id":"fefd1e387e914391447a9b7e73045024916b8a1b"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"4bb72db53c5b9ccd39a75248197356d5e0a1a658","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        if is_success(self._get_status_int()):"},{"line_number":185,"context_line":"            for i in xrange(len(self._response_headers)):"},{"line_number":186,"context_line":"                header \u003d self._response_headers[i][0]"},{"line_number":187,"context_line":"                value \u003d self._response_headers[i][1]"},{"line_number":188,"context_line":"                if header.lower() \u003d\u003d \u0027allow\u0027 and \u0027COPY\u0027 not in value:"},{"line_number":189,"context_line":"                    self._response_headers[i] \u003d (\u0027Allow\u0027, value + \u0027, COPY\u0027)"},{"line_number":190,"context_line":"                if header.lower() \u003d\u003d \u0027access-control-allow-methods\u0027 and \\"}],"source_content_type":"text/x-python","patch_set":28,"id":"bae84128_e1bcdddd","line":187,"range":{"start_line":187,"start_character":51,"end_line":187,"end_character":52},"updated":"2016-02-24 12:56:02.000000000","message":"tdasilva pinged me to mention here why I had to mess with OPTIONS...\n\n\nOPTIONS request is handled by the proxy base controller and a response to OPTIONS request involved the controller returning all \"public\" methods (the ones with @public decorator).\nhttps://github.com/openstack/swift/blob/master/swift/proxy/controllers/base.py#L1245-L1253\nhttps://github.com/openstack/swift/blob/master/swift/proxy/controllers/base.py#L1693\n\n\nWith SSC moved to middleware, COPY is no longer one of the \"public\" methods in object controller and hence isn\u0027t listed in allowed_methods.\n\n\nWith this change, the copy middleware intercepts response of OPTIONS request and adds \u0027COPY\u0027 verb to it.\n\n\nThe \"Access-Control-Allow-Methods\" response header is same as \"Allow\" response header when CORS functionality is in use.\nhttps://www.w3.org/TR/cors/#access-control-allow-methods-response-header","commit_id":"c4ffab7786fd26b49fb9930552fc1c8ab3976edc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"6c2c34110ed6e3371143a17725b151dea07f7aba","unresolved":false,"context_lines":[{"line_number":405,"context_line":"            sink_req.params \u003d params"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # Set data source, content length and etag for the PUT request"},{"line_number":408,"context_line":"        sink_req.environ[\u0027wsgi.input\u0027] \u003d InputProxy(StringIO(source_resp.body))"},{"line_number":409,"context_line":"        sink_req.content_length \u003d source_resp.content_length"},{"line_number":410,"context_line":"        sink_req.etag \u003d source_resp.etag"},{"line_number":411,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"1af94dfe_6d0bce2a","line":408,"updated":"2016-03-18 10:08:47.000000000","message":"source_resp.body will read all of body into memory","commit_id":"b251b727e2972ec0ac4247788e3feb66fb2289f0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"18ad2f0cc5aa1bad45b6cbf54d80c35229c940a4","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Server side copy is a feature that enables users/clients to COPY objects"},{"line_number":17,"context_line":"between accounts and containers without the need to download and then"},{"line_number":18,"context_line":"re-upload objects, thus eliminating additional bandwidth consumption and"},{"line_number":19,"context_line":"also saving time. This is analogous to renaming/moving an object which"},{"line_number":20,"context_line":"in Swift is a (COPY + DELETE) operation."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The server side copy middleware should be inserted in the pipeline before dlo"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_1c649047","line":19,"range":{"start_line":19,"start_character":23,"end_line":19,"end_character":38},"updated":"2016-04-08 19:09:24.000000000","message":"I\u0027m not sure \"is analogous to\" is correct here; maybe \"may be used when\"?","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"489952330c6c507258f5694d10e610116ea71b2a","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Server side copy is a feature that enables users/clients to COPY objects"},{"line_number":17,"context_line":"between accounts and containers without the need to download and then"},{"line_number":18,"context_line":"re-upload objects, thus eliminating additional bandwidth consumption and"},{"line_number":19,"context_line":"also saving time. This is analogous to renaming/moving an object which"},{"line_number":20,"context_line":"in Swift is a (COPY + DELETE) operation."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The server side copy middleware should be inserted in the pipeline before dlo"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a122d0e_87e33f05","line":19,"in_reply_to":"9a061dce_1c649047","updated":"2016-05-05 20:11:27.000000000","message":"Done","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"18ad2f0cc5aa1bad45b6cbf54d80c35229c940a4","unresolved":false,"context_lines":[{"line_number":19,"context_line":"also saving time. This is analogous to renaming/moving an object which"},{"line_number":20,"context_line":"in Swift is a (COPY + DELETE) operation."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"The server side copy middleware should be inserted in the pipeline before dlo"},{"line_number":23,"context_line":"and slo and after the auth middleware. If it is not present in the pipeline"},{"line_number":24,"context_line":"in the proxy-server configuration file, it will be inserted automatically."},{"line_number":25,"context_line":"There is no configurable option provided to turn off server side copy."},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_7c6cac08","line":23,"range":{"start_line":22,"start_character":74,"end_line":23,"end_character":7},"updated":"2016-04-08 19:09:24.000000000","message":"I feel like we should have some docs concerning the interaction between xLO and COPY.\n\nAs a user, how do I copy the entire object vs. just the manifest? When might I want one vs. the other?","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"18ad2f0cc5aa1bad45b6cbf54d80c35229c940a4","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            # this case, we\u0027re going to refuse to do the server-side copy."},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"            # TODO: Check if above comment is true and"},{"line_number":339,"context_line":"            # content_length can really be None."},{"line_number":340,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        if source_resp.content_length \u003e MAX_FILE_SIZE:"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_fc055c14","line":339,"updated":"2016-04-08 19:09:24.000000000","message":"Yes, this is true. Drop container_listing_limit (in swift.conf) to 10 or something to see it more easily.","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"18ad2f0cc5aa1bad45b6cbf54d80c35229c940a4","unresolved":false,"context_lines":[{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        params \u003d sink_req.params"},{"line_number":397,"context_line":"        if params.get(\u0027multipart-manifest\u0027) \u003d\u003d \u0027get\u0027:"},{"line_number":398,"context_line":"            if \u0027X-Static-Large-Object\u0027 in source_resp.headers:"},{"line_number":399,"context_line":"                params[\u0027multipart-manifest\u0027] \u003d \u0027put\u0027"},{"line_number":400,"context_line":"            if \u0027X-Object-Manifest\u0027 in source_resp.headers:"},{"line_number":401,"context_line":"                del params[\u0027multipart-manifest\u0027]"},{"line_number":402,"context_line":"                sink_req.headers[\u0027X-Object-Manifest\u0027] \u003d \\"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_ffe6ee42","line":399,"range":{"start_line":398,"start_character":0,"end_line":399,"end_character":52},"updated":"2016-04-08 19:09:24.000000000","message":"Before Id1ff7742308ed816038a5c44ec548afa26612b95 (i.e., pre-2.7.0), SLOs could have a zero-byte final segment; now they can\u0027t. Should we be worried about this? Some COPYs may 400 for what seems like no good reason.\n\n*IF* we wanted to worry about it, we could parse the manifest, check for a zero-byte final segment, and drop it if we found one. But then we may have orphaned a segment...","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"class ServerSideCopyWebContext(WSGIContext):"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def __init__(self, server_side_copy, logger):"},{"line_number":152,"context_line":"        super(ServerSideCopyWebContext, self).__init__(server_side_copy.app)"},{"line_number":153,"context_line":"        self.server_side_copy \u003d server_side_copy"},{"line_number":154,"context_line":"        self.logger \u003d logger"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_4eeaaead","line":151,"range":{"start_line":151,"start_character":23,"end_line":151,"end_character":39},"updated":"2016-04-22 23:21:47.000000000","message":"We only ever need the middleware for its app handle, right? Why not just pass the app directly?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"class ServerSideCopyWebContext(WSGIContext):"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def __init__(self, server_side_copy, logger):"},{"line_number":152,"context_line":"        super(ServerSideCopyWebContext, self).__init__(server_side_copy.app)"},{"line_number":153,"context_line":"        self.server_side_copy \u003d server_side_copy"},{"line_number":154,"context_line":"        self.logger \u003d logger"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_5bb12546","line":151,"range":{"start_line":151,"start_character":23,"end_line":151,"end_character":39},"in_reply_to":"1a122d0e_4eeaaead","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def get_source_resp(self, req):"},{"line_number":157,"context_line":"        sub_req \u003d make_subrequest("},{"line_number":158,"context_line":"            req.environ, path\u003dreq.path_info, method\u003dreq.method,"},{"line_number":159,"context_line":"            headers\u003dreq.headers, swift_source\u003d\u0027SSC\u0027)"},{"line_number":160,"context_line":"        return sub_req.get_response(self.server_side_copy.app)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_093430f9","line":158,"range":{"start_line":158,"start_character":45,"end_line":158,"end_character":62},"updated":"2016-04-22 23:21:47.000000000","message":"This shouldn\u0027t be necessary.\n\nLooks like path and headers are, though. I\u0027m not sure how I feel about that yet.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def get_source_resp(self, req):"},{"line_number":157,"context_line":"        sub_req \u003d make_subrequest("},{"line_number":158,"context_line":"            req.environ, path\u003dreq.path_info, method\u003dreq.method,"},{"line_number":159,"context_line":"            headers\u003dreq.headers, swift_source\u003d\u0027SSC\u0027)"},{"line_number":160,"context_line":"        return sub_req.get_response(self.server_side_copy.app)"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_fec73a95","line":158,"range":{"start_line":158,"start_character":45,"end_line":158,"end_character":62},"in_reply_to":"1a122d0e_093430f9","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if self._get_status_int() \u003d\u003d HTTP_CREATED:"},{"line_number":179,"context_line":"                self._response_status \u003d \u0027202 Accepted\u0027"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def handle_OPTIONS_request(self, req, start_response):"},{"line_number":182,"context_line":"        app_resp \u003d self._app_call(req.environ)"},{"line_number":183,"context_line":"        if is_success(self._get_status_int()):"},{"line_number":184,"context_line":"            for i in xrange(len(self._response_headers)):"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_50afe8e2","line":181,"updated":"2016-04-22 23:21:47.000000000","message":"Remind me, where was this getting handled before? Were we just getting this for free with the @public and @cors_validation decorators?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if self._get_status_int() \u003d\u003d HTTP_CREATED:"},{"line_number":179,"context_line":"                self._response_status \u003d \u0027202 Accepted\u0027"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    def handle_OPTIONS_request(self, req, start_response):"},{"line_number":182,"context_line":"        app_resp \u003d self._app_call(req.environ)"},{"line_number":183,"context_line":"        if is_success(self._get_status_int()):"},{"line_number":184,"context_line":"            for i in xrange(len(self._response_headers)):"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_09df100d","line":181,"in_reply_to":"1a122d0e_50afe8e2","updated":"2016-05-05 20:11:13.000000000","message":"@Tim, see Prashant\u0027s answer here: https://review.openstack.org/#/c/156923/28/swift/common/middleware/server_side_copy.py@187","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def handle_OPTIONS_request(self, req, start_response):"},{"line_number":182,"context_line":"        app_resp \u003d self._app_call(req.environ)"},{"line_number":183,"context_line":"        if is_success(self._get_status_int()):"},{"line_number":184,"context_line":"            for i in xrange(len(self._response_headers)):"},{"line_number":185,"context_line":"                header \u003d self._response_headers[i][0]"},{"line_number":186,"context_line":"                value \u003d self._response_headers[i][1]"},{"line_number":187,"context_line":"                if header.lower() \u003d\u003d \u0027allow\u0027 and \u0027COPY\u0027 not in value:"},{"line_number":188,"context_line":"                    self._response_headers[i] \u003d (\u0027Allow\u0027, value + \u0027, COPY\u0027)"},{"line_number":189,"context_line":"                if header.lower() \u003d\u003d \u0027access-control-allow-methods\u0027 and \\"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_0ebd56d7","line":186,"range":{"start_line":184,"start_character":12,"end_line":186,"end_character":52},"updated":"2016-04-22 23:21:47.000000000","message":"Better?\n\n for i, (header, value) in enumerate(self._response_headers):","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        if is_success(self._get_status_int()):"},{"line_number":184,"context_line":"            for i in xrange(len(self._response_headers)):"},{"line_number":185,"context_line":"                header \u003d self._response_headers[i][0]"},{"line_number":186,"context_line":"                value \u003d self._response_headers[i][1]"},{"line_number":187,"context_line":"                if header.lower() \u003d\u003d \u0027allow\u0027 and \u0027COPY\u0027 not in value:"},{"line_number":188,"context_line":"                    self._response_headers[i] \u003d (\u0027Allow\u0027, value + \u0027, COPY\u0027)"},{"line_number":189,"context_line":"                if header.lower() \u003d\u003d \u0027access-control-allow-methods\u0027 and \\"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_098a701a","line":186,"in_reply_to":"1a122d0e_0ebd56d7","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":215,"context_line":"            # This takes preference over the one set in proxy app"},{"line_number":216,"context_line":"            return"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        cp \u003d ConfigParser()"},{"line_number":219,"context_line":"        if os.path.isdir(conf[\u0027__file__\u0027]):"},{"line_number":220,"context_line":"            read_conf_dir(cp, conf[\u0027__file__\u0027])"},{"line_number":221,"context_line":"        else:"},{"line_number":222,"context_line":"            cp.read(conf[\u0027__file__\u0027])"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        try:"},{"line_number":225,"context_line":"            pipe \u003d cp.get(\"pipeline:main\", \"pipeline\")"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_b8546854","line":222,"range":{"start_line":218,"start_character":8,"end_line":222,"end_character":37},"updated":"2016-04-22 23:21:47.000000000","message":"This feels like a great helper function just waiting to be factored out of here and dlo.py (and maybe readconf in utils.py?).\n\nProbably as a follow-up, though.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        except (NoSectionError, NoOptionError):"},{"line_number":227,"context_line":"            return"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        proxy_name \u003d pipe.rsplit(None, 1)[-1]"},{"line_number":230,"context_line":"        proxy_section \u003d \"app:\" + proxy_name"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_b3af6be2","line":229,"range":{"start_line":229,"start_character":26,"end_line":229,"end_character":41},"updated":"2016-04-22 23:21:47.000000000","message":"I was going to be a smart-ass and complain about how I\u0027d find rsplit(limit\u003d1) more readable, only\n\n- apparently it\u0027s maxsplit, not limit, and\n- it doesn\u0027t let you do that:\n\n    TypeError: rsplit() takes no keyword arguments\n\nServes me right for wanting to be a jack-ass :P","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            pass"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def __call__(self, env, start_response):"},{"line_number":239,"context_line":"        req \u003d Request(env)"},{"line_number":240,"context_line":"        try:"},{"line_number":241,"context_line":"            (version, account, container, obj) \u003d req.split_path(4, 4, True)"},{"line_number":242,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_8e84c6b1","line":239,"range":{"start_line":239,"start_character":8,"end_line":239,"end_character":26},"updated":"2016-04-22 23:21:47.000000000","message":"Maybe worth adding a @wsgify decorator?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            pass"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def __call__(self, env, start_response):"},{"line_number":239,"context_line":"        req \u003d Request(env)"},{"line_number":240,"context_line":"        try:"},{"line_number":241,"context_line":"            (version, account, container, obj) \u003d req.split_path(4, 4, True)"},{"line_number":242,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_b49cc3c0","line":239,"range":{"start_line":239,"start_character":8,"end_line":239,"end_character":26},"in_reply_to":"1a122d0e_8e84c6b1","updated":"2016-05-05 20:11:13.000000000","message":"the issue with using wsgify, is that we need to call start_response on Lines 165 and 193. any ideas?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        return self.app(env, start_response)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def handle_object_post_as_copy(self, req, start_response):"},{"line_number":269,"context_line":"        req.method \u003d \u0027PUT\u0027"},{"line_number":270,"context_line":"        req.path_info \u003d \u0027/v1/%s/%s/%s\u0027 % ("},{"line_number":271,"context_line":"            self.account_name, self.container_name, self.object_name)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_904980d3","line":268,"updated":"2016-04-22 23:21:47.000000000","message":"From https://tools.ietf.org/html/rfc7233#section-3.1 :\n\n\u003e A server MUST ignore a Range header field received with a request method other than GET.\n\nI\u0027m comfortable with us ignoring that on COPY; there we made up our own verb \u0026 semantics, so we can do whatever we want. But we need to pop off any Range headers here. Otherwise, with POST-as-COPY, the range will get copied (or I\u0027ll get a 416).","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"        return self.app(env, start_response)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def handle_object_post_as_copy(self, req, start_response):"},{"line_number":269,"context_line":"        req.method \u003d \u0027PUT\u0027"},{"line_number":270,"context_line":"        req.path_info \u003d \u0027/v1/%s/%s/%s\u0027 % ("},{"line_number":271,"context_line":"            self.account_name, self.container_name, self.object_name)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_bcbec1d1","line":268,"in_reply_to":"1a122d0e_904980d3","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        # for post-as-copy always copy the manifest itself if source is *LO"},{"line_number":278,"context_line":"        params[\u0027multipart-manifest\u0027] \u003d \u0027get\u0027"},{"line_number":279,"context_line":"        req.params \u003d params"},{"line_number":280,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def handle_COPY(self, req, start_response):"},{"line_number":283,"context_line":"        if not req.headers.get(\u0027Destination\u0027):"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_ae68a2bb","line":280,"updated":"2016-04-22 23:21:47.000000000","message":"So this now gets X-Copied-From* headers? Was that intentional?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        # for post-as-copy always copy the manifest itself if source is *LO"},{"line_number":278,"context_line":"        params[\u0027multipart-manifest\u0027] \u003d \u0027get\u0027"},{"line_number":279,"context_line":"        req.params \u003d params"},{"line_number":280,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def handle_COPY(self, req, start_response):"},{"line_number":283,"context_line":"        if not req.headers.get(\u0027Destination\u0027):"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_e948d4ce","line":280,"in_reply_to":"1a122d0e_ae68a2bb","updated":"2016-05-05 20:11:13.000000000","message":"yes, the handle_PUT method in this middleware is to handle the cases where PUT request is sent with a X-Copy-From header","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1d15f6ce57f1b94683106cdf99f31f3915b03e6c","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        # for post-as-copy always copy the manifest itself if source is *LO"},{"line_number":278,"context_line":"        params[\u0027multipart-manifest\u0027] \u003d \u0027get\u0027"},{"line_number":279,"context_line":"        req.params \u003d params"},{"line_number":280,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def handle_COPY(self, req, start_response):"},{"line_number":283,"context_line":"        if not req.headers.get(\u0027Destination\u0027):"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab17558_9751ac11","line":280,"in_reply_to":"1a122d0e_e948d4ce","updated":"2016-05-05 23:18:34.000000000","message":"I mean to say, when I issue a POST with object_post_as_copy \u003d True, the end-user response now includes headers like X-Copied-From, where it didn\u0027t before. I get why we need to translate it to a PUT with X-Copy-From, I\u0027m just weirded out by the response.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"c1d431ed5af979b4a8003af8b4e33e0f4abfe5a4","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        # for post-as-copy always copy the manifest itself if source is *LO"},{"line_number":278,"context_line":"        params[\u0027multipart-manifest\u0027] \u003d \u0027get\u0027"},{"line_number":279,"context_line":"        req.params \u003d params"},{"line_number":280,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def handle_COPY(self, req, start_response):"},{"line_number":283,"context_line":"        if not req.headers.get(\u0027Destination\u0027):"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab17558_fb239503","line":280,"in_reply_to":"dab17558_9751ac11","updated":"2016-05-06 20:30:12.000000000","message":"changed the logic a little bit in _adjust_put_response to not add those headers, let me know what you think.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def handle_COPY(self, req, start_response):"},{"line_number":283,"context_line":"        if not req.headers.get(\u0027Destination\u0027):"},{"line_number":284,"context_line":"            return HTTPPreconditionFailed(request\u003dreq,"},{"line_number":285,"context_line":"                                          body\u003d\u0027Destination header required\u0027"},{"line_number":286,"context_line":"                                          )(req.environ, start_response)"},{"line_number":287,"context_line":"        dest_account \u003d self.account_name"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_4e5d8e78","line":284,"range":{"start_line":284,"start_character":19,"end_line":284,"end_character":41},"updated":"2016-04-22 23:21:47.000000000","message":"Not that I think we can change this now, but it makes me sad this isn\u0027t HTTPBadRequest. Oh well.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def handle_COPY(self, req, start_response):"},{"line_number":283,"context_line":"        if not req.headers.get(\u0027Destination\u0027):"},{"line_number":284,"context_line":"            return HTTPPreconditionFailed(request\u003dreq,"},{"line_number":285,"context_line":"                                          body\u003d\u0027Destination header required\u0027"},{"line_number":286,"context_line":"                                          )(req.environ, start_response)"},{"line_number":287,"context_line":"        dest_account \u003d self.account_name"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_db2d3547","line":284,"range":{"start_line":284,"start_character":19,"end_line":284,"end_character":41},"in_reply_to":"1a122d0e_4e5d8e78","updated":"2016-05-05 20:11:13.000000000","message":"agree, is it too late to change?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1d15f6ce57f1b94683106cdf99f31f3915b03e6c","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def handle_COPY(self, req, start_response):"},{"line_number":283,"context_line":"        if not req.headers.get(\u0027Destination\u0027):"},{"line_number":284,"context_line":"            return HTTPPreconditionFailed(request\u003dreq,"},{"line_number":285,"context_line":"                                          body\u003d\u0027Destination header required\u0027"},{"line_number":286,"context_line":"                                          )(req.environ, start_response)"},{"line_number":287,"context_line":"        dest_account \u003d self.account_name"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab17558_f76d98cd","line":284,"range":{"start_line":284,"start_character":19,"end_line":284,"end_character":41},"in_reply_to":"1a122d0e_db2d3547","updated":"2016-05-05 23:18:34.000000000","message":"Depends on whether any clients depend on the behavior. Maybe not? I wonder if we could do that for the 412s in versioned_writes, too...\n\nLater. Follow-up.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                                          )(req.environ, start_response)"},{"line_number":287,"context_line":"        dest_account \u003d self.account_name"},{"line_number":288,"context_line":"        if \u0027Destination-Account\u0027 in req.headers:"},{"line_number":289,"context_line":"            dest_account \u003d req.headers.get(\u0027Destination-Account\u0027)"},{"line_number":290,"context_line":"            dest_account \u003d check_account_format(req, dest_account)"},{"line_number":291,"context_line":"            req.headers[\u0027X-Copy-From-Account\u0027] \u003d self.account_name"},{"line_number":292,"context_line":"            self.account_name \u003d dest_account"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_4e474e77","line":289,"range":{"start_line":289,"start_character":27,"end_line":289,"end_character":65},"updated":"2016-04-22 23:21:47.000000000","message":"nit: may as well just say\n\n req.headers[\u0027Destination-Account\u0027]","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        # As this the path info is updated with destination container,"},{"line_number":301,"context_line":"        # the proxy server app will use the right object controller"},{"line_number":302,"context_line":"        # implementation corresponding to the container\u0027s policy type."},{"line_number":303,"context_line":"        req.path_info \u003d \u0027/v1/%s/%s/%s\u0027 % \\"},{"line_number":304,"context_line":"                        (dest_account, dest_container, dest_object)"},{"line_number":305,"context_line":"        req.headers[\u0027Content-Length\u0027] \u003d 0"},{"line_number":306,"context_line":"        req.headers[\u0027X-Copy-From\u0027] \u003d quote(source)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_4e158e47","line":303,"range":{"start_line":303,"start_character":26,"end_line":303,"end_character":28},"updated":"2016-04-22 23:21:47.000000000","message":"Is there an easy way for us to avoid hard-coding this?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        # As this the path info is updated with destination container,"},{"line_number":301,"context_line":"        # the proxy server app will use the right object controller"},{"line_number":302,"context_line":"        # implementation corresponding to the container\u0027s policy type."},{"line_number":303,"context_line":"        req.path_info \u003d \u0027/v1/%s/%s/%s\u0027 % \\"},{"line_number":304,"context_line":"                        (dest_account, dest_container, dest_object)"},{"line_number":305,"context_line":"        req.headers[\u0027Content-Length\u0027] \u003d 0"},{"line_number":306,"context_line":"        req.headers[\u0027X-Copy-From\u0027] \u003d quote(source)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_6db32f4e","line":303,"in_reply_to":"1a122d0e_4e158e47","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        # in case we are copying an SLO manifest, set format\u003draw parameter"},{"line_number":324,"context_line":"        params \u003d source_req.params"},{"line_number":325,"context_line":"        if params.get(\u0027multipart-manifest\u0027) \u003d\u003d \u0027get\u0027:"},{"line_number":326,"context_line":"            params[\u0027multipart-manifest\u0027] \u003d \u0027get\u0027"},{"line_number":327,"context_line":"            params[\u0027format\u0027] \u003d \u0027raw\u0027"},{"line_number":328,"context_line":"            source_req.params \u003d params"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_498628dc","line":326,"range":{"start_line":326,"start_character":12,"end_line":326,"end_character":48},"updated":"2016-04-22 23:21:47.000000000","message":"This shouldn\u0027t be necessary.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        # in case we are copying an SLO manifest, set format\u003draw parameter"},{"line_number":324,"context_line":"        params \u003d source_req.params"},{"line_number":325,"context_line":"        if params.get(\u0027multipart-manifest\u0027) \u003d\u003d \u0027get\u0027:"},{"line_number":326,"context_line":"            params[\u0027multipart-manifest\u0027] \u003d \u0027get\u0027"},{"line_number":327,"context_line":"            params[\u0027format\u0027] \u003d \u0027raw\u0027"},{"line_number":328,"context_line":"            source_req.params \u003d params"},{"line_number":329,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_8dda0b16","line":326,"in_reply_to":"1a122d0e_498628dc","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"            # TODO: Check if above comment is true and"},{"line_number":339,"context_line":"            # content_length can really be None."},{"line_number":340,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        if source_resp.content_length \u003e MAX_FILE_SIZE:"},{"line_number":343,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_a9025c3c","line":340,"updated":"2016-04-22 23:21:47.000000000","message":"Should probably close down the source_resp.app_iter before returning.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"            # TODO: Check if above comment is true and"},{"line_number":339,"context_line":"            # content_length can really be None."},{"line_number":340,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        if source_resp.content_length \u003e MAX_FILE_SIZE:"},{"line_number":343,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_2d83f7aa","line":340,"in_reply_to":"1a122d0e_a9025c3c","updated":"2016-05-05 20:11:13.000000000","message":"closed in caller","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        if source_resp.content_length \u003e MAX_FILE_SIZE:"},{"line_number":343,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        return source_resp"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_2995ace3","line":343,"updated":"2016-04-22 23:21:47.000000000","message":"Ditto here.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        if source_resp.content_length \u003e MAX_FILE_SIZE:"},{"line_number":343,"context_line":"            return HTTPRequestEntityTooLarge(request\u003dreq)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        return source_resp"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_65b5e4ce","line":343,"in_reply_to":"1a122d0e_2995ace3","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def handle_PUT(self, req, start_response):"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"        if int(req.headers[\u0027Content-Length\u0027]) !\u003d 0:"},{"line_number":365,"context_line":"            return HTTPBadRequest(body\u003d\u0027Copy requests require a zero byte \u0027"},{"line_number":366,"context_line":"                                  \u0027body\u0027, request\u003dreq,"},{"line_number":367,"context_line":"                                  content_type\u003d\u0027text/plain\u0027)(req.environ,"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_49cd88b6","line":364,"range":{"start_line":364,"start_character":15,"end_line":364,"end_character":44},"updated":"2016-04-22 23:21:47.000000000","message":"This can raise a KeyError, by either using a chunked transfer or just not sending a body.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def handle_PUT(self, req, start_response):"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"        if int(req.headers[\u0027Content-Length\u0027]) !\u003d 0:"},{"line_number":365,"context_line":"            return HTTPBadRequest(body\u003d\u0027Copy requests require a zero byte \u0027"},{"line_number":366,"context_line":"                                  \u0027body\u0027, request\u003dreq,"},{"line_number":367,"context_line":"                                  content_type\u003d\u0027text/plain\u0027)(req.environ,"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_8e6db8ce","line":364,"in_reply_to":"1a122d0e_49cd88b6","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        if req.environ.get(\u0027swift.orig_req_method\u0027, req.method) !\u003d \u0027POST\u0027:"},{"line_number":371,"context_line":"            req.environ.setdefault(\u0027swift.log_info\u0027, []).append("},{"line_number":372,"context_line":"                \u0027x-copy-from:%s\u0027 % req.headers.get(\u0027X-Copy-From\u0027))"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Form the path of source object to be fetched"},{"line_number":375,"context_line":"        ver, acct, _rest \u003d req.split_path(2, 3, True)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_e9ad7489","line":372,"range":{"start_line":372,"start_character":35,"end_line":372,"end_character":65},"updated":"2016-04-22 23:21:47.000000000","message":"This should always be set, right? Any reason not to just say req.headers[\u0027X-Copy-From\u0027]?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        if req.environ.get(\u0027swift.orig_req_method\u0027, req.method) !\u003d \u0027POST\u0027:"},{"line_number":371,"context_line":"            req.environ.setdefault(\u0027swift.log_info\u0027, []).append("},{"line_number":372,"context_line":"                \u0027x-copy-from:%s\u0027 % req.headers.get(\u0027X-Copy-From\u0027))"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Form the path of source object to be fetched"},{"line_number":375,"context_line":"        ver, acct, _rest \u003d req.split_path(2, 3, True)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_31be92ff","line":372,"in_reply_to":"1a122d0e_e9ad7489","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Form the path of source object to be fetched"},{"line_number":375,"context_line":"        ver, acct, _rest \u003d req.split_path(2, 3, True)"},{"line_number":376,"context_line":"        src_account_name \u003d req.headers.get(\u0027X-Copy-From-Account\u0027, None)"},{"line_number":377,"context_line":"        if src_account_name:"},{"line_number":378,"context_line":"            src_account_name \u003d check_account_format(req, src_account_name)"},{"line_number":379,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_69e7a4e4","line":376,"range":{"start_line":376,"start_character":27,"end_line":376,"end_character":71},"updated":"2016-04-22 23:21:47.000000000","message":"nit: can just be req.headers.get(\u0027X-Copy-From-Account\u0027)","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        # Form the path of source object to be fetched"},{"line_number":375,"context_line":"        ver, acct, _rest \u003d req.split_path(2, 3, True)"},{"line_number":376,"context_line":"        src_account_name \u003d req.headers.get(\u0027X-Copy-From-Account\u0027, None)"},{"line_number":377,"context_line":"        if src_account_name:"},{"line_number":378,"context_line":"            src_account_name \u003d check_account_format(req, src_account_name)"},{"line_number":379,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_d190fe98","line":376,"in_reply_to":"1a122d0e_69e7a4e4","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":398,"context_line":"            if \u0027X-Static-Large-Object\u0027 in source_resp.headers:"},{"line_number":399,"context_line":"                params[\u0027multipart-manifest\u0027] \u003d \u0027put\u0027"},{"line_number":400,"context_line":"            if \u0027X-Object-Manifest\u0027 in source_resp.headers:"},{"line_number":401,"context_line":"                del params[\u0027multipart-manifest\u0027]"},{"line_number":402,"context_line":"                sink_req.headers[\u0027X-Object-Manifest\u0027] \u003d \\"},{"line_number":403,"context_line":"                    source_resp.headers[\u0027X-Object-Manifest\u0027]"},{"line_number":404,"context_line":"            sink_req.params \u003d params"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_edf57fed","line":401,"updated":"2016-04-22 23:21:47.000000000","message":"Why bother? It shouldn\u0027t affect anything, right? And we\u0027re not cleaning up any other params...","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":398,"context_line":"            if \u0027X-Static-Large-Object\u0027 in source_resp.headers:"},{"line_number":399,"context_line":"                params[\u0027multipart-manifest\u0027] \u003d \u0027put\u0027"},{"line_number":400,"context_line":"            if \u0027X-Object-Manifest\u0027 in source_resp.headers:"},{"line_number":401,"context_line":"                del params[\u0027multipart-manifest\u0027]"},{"line_number":402,"context_line":"                sink_req.headers[\u0027X-Object-Manifest\u0027] \u003d \\"},{"line_number":403,"context_line":"                    source_resp.headers[\u0027X-Object-Manifest\u0027]"},{"line_number":404,"context_line":"            sink_req.params \u003d params"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_31fcd23d","line":401,"in_reply_to":"1a122d0e_edf57fed","updated":"2016-05-05 20:11:13.000000000","message":"why not? :-)\nit\u0027s a nice clean-up. doesn\u0027t make sense to send a PUT with multipart-manifest\u003dget anyway...","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            sink_req.params \u003d params"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # Set data source, content length and etag for the PUT request"},{"line_number":407,"context_line":"        sink_req.environ[\u0027wsgi.input\u0027] \u003d FileLikeIter(source_resp.app_iter)"},{"line_number":408,"context_line":"        sink_req.content_length \u003d source_resp.content_length"},{"line_number":409,"context_line":"        sink_req.etag \u003d source_resp.etag"},{"line_number":410,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_8d204bf9","line":407,"range":{"start_line":407,"start_character":54,"end_line":407,"end_character":74},"updated":"2016-04-22 23:21:47.000000000","message":"We should probably close this when we\u0027re done with it.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            sink_req.params \u003d params"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # Set data source, content length and etag for the PUT request"},{"line_number":407,"context_line":"        sink_req.environ[\u0027wsgi.input\u0027] \u003d FileLikeIter(source_resp.app_iter)"},{"line_number":408,"context_line":"        sink_req.content_length \u003d source_resp.content_length"},{"line_number":409,"context_line":"        sink_req.etag \u003d source_resp.etag"},{"line_number":410,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_fc8319c9","line":407,"range":{"start_line":407,"start_character":54,"end_line":407,"end_character":74},"in_reply_to":"1a122d0e_8d204bf9","updated":"2016-05-05 20:11:13.000000000","message":"not sure where this should go, pointers?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1d15f6ce57f1b94683106cdf99f31f3915b03e6c","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            sink_req.params \u003d params"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # Set data source, content length and etag for the PUT request"},{"line_number":407,"context_line":"        sink_req.environ[\u0027wsgi.input\u0027] \u003d FileLikeIter(source_resp.app_iter)"},{"line_number":408,"context_line":"        sink_req.content_length \u003d source_resp.content_length"},{"line_number":409,"context_line":"        sink_req.etag \u003d source_resp.etag"},{"line_number":410,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"dab17558_97936c4f","line":407,"range":{"start_line":407,"start_character":54,"end_line":407,"end_character":74},"in_reply_to":"1a122d0e_fc8319c9","updated":"2016-05-05 23:18:34.000000000","message":"Ugh. After the app call in send_put_req, which would require that we go looking for an iterator attribute on req.environ[\u0027wsgi.input\u0027].\n\nMaybe the better thing to do would be to have send_put_req call\n\n close_if_possible(req.environ[\u0027wsgi.input\u0027])\n\nand have FileLikeIter.close call\n\n close_if_possible(self.iterator)\n\nbefore setting self.iterator to None.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"c1d431ed5af979b4a8003af8b4e33e0f4abfe5a4","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            sink_req.params \u003d params"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # Set data source, content length and etag for the PUT request"},{"line_number":407,"context_line":"        sink_req.environ[\u0027wsgi.input\u0027] \u003d FileLikeIter(source_resp.app_iter)"},{"line_number":408,"context_line":"        sink_req.content_length \u003d source_resp.content_length"},{"line_number":409,"context_line":"        sink_req.etag \u003d source_resp.etag"},{"line_number":410,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"dab17558_def31f09","line":407,"range":{"start_line":407,"start_character":54,"end_line":407,"end_character":74},"in_reply_to":"dab17558_97936c4f","updated":"2016-05-06 20:30:12.000000000","message":"I chose the code change to handle_PUT and called close_if_possible after the call to send_put_req, let me know what you think...Thanks!","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        # Set data source, content length and etag for the PUT request"},{"line_number":407,"context_line":"        sink_req.environ[\u0027wsgi.input\u0027] \u003d FileLikeIter(source_resp.app_iter)"},{"line_number":408,"context_line":"        sink_req.content_length \u003d source_resp.content_length"},{"line_number":409,"context_line":"        sink_req.etag \u003d source_resp.etag"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        # We no longer need these headers"},{"line_number":412,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From\u0027, None)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_cd624316","line":409,"updated":"2016-04-22 23:21:47.000000000","message":"Wait, this doesn\u0027t prevent us from flattening large objects?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        # Set data source, content length and etag for the PUT request"},{"line_number":407,"context_line":"        sink_req.environ[\u0027wsgi.input\u0027] \u003d FileLikeIter(source_resp.app_iter)"},{"line_number":408,"context_line":"        sink_req.content_length \u003d source_resp.content_length"},{"line_number":409,"context_line":"        sink_req.etag \u003d source_resp.etag"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        # We no longer need these headers"},{"line_number":412,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From\u0027, None)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_ceae90e6","line":409,"in_reply_to":"1a122d0e_cd624316","updated":"2016-05-05 20:11:13.000000000","message":"this was kept from master, need to follow up on it.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1d15f6ce57f1b94683106cdf99f31f3915b03e6c","unresolved":false,"context_lines":[{"line_number":406,"context_line":"        # Set data source, content length and etag for the PUT request"},{"line_number":407,"context_line":"        sink_req.environ[\u0027wsgi.input\u0027] \u003d FileLikeIter(source_resp.app_iter)"},{"line_number":408,"context_line":"        sink_req.content_length \u003d source_resp.content_length"},{"line_number":409,"context_line":"        sink_req.etag \u003d source_resp.etag"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        # We no longer need these headers"},{"line_number":412,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From\u0027, None)"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab17558_5752a4de","line":409,"in_reply_to":"1a122d0e_ceae90e6","updated":"2016-05-05 23:18:34.000000000","message":"Yeah, I saw that too. Apparently it\u0027s fine; still not sure why though...","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From\u0027, None)"},{"line_number":413,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From-Account\u0027, None)"},{"line_number":414,"context_line":"        # If the copy request does not explicitly override content-type,"},{"line_number":415,"context_line":"        # use the one present in the source object."},{"line_number":416,"context_line":"        if not req.headers.get(\u0027content-type\u0027):"},{"line_number":417,"context_line":"            sink_req.headers[\u0027Content-Type\u0027] \u003d \\"},{"line_number":418,"context_line":"                source_resp.headers[\u0027Content-Type\u0027]"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_2dd657c3","line":415,"updated":"2016-04-22 23:21:47.000000000","message":"...unless X-Detect-Content-Type is set, in which case *both* of those will be ignored.\n\nThis makes for an inconsistency between fast-POST and POST-as-COPY; if .../c/foo.txt has content-type application/octet-stream and you do something like\n\n curl .../c/foo.txt -X POST -H x-detect-content-type:yes\n\nthen under POST-as-COPY, it\u0027ll get fixed to text/plain but under fast-POST, it won\u0027t do anything.\n\nLooks like on the parent commit, POST always ignored X-Detect-Content-Type.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From\u0027, None)"},{"line_number":413,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From-Account\u0027, None)"},{"line_number":414,"context_line":"        # If the copy request does not explicitly override content-type,"},{"line_number":415,"context_line":"        # use the one present in the source object."},{"line_number":416,"context_line":"        if not req.headers.get(\u0027content-type\u0027):"},{"line_number":417,"context_line":"            sink_req.headers[\u0027Content-Type\u0027] \u003d \\"},{"line_number":418,"context_line":"                source_resp.headers[\u0027Content-Type\u0027]"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_97ccb6bc","line":415,"in_reply_to":"1a122d0e_2dd657c3","updated":"2016-05-05 20:11:13.000000000","message":"I\u0027m confused by your statement, you said: \"Looks like on the parent commit, POST always ignored X-Detect-Content-Type\" (which I take it to mean on master), but I think there\u0027s actually an inconsistency (even on master) as you noted above.\n\nOn Master, Post-as-copy gets changed to a PUT, which eventually calls _update_content_type(), while fast-POST would not.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1d15f6ce57f1b94683106cdf99f31f3915b03e6c","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From\u0027, None)"},{"line_number":413,"context_line":"        sink_req.headers.pop(\u0027X-Copy-From-Account\u0027, None)"},{"line_number":414,"context_line":"        # If the copy request does not explicitly override content-type,"},{"line_number":415,"context_line":"        # use the one present in the source object."},{"line_number":416,"context_line":"        if not req.headers.get(\u0027content-type\u0027):"},{"line_number":417,"context_line":"            sink_req.headers[\u0027Content-Type\u0027] \u003d \\"},{"line_number":418,"context_line":"                source_resp.headers[\u0027Content-Type\u0027]"}],"source_content_type":"text/x-python","patch_set":37,"id":"dab17558_d71054ab","line":415,"in_reply_to":"1a122d0e_97ccb6bc","updated":"2016-05-05 23:18:34.000000000","message":"\u003e but I think there\u0027s actually an inconsistency (even on master) as you noted above\n\nBah, you\u0027re right. I must\u0027ve missed a proxy restart while I was testing it out before. Looks like we\u0027re bug-for-bug compatible, which is as it should be.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":421,"context_line":"            sink_req.headers.get(\u0027x-fresh-metadata\u0027, \u0027false\u0027))"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"        if fresh_meta_flag or \u0027swift.post_as_copy\u0027 in sink_req.environ:"},{"line_number":424,"context_line":"            # Post-as-copy: ignore new sysmeta, copy existing sysmeta"},{"line_number":425,"context_line":"            condition \u003d lambda k: is_sys_meta(\u0027object\u0027, k)"},{"line_number":426,"context_line":"            remove_items(sink_req.headers, condition)"},{"line_number":427,"context_line":"            copy_header_subset(source_resp, sink_req, condition)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_eda1ff47","line":424,"range":{"start_line":424,"start_character":35,"end_line":424,"end_character":46},"updated":"2016-04-22 23:21:47.000000000","message":"Do we have any idea where this new sysmeta would have come from? Users can\u0027t set it, so middleware, I guess?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fef7d9685e6e24960b5007e83dc098a703dbd3e","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    ?multipart-manifest\u003dget"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"If a request is sent Without the query parameter, an attempt will be made to"},{"line_number":112,"context_line":"copy the whole object but will fail if the object size is"},{"line_number":113,"context_line":"greater than 5GB."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_947d2aea","line":111,"range":{"start_line":111,"start_character":21,"end_line":111,"end_character":28},"updated":"2016-05-05 23:18:49.000000000","message":"s/Without/without/","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"607fab1eef339b9fc2edcd84a5a1e84ed10186bb","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    ?multipart-manifest\u003dget"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"If a request is sent Without the query parameter, an attempt will be made to"},{"line_number":112,"context_line":"copy the whole object but will fail if the object size is"},{"line_number":113,"context_line":"greater than 5GB."},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_05c5593b","line":111,"in_reply_to":"dab17558_947d2aea","updated":"2016-05-06 20:32:13.000000000","message":"Done","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fef7d9685e6e24960b5007e83dc098a703dbd3e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"set to True) in proxy server configuration. This has been moved to server side"},{"line_number":120,"context_line":"copy middleware."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"When ``object_post_as_copy`` is set to ``true``, an incoming POST request is"},{"line_number":123,"context_line":"morphed into a COPY request where source and destination objects are same."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"This feature was necessary because of a previous behavior where POSTS would"}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_40a3f89e","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":47},"updated":"2016-05-05 23:18:49.000000000","message":"We should call out that this is the current default behavior.","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"607fab1eef339b9fc2edcd84a5a1e84ed10186bb","unresolved":false,"context_lines":[{"line_number":119,"context_line":"set to True) in proxy server configuration. This has been moved to server side"},{"line_number":120,"context_line":"copy middleware."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"When ``object_post_as_copy`` is set to ``true``, an incoming POST request is"},{"line_number":123,"context_line":"morphed into a COPY request where source and destination objects are same."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"This feature was necessary because of a previous behavior where POSTS would"}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_65d6e5c6","line":122,"in_reply_to":"dab17558_40a3f89e","updated":"2016-05-06 20:32:13.000000000","message":"it is mentioned on the paragraph above, I\u0027ll make a mention here too","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fef7d9685e6e24960b5007e83dc098a703dbd3e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"morphed into a COPY request where source and destination objects are same."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"This feature was necessary because of a previous behavior where POSTS would"},{"line_number":126,"context_line":"update the metadata on the object but on the container, thus features like"},{"line_number":127,"context_line":"container sync would not work correctly. This is no longer the case and the"},{"line_number":128,"context_line":"plan is to deprecate this option. It is being kept now for backwards"},{"line_number":129,"context_line":"compatibility. At first chance, set ``object_post_as_copy`` to ``false``."}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_c0b528d1","line":126,"range":{"start_line":126,"start_character":54,"end_line":126,"end_character":69},"updated":"2016-05-05 23:18:49.000000000","message":"Full stop. \"As a result, features...\"","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fef7d9685e6e24960b5007e83dc098a703dbd3e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"morphed into a COPY request where source and destination objects are same."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"This feature was necessary because of a previous behavior where POSTS would"},{"line_number":126,"context_line":"update the metadata on the object but on the container, thus features like"},{"line_number":127,"context_line":"container sync would not work correctly. This is no longer the case and the"},{"line_number":128,"context_line":"plan is to deprecate this option. It is being kept now for backwards"},{"line_number":129,"context_line":"compatibility. At first chance, set ``object_post_as_copy`` to ``false``."}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_14513a63","line":126,"range":{"start_line":126,"start_character":34,"end_line":126,"end_character":40},"updated":"2016-05-05 23:18:49.000000000","message":"s/but on/but not on/","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"607fab1eef339b9fc2edcd84a5a1e84ed10186bb","unresolved":false,"context_lines":[{"line_number":123,"context_line":"morphed into a COPY request where source and destination objects are same."},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"This feature was necessary because of a previous behavior where POSTS would"},{"line_number":126,"context_line":"update the metadata on the object but on the container, thus features like"},{"line_number":127,"context_line":"container sync would not work correctly. This is no longer the case and the"},{"line_number":128,"context_line":"plan is to deprecate this option. It is being kept now for backwards"},{"line_number":129,"context_line":"compatibility. At first chance, set ``object_post_as_copy`` to ``false``."}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_a5860db7","line":126,"in_reply_to":"dab17558_c0b528d1","updated":"2016-05-06 20:32:13.000000000","message":"Done","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"3fef7d9685e6e24960b5007e83dc098a703dbd3e","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        req.path_info \u003d \u0027/%s/%s/%s/%s\u0027 % \\"},{"line_number":316,"context_line":"                        (ver, dest_account, dest_container, dest_object)"},{"line_number":317,"context_line":"        req.headers[\u0027Content-Length\u0027] \u003d 0"},{"line_number":318,"context_line":"        req.headers[\u0027X-Copy-From\u0027] \u003d quote(source)"},{"line_number":319,"context_line":"        del req.headers[\u0027Destination\u0027]"},{"line_number":320,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_f7a47809","line":318,"updated":"2016-05-05 23:18:49.000000000","message":"While testing, I saw some logs like\n\n May  4 02:51:39 saio proxy-server: - - 04/May/2016/02/51/39 COPY /v1/AUTH_test2/4c777e6c56884e1c86e146c457ea537a/b910d1a1c6084bdba0b6933f2d7fd95b HTTP/1.0 200 - Swift AUTH_tk7d0471c1f... - 6 - txea5646990875483ca287e-00572963bb - 0.0833 SSC x-copy-from:/4c777e6c56884e1c86e146c457ea537a/b910d1a1c6084bdba0b6933f2d7fd95b 1462330299.144371033 1462330299.227673054 0\n\n...which seems less than useful. Shouldn\u0027t that have Destination instead of X-Copy-From?","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"607fab1eef339b9fc2edcd84a5a1e84ed10186bb","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        req.path_info \u003d \u0027/%s/%s/%s/%s\u0027 % \\"},{"line_number":316,"context_line":"                        (ver, dest_account, dest_container, dest_object)"},{"line_number":317,"context_line":"        req.headers[\u0027Content-Length\u0027] \u003d 0"},{"line_number":318,"context_line":"        req.headers[\u0027X-Copy-From\u0027] \u003d quote(source)"},{"line_number":319,"context_line":"        del req.headers[\u0027Destination\u0027]"},{"line_number":320,"context_line":"        return self.handle_PUT(req, start_response)"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":38,"id":"dab17558_9ba08a92","line":318,"in_reply_to":"dab17558_f7a47809","updated":"2016-05-06 20:32:13.000000000","message":"the problem is that the path after the COPY verb in that log is also the destination. Changing to Destination would make the log look something like:\n\u0027*** COPY /v1/a/c *** Destination:/a/c ***\u0027\n\nI\u0027m not sure how to change the first path, any pointers?\n\nWe could also just remove that logging for COPY verb, but that\u0027s not helpful either...","commit_id":"ce085b561e6c58437e08fd32ebaac9f21e253632"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2620dd623f5e4a93b3ac4ba7f0a17a57d56cb686","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                                  content_type\u003d\u0027text/plain\u0027)(req.environ,"},{"line_number":378,"context_line":"                                                             start_response)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        if req.environ.get(\u0027swift.orig_req_method\u0027, req.method) !\u003d \u0027POST\u0027:"},{"line_number":381,"context_line":"            req.environ.setdefault(\u0027swift.log_info\u0027, []).append("},{"line_number":382,"context_line":"                \u0027x-copy-from:%s\u0027 % req.headers[\u0027X-Copy-From\u0027])"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        # Form the path of source object to be fetched"},{"line_number":385,"context_line":"        ver, acct, _rest \u003d req.split_path(2, 3, True)"}],"source_content_type":"text/x-python","patch_set":39,"id":"dab17558_c15fc070","line":382,"range":{"start_line":380,"start_character":0,"end_line":382,"end_character":62},"updated":"2016-05-06 20:59:46.000000000","message":"I think we maybe want something like\n\n        if req.environ.get(\u0027swift.orig_req_method\u0027, req.method) \u003d\u003d \u0027PUT\u0027:\n            req.environ.setdefault(\u0027swift.log_info\u0027, []).append(\n                \u0027x-copy-from:%s\u0027 % req.headers[\u0027X-Copy-From\u0027])\n        elif req.environ.get(\u0027swift.orig_req_method\u0027, req.method) \u003d\u003d \u0027COPY\u0027:\n            req.environ.setdefault(\u0027swift.log_info\u0027, []).append(\n                \u0027destination:%s\u0027 % req.path_info)\n\nhere, or something like that. Also, should we be including X-Copy-From-Account/Destination-Account in swift.log_info?","commit_id":"87088fd768866dabb620ad7098cb36825f5c88a1"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"c38f60bd23d036b645a0ca303396c7514872d7bf","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                                  content_type\u003d\u0027text/plain\u0027)(req.environ,"},{"line_number":378,"context_line":"                                                             start_response)"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"        if req.environ.get(\u0027swift.orig_req_method\u0027, req.method) !\u003d \u0027POST\u0027:"},{"line_number":381,"context_line":"            req.environ.setdefault(\u0027swift.log_info\u0027, []).append("},{"line_number":382,"context_line":"                \u0027x-copy-from:%s\u0027 % req.headers[\u0027X-Copy-From\u0027])"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        # Form the path of source object to be fetched"},{"line_number":385,"context_line":"        ver, acct, _rest \u003d req.split_path(2, 3, True)"}],"source_content_type":"text/x-python","patch_set":39,"id":"dab17558_877111e3","line":382,"range":{"start_line":380,"start_character":0,"end_line":382,"end_character":62},"in_reply_to":"dab17558_c15fc070","updated":"2016-05-09 17:37:41.000000000","message":"I had thought of a solution similar to what you are proposing. The issue is that the COPY logging doesn\u0027t become very useful anyway, because only the destination gets logged, never the source. Example:\n\n\nWith the PUT verb, the log looks something like:\nMay  9 17:20:04 server0 proxy-server: 127.0.0.1 127.0.0.1 09/May/2016/17/20/04 PUT /v1/a/c/o2 ... x-copy-from:/c/o ... 1462814404.353004932 1462814404.458142042 -\n\n\nIn the case of the COPY verb it would look something like:\nMay  9 17:20:04 server0 proxy-server: 127.0.0.1 127.0.0.1 09/May/2016/17/20/04 COPY /v1/a/c/o2 ... x-copy-from:/c/o2 ... 1462814404.353004932 1462814404.458142042 -\n\n\nSo I could change the proxy_loggin code to allow us to override the req_path, but that seems like over designing. Thoughts?\n\nCurrently my thinking is to log with self.logger, then I have complete control over what the log msg looks like.","commit_id":"87088fd768866dabb620ad7098cb36825f5c88a1"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"685d9742663286b30aefce9768d1602be13ee69e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"from swift.common.http import HTTP_MULTIPLE_CHOICES, HTTP_CREATED, \\"},{"line_number":143,"context_line":"    is_success"},{"line_number":144,"context_line":"from swift.common.constraints import check_account_format, \\"},{"line_number":145,"context_line":"    check_destination_header, check_copy_from_header, MAX_FILE_SIZE"},{"line_number":146,"context_line":"from swift.common.request_helpers import copy_header_subset, remove_items, \\"},{"line_number":147,"context_line":"    is_sys_meta, is_sys_or_user_meta"},{"line_number":148,"context_line":"from swift.common.wsgi import WSGIContext, make_subrequest"}],"source_content_type":"text/x-python","patch_set":40,"id":"dab17558_dee392d7","line":145,"range":{"start_line":145,"start_character":4,"end_line":145,"end_character":52},"updated":"2016-05-11 02:55:02.000000000","message":"The headers these constraints are based are COPY specific ones.. Which means they should also be moved into the middleware.","commit_id":"2dd96c191ae82cab17c86e6030e26a7a62cb1211"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"04dd073e91b7a44362e870df0f4353bf51a35f6c","unresolved":false,"context_lines":[{"line_number":142,"context_line":"from swift.common.http import HTTP_MULTIPLE_CHOICES, HTTP_CREATED, \\"},{"line_number":143,"context_line":"    is_success"},{"line_number":144,"context_line":"from swift.common.constraints import check_account_format, \\"},{"line_number":145,"context_line":"    check_destination_header, check_copy_from_header, MAX_FILE_SIZE"},{"line_number":146,"context_line":"from swift.common.request_helpers import copy_header_subset, remove_items, \\"},{"line_number":147,"context_line":"    is_sys_meta, is_sys_or_user_meta"},{"line_number":148,"context_line":"from swift.common.wsgi import WSGIContext, make_subrequest"}],"source_content_type":"text/x-python","patch_set":40,"id":"dab17558_92d1d125","line":145,"range":{"start_line":145,"start_character":4,"end_line":145,"end_character":52},"in_reply_to":"dab17558_a46bf8b5","updated":"2016-05-11 18:57:39.000000000","message":"Done","commit_id":"2dd96c191ae82cab17c86e6030e26a7a62cb1211"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0f3ca47fba4641c20564f288ed7550c1357f35d5","unresolved":false,"context_lines":[{"line_number":142,"context_line":"from swift.common.http import HTTP_MULTIPLE_CHOICES, HTTP_CREATED, \\"},{"line_number":143,"context_line":"    is_success"},{"line_number":144,"context_line":"from swift.common.constraints import check_account_format, \\"},{"line_number":145,"context_line":"    check_destination_header, check_copy_from_header, MAX_FILE_SIZE"},{"line_number":146,"context_line":"from swift.common.request_helpers import copy_header_subset, remove_items, \\"},{"line_number":147,"context_line":"    is_sys_meta, is_sys_or_user_meta"},{"line_number":148,"context_line":"from swift.common.wsgi import WSGIContext, make_subrequest"}],"source_content_type":"text/x-python","patch_set":40,"id":"dab17558_a46bf8b5","line":145,"range":{"start_line":145,"start_character":4,"end_line":145,"end_character":52},"in_reply_to":"dab17558_b5fdecb2","updated":"2016-05-11 16:36:37.000000000","message":"actually, they are not used in quotas anymore since we are also removing copy handling from them.","commit_id":"2dd96c191ae82cab17c86e6030e26a7a62cb1211"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af83ae78b7e34850319bf71c914681a5ceeb98c9","unresolved":false,"context_lines":[{"line_number":142,"context_line":"from swift.common.http import HTTP_MULTIPLE_CHOICES, HTTP_CREATED, \\"},{"line_number":143,"context_line":"    is_success"},{"line_number":144,"context_line":"from swift.common.constraints import check_account_format, \\"},{"line_number":145,"context_line":"    check_destination_header, check_copy_from_header, MAX_FILE_SIZE"},{"line_number":146,"context_line":"from swift.common.request_helpers import copy_header_subset, remove_items, \\"},{"line_number":147,"context_line":"    is_sys_meta, is_sys_or_user_meta"},{"line_number":148,"context_line":"from swift.common.wsgi import WSGIContext, make_subrequest"}],"source_content_type":"text/x-python","patch_set":40,"id":"dab17558_b5fdecb2","line":145,"range":{"start_line":145,"start_character":4,"end_line":145,"end_character":52},"in_reply_to":"dab17558_dee392d7","updated":"2016-05-11 15:32:54.000000000","message":"they are also used in account_quotas and container_quotas","commit_id":"2dd96c191ae82cab17c86e6030e26a7a62cb1211"}],"swift/common/middleware/versioned_writes.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"225842dd1ba15d10b89e1ec044335d3f28945f8a","unresolved":false,"context_lines":[{"line_number":565,"context_line":"            except HTTPException as error_response:"},{"line_number":566,"context_line":"                return error_response(env, start_response)"},{"line_number":567,"context_line":"        elif (obj and req.method in (\u0027PUT\u0027, \u0027DELETE\u0027) and"},{"line_number":568,"context_line":"                not req.environ.get(\u0027swift.post_as_copy\u0027)):"},{"line_number":569,"context_line":"            try:"},{"line_number":570,"context_line":"                return self.object_request("},{"line_number":571,"context_line":"                    req, api_version, account, container, obj,"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_59cf7255","line":568,"updated":"2016-04-07 21:11:58.000000000","message":"check for post_as_copy is needed here because objects don\u0027t get versioned on a POST.","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e4c83cba1cf93fb6670dc18dd856ae57ed53c287","unresolved":false,"context_lines":[{"line_number":496,"context_line":"        container_info \u003d get_container_info("},{"line_number":497,"context_line":"            req.environ, self.app)"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        if not container_info:"},{"line_number":500,"context_line":"            return self.app"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        # To maintain backwards compatibility, container version"},{"line_number":503,"context_line":"        # location could be stored as sysmeta or not, need to check both."}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_ba72a00f","line":500,"range":{"start_line":499,"start_character":8,"end_line":500,"end_character":27},"updated":"2016-04-22 19:05:15.000000000","message":"I think this can be removed now, too. get_container_info should always return something truthy.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":497,"context_line":"            req.environ, self.app)"},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"        if not container_info:"},{"line_number":500,"context_line":"            return self.app"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        # To maintain backwards compatibility, container version"},{"line_number":503,"context_line":"        # location could be stored as sysmeta or not, need to check both."}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_7a49ff8d","line":500,"in_reply_to":"1a122d0e_ba72a00f","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"15c81d77d7348702f2143185b6e811e5bd7102b5","unresolved":false,"context_lines":[{"line_number":532,"context_line":"            return self.app"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    def __call__(self, env, start_response):"},{"line_number":535,"context_line":"        # making a duplicate, because if this is a COPY request, we will"},{"line_number":536,"context_line":"        # modify the PATH_INFO to find out if the \u0027Destination\u0027 is in a"},{"line_number":537,"context_line":"        # versioned container"},{"line_number":538,"context_line":"        req \u003d Request(env.copy())"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_a1755098","line":535,"updated":"2016-05-03 23:59:59.000000000","message":"Is this comment still relevant? Do we still need to copy the environment?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":532,"context_line":"            return self.app"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    def __call__(self, env, start_response):"},{"line_number":535,"context_line":"        # making a duplicate, because if this is a COPY request, we will"},{"line_number":536,"context_line":"        # modify the PATH_INFO to find out if the \u0027Destination\u0027 is in a"},{"line_number":537,"context_line":"        # versioned container"},{"line_number":538,"context_line":"        req \u003d Request(env.copy())"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_8522c0a1","line":535,"in_reply_to":"1a122d0e_a1755098","updated":"2016-05-05 20:11:13.000000000","message":"not needed anymore as we got rid of COPY","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"}],"swift/common/swob.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e4c83cba1cf93fb6670dc18dd856ae57ed53c287","unresolved":false,"context_lines":[{"line_number":889,"context_line":"    str_params \u003d params"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    @params.setter"},{"line_number":892,"context_line":"    def params(self, param_pairs):"},{"line_number":893,"context_line":"        self._params_cache \u003d None"},{"line_number":894,"context_line":"        self.query_string \u003d urllib.parse.urlencode(param_pairs)"},{"line_number":895,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_dae79c3e","line":892,"updated":"2016-04-22 19:05:15.000000000","message":"If we\u0027re going to make params settable, I think I\u0027d prefer we go all-in and do something like HeaderEnvironProxy. (Although, maybe it\u0027d be better as a follow-up?) As it is, we\u0027ve got:\n\n \u003e\u003e\u003e r\u003dswift.common.swob.Request.blank(\u0027/\u0027)\n \u003e\u003e\u003e r.params, r.environ[\u0027QUERY_STRING\u0027]\n ({}, \u0027\u0027)\n \n \u003e\u003e\u003e r.params \u003d {\u0027limit\u0027: 10, \u0027reverse\u0027: \u0027on\u0027} # works\n \u003e\u003e\u003e r.params, r.environ[\u0027QUERY_STRING\u0027]\n ({\u0027limit\u0027: \u002710\u0027, \u0027reverse\u0027: \u0027on\u0027}, \u0027limit\u003d10\u0026reverse\u003don\u0027)\n \n \u003e\u003e\u003e r.params[\u0027limit\u0027] \u003d 100 # not so much\n \u003e\u003e\u003e r.params, r.environ[\u0027QUERY_STRING\u0027]\n ({\u0027limit\u0027: 100, \u0027reverse\u0027: \u0027on\u0027}, \u0027limit\u003d10\u0026reverse\u003don\u0027)\n\nI just feel like once I get used to the fact that I can do the first one, I\u0027m going to expect the second one to work even though it doesn\u0027t. And working around it is just clunky:\n\n r.params \u003d {(k, 100 if k \u003d\u003d \u0027limit\u0027 else v)\n             for k, v in r.params.items()}","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":889,"context_line":"    str_params \u003d params"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    @params.setter"},{"line_number":892,"context_line":"    def params(self, param_pairs):"},{"line_number":893,"context_line":"        self._params_cache \u003d None"},{"line_number":894,"context_line":"        self.query_string \u003d urllib.parse.urlencode(param_pairs)"},{"line_number":895,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_653684b5","line":892,"in_reply_to":"1a122d0e_d00498c7","updated":"2016-05-05 20:11:13.000000000","message":"wrote it down to fix on follow-up patch","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":889,"context_line":"    str_params \u003d params"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    @params.setter"},{"line_number":892,"context_line":"    def params(self, param_pairs):"},{"line_number":893,"context_line":"        self._params_cache \u003d None"},{"line_number":894,"context_line":"        self.query_string \u003d urllib.parse.urlencode(param_pairs)"},{"line_number":895,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_d00498c7","line":892,"in_reply_to":"1a122d0e_dae79c3e","updated":"2016-04-22 23:21:47.000000000","message":"Gah! I didn\u0027t even get it right!\n\n r.params \u003d {k: 100 if k \u003d\u003d \u0027limit\u0027 else v\n             for k, v in r.params.items()}\n\nor\n\n r.params \u003d [(k, 100 if k \u003d\u003d \u0027limit\u0027 else v)\n             for k, v in r.params.items()]","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"}],"swift/common/wsgi.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"974127862a1344f8af4b0358c3c17b5b85941357","unresolved":false,"context_lines":[{"line_number":1100,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1101,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1102,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1103,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.orig_req_method\u0027, \u0027swift.log_info\u0027):"},{"line_number":1104,"context_line":"        if name in env:"},{"line_number":1105,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1106,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":41,"id":"dab17558_e9c94b27","line":1103,"range":{"start_line":1103,"start_character":59,"end_line":1103,"end_character":73},"updated":"2016-05-11 21:38:49.000000000","message":"Is this still needed? Maybe not a bad idea, anyway...","commit_id":"46d61a4dcd9a5d9157625c06d6fe7d916e80c3d2"}],"swift/proxy/controllers/obj.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            req.headers[\u0027X-Copy-From\u0027] \u003d quote(\u0027/%s/%s\u0027 % (self.container_name,"},{"line_number":236,"context_line":"                                               self.object_name))"},{"line_number":237,"context_line":"            req.environ[\u0027swift.post_as_copy\u0027] \u003d True"},{"line_number":238,"context_line":"            req.environ[\u0027swift_versioned_copy\u0027] \u003d True"},{"line_number":239,"context_line":"            resp \u003d self.PUT(req)"},{"line_number":240,"context_line":"            # Older editions returned 202 Accepted on object POSTs, so we\u0027ll"},{"line_number":241,"context_line":"            # convert any 201 Created responses to that for compatibility with"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_38d3383a","side":"PARENT","line":238,"range":{"start_line":238,"start_character":25,"end_line":238,"end_character":45},"updated":"2016-04-22 23:21:47.000000000","message":"Looks like this used to be present as a recursion guard, is that right?\n\nAt any rate, this seems to have been the only reference to it. Seems fine to get rid of it.","commit_id":"72372c1464d1aae4a9b5de5ef6a3689fddf168cc"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            req.headers[\u0027X-Copy-From\u0027] \u003d quote(\u0027/%s/%s\u0027 % (self.container_name,"},{"line_number":236,"context_line":"                                               self.object_name))"},{"line_number":237,"context_line":"            req.environ[\u0027swift.post_as_copy\u0027] \u003d True"},{"line_number":238,"context_line":"            req.environ[\u0027swift_versioned_copy\u0027] \u003d True"},{"line_number":239,"context_line":"            resp \u003d self.PUT(req)"},{"line_number":240,"context_line":"            # Older editions returned 202 Accepted on object POSTs, so we\u0027ll"},{"line_number":241,"context_line":"            # convert any 201 Created responses to that for compatibility with"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_31a3ceb3","side":"PARENT","line":238,"range":{"start_line":238,"start_character":25,"end_line":238,"end_character":45},"in_reply_to":"1a122d0e_38d3383a","updated":"2016-05-05 20:11:13.000000000","message":"correct, this env. was used before versioned writes was pulled out to middleware and this was left out here as a mistake","commit_id":"72372c1464d1aae4a9b5de5ef6a3689fddf168cc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":817,"context_line":"            req, len(nodes), container_partition, containers)"},{"line_number":818,"context_line":"        return self._delete_object(req, obj_ring, partition, headers)"},{"line_number":819,"context_line":""},{"line_number":820,"context_line":"    def _reroute(self, policy):"},{"line_number":821,"context_line":"        \"\"\""},{"line_number":822,"context_line":"        For COPY requests we need to make sure the controller instance the"},{"line_number":823,"context_line":"        request is routed through is the correct type for the policy."}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_3df68af9","side":"PARENT","line":820,"updated":"2016-04-22 23:21:47.000000000","message":"God yes. That felt stupid.","commit_id":"72372c1464d1aae4a9b5de5ef6a3689fddf168cc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e9a376289d838eb84894f70c7e6b210a1b83fb1a","unresolved":false,"context_lines":[{"line_number":584,"context_line":"        self._update_x_timestamp(req)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"        reader \u003d req.environ[\u0027wsgi.input\u0027].read"},{"line_number":587,"context_line":"        data_source \u003d iter(lambda: reader(self.app.client_chunk_size), \u0027\u0027)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        # check if object is set to be automatically deleted (i.e. expired)"},{"line_number":590,"context_line":"        req, delete_at_container, delete_at_part, \\"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_4e446e1a","line":587,"updated":"2016-04-22 23:21:47.000000000","message":"No more ChunkReadErrors?","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":584,"context_line":"        self._update_x_timestamp(req)"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"        reader \u003d req.environ[\u0027wsgi.input\u0027].read"},{"line_number":587,"context_line":"        data_source \u003d iter(lambda: reader(self.app.client_chunk_size), \u0027\u0027)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"        # check if object is set to be automatically deleted (i.e. expired)"},{"line_number":590,"context_line":"        req, delete_at_container, delete_at_part, \\"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_8430cbea","line":587,"in_reply_to":"1a122d0e_4e446e1a","updated":"2016-05-05 20:11:13.000000000","message":"Done. This was a mistake in rebasing...Also updated tests to mock IOError instead of ChunkReadError","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"}],"swift/proxy/server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e4c83cba1cf93fb6670dc18dd856ae57ed53c287","unresolved":false,"context_lines":[{"line_number":400,"context_line":"                else:"},{"line_number":401,"context_line":"                    # Response indicates denial, but we might delay the denial"},{"line_number":402,"context_line":"                    # and recheck later. If not delayed, return the error now."},{"line_number":403,"context_line":"                    if not getattr(handler, \u0027delay_denial\u0027, None) and resp:"},{"line_number":404,"context_line":"                        return resp"},{"line_number":405,"context_line":"            # Save off original request method (GET, POST, etc.) in case it"},{"line_number":406,"context_line":"            # gets mutated during handling.  This way logging can display the"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_7a77683b","line":403,"range":{"start_line":403,"start_character":65,"end_line":403,"end_character":74},"updated":"2016-04-22 19:05:15.000000000","message":"I don\u0027t think this is actually necessary.","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":400,"context_line":"                else:"},{"line_number":401,"context_line":"                    # Response indicates denial, but we might delay the denial"},{"line_number":402,"context_line":"                    # and recheck later. If not delayed, return the error now."},{"line_number":403,"context_line":"                    if not getattr(handler, \u0027delay_denial\u0027, None) and resp:"},{"line_number":404,"context_line":"                        return resp"},{"line_number":405,"context_line":"            # Save off original request method (GET, POST, etc.) in case it"},{"line_number":406,"context_line":"            # gets mutated during handling.  This way logging can display the"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_9018bc1f","line":403,"range":{"start_line":403,"start_character":65,"end_line":403,"end_character":74},"in_reply_to":"1a122d0e_7a77683b","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e4c83cba1cf93fb6670dc18dd856ae57ed53c287","unresolved":false,"context_lines":[{"line_number":407,"context_line":"            # method the client actually sent."},{"line_number":408,"context_line":"            # If server side copy middleware has set this, do not overwrite."},{"line_number":409,"context_line":"            if not req.environ.get(\u0027swift.orig_req_method\u0027, None):"},{"line_number":410,"context_line":"                req.environ[\u0027swift.orig_req_method\u0027] \u003d req.method"},{"line_number":411,"context_line":"            try:"},{"line_number":412,"context_line":"                if old_authorize:"},{"line_number":413,"context_line":"                    req.environ.pop(\u0027swift.authorize\u0027, None)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_fadff809","line":410,"updated":"2016-04-22 19:05:15.000000000","message":"Maybe better?\n\n req.environ.setdefault(\u0027swift.orig_req_method\u0027, req.method)","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"829c45634d9ec21088ca6919483f7384bdced7ab","unresolved":false,"context_lines":[{"line_number":407,"context_line":"            # method the client actually sent."},{"line_number":408,"context_line":"            # If server side copy middleware has set this, do not overwrite."},{"line_number":409,"context_line":"            if not req.environ.get(\u0027swift.orig_req_method\u0027, None):"},{"line_number":410,"context_line":"                req.environ[\u0027swift.orig_req_method\u0027] \u003d req.method"},{"line_number":411,"context_line":"            try:"},{"line_number":412,"context_line":"                if old_authorize:"},{"line_number":413,"context_line":"                    req.environ.pop(\u0027swift.authorize\u0027, None)"}],"source_content_type":"text/x-python","patch_set":37,"id":"1a122d0e_b093384e","line":410,"in_reply_to":"1a122d0e_fadff809","updated":"2016-05-05 20:11:13.000000000","message":"Done","commit_id":"ebeefc79c1e40984ee2797d9026b111d6f377a30"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"685d9742663286b30aefce9768d1602be13ee69e","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    # Put server_side_copy before dlo, slo and versioned_writes"},{"line_number":73,"context_line":"    {\u0027name\u0027: \u0027server_side_copy\u0027, \u0027after_fn\u0027: lambda _junk: ["},{"line_number":74,"context_line":"        \u0027staticweb\u0027, \u0027tempauth\u0027, \u0027keystoneauth\u0027,"},{"line_number":75,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]}]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class Application(object):"}],"source_content_type":"text/x-python","patch_set":40,"id":"dab17558_b95348e1","line":75,"updated":"2016-05-11 02:55:02.000000000","message":"Do we have to explicitly say that slo\u0027s also have to be after server_side_copy.. because COPY need to be slo aware too?","commit_id":"2dd96c191ae82cab17c86e6030e26a7a62cb1211"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"af83ae78b7e34850319bf71c914681a5ceeb98c9","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    # Put server_side_copy before dlo, slo and versioned_writes"},{"line_number":73,"context_line":"    {\u0027name\u0027: \u0027server_side_copy\u0027, \u0027after_fn\u0027: lambda _junk: ["},{"line_number":74,"context_line":"        \u0027staticweb\u0027, \u0027tempauth\u0027, \u0027keystoneauth\u0027,"},{"line_number":75,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]}]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class Application(object):"}],"source_content_type":"text/x-python","patch_set":40,"id":"dab17558_35b8dc74","line":75,"in_reply_to":"dab17558_b95348e1","updated":"2016-05-11 15:32:54.000000000","message":"slo is not auto inserted so we cannot specify where it should be (other than in docs).\n\nwe can only specify what other middlewares copy should come after, and copy will be placed right after the last in that list, so unless slo is manually put ahead of staticweb then we\u0027re ok.","commit_id":"2dd96c191ae82cab17c86e6030e26a7a62cb1211"}],"test/unit/common/middleware/test_server_side_copy.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"cc5bc8623739bdc95aa8b7f53d13db6e0cc68874","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        })(self.app)"},{"line_number":41,"context_line":"        self.ssc.logger \u003d self.app.logger"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def call_app(self, req, app\u003dNone, expect_exception\u003dFalse):"},{"line_number":44,"context_line":"        if app is None:"},{"line_number":45,"context_line":"            app \u003d self.app"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_77b36798","line":43,"updated":"2016-04-07 18:51:54.000000000","message":"It would be good to add the authorize callback setup here like we have in test_versioned_writes, then make assertions about the number of authorize calls made by a COPY.","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"489952330c6c507258f5694d10e610116ea71b2a","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        })(self.app)"},{"line_number":41,"context_line":"        self.ssc.logger \u003d self.app.logger"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def call_app(self, req, app\u003dNone, expect_exception\u003dFalse):"},{"line_number":44,"context_line":"        if app is None:"},{"line_number":45,"context_line":"            app \u003d self.app"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"faac7902_7577e202","line":43,"in_reply_to":"9a061dce_77b36798","updated":"2016-05-05 20:11:27.000000000","message":"Done","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"cc5bc8623739bdc95aa8b7f53d13db6e0cc68874","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        try:"},{"line_number":368,"context_line":"            status, headers, body \u003d self.call_ssc(req)"},{"line_number":369,"context_line":"        except HTTPException as resp:"},{"line_number":370,"context_line":"            self.assertEqual(\"412 Precondition Failed\", str(resp))"},{"line_number":371,"context_line":"        else:"},{"line_number":372,"context_line":"            self.fail(\"Expecting HTTPException.\")"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_777a47be","line":370,"updated":"2016-04-07 18:51:54.000000000","message":"I\u0027m curious why in some cases the middleware is raising exception while in others it returns a response for 412\u0027s?\n\nCompare with line 462 test_COPY_no_destination_header\n\nDo we have a \"best practice\" such as always catching HTTPExceptions before they rise from the middleware? Or do we just rely on someone to catch them (catch_errors ultimately I guess)?","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"489952330c6c507258f5694d10e610116ea71b2a","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        try:"},{"line_number":368,"context_line":"            status, headers, body \u003d self.call_ssc(req)"},{"line_number":369,"context_line":"        except HTTPException as resp:"},{"line_number":370,"context_line":"            self.assertEqual(\"412 Precondition Failed\", str(resp))"},{"line_number":371,"context_line":"        else:"},{"line_number":372,"context_line":"            self.fail(\"Expecting HTTPException.\")"},{"line_number":373,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1a122d0e_44c4f390","line":370,"in_reply_to":"9a061dce_777a47be","updated":"2016-05-05 20:11:27.000000000","message":"Yes, I noticed this same issue when fixing copies and quotas. I like the idea of a \"best practice\" guide...","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"}],"test/unit/common/middleware/test_versioned_writes.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"225842dd1ba15d10b89e1ec044335d3f28945f8a","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":260,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def test_put_object_post_as_copy(self):"},{"line_number":263,"context_line":"        # PUTs due to a post-as-copy should NOT cause a versioning op"},{"line_number":264,"context_line":"        self.app.register("},{"line_number":265,"context_line":"            \u0027PUT\u0027, \u0027/v1/a/c/o\u0027, swob.HTTPCreated, {}, \u0027passed\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_79051644","line":262,"updated":"2016-04-07 21:11:58.000000000","message":"nice!","commit_id":"996d38a0441e56b452491533fd246760ad1adc2e"}],"test/unit/proxy/controllers/test_obj.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"54ce93344bc2806422e55ef874fb85fc8879bb04","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        self.assertEqual(resp.status_int, 201)"},{"line_number":1497,"context_line":"        self.assertTrue(response_time \u003c response_sleep)"},{"line_number":1498,"context_line":""},{"line_number":1499,"context_line":"    def test_COPY_with_ranges(self):"},{"line_number":1500,"context_line":"        req \u003d swift.common.swob.Request.blank("},{"line_number":1501,"context_line":"            \u0027/v1/a/c/o\u0027, method\u003d\u0027COPY\u0027,"},{"line_number":1502,"context_line":"            headers\u003d{\u0027Destination\u0027: \u0027c1/o\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_d91dea62","side":"PARENT","line":1499,"updated":"2015-09-07 17:02:02.000000000","message":"where did this test get moved?","commit_id":"eb62f1b3796e615ed4c25ec97f43d470c127bfab"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"5b1f4801c5b2177ad0b2cfe02e39a790c7f080cb","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        self.assertEqual(resp.status_int, 201)"},{"line_number":1497,"context_line":"        self.assertTrue(response_time \u003c response_sleep)"},{"line_number":1498,"context_line":""},{"line_number":1499,"context_line":"    def test_COPY_with_ranges(self):"},{"line_number":1500,"context_line":"        req \u003d swift.common.swob.Request.blank("},{"line_number":1501,"context_line":"            \u0027/v1/a/c/o\u0027, method\u003d\u0027COPY\u0027,"},{"line_number":1502,"context_line":"            headers\u003d{\u0027Destination\u0027: \u0027c1/o\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_e4c83524","side":"PARENT","line":1499,"in_reply_to":"da20952f_d91dea62","updated":"2015-09-08 04:39:42.000000000","message":"This test was added recently. Thanks for noticing (and fixing it).","commit_id":"eb62f1b3796e615ed4c25ec97f43d470c127bfab"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"6c3c1ed5eaa84acd0c75acc2f8e3851f28f78079","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        self.assertEqual(resp.status_int, 201)"},{"line_number":1497,"context_line":"        self.assertTrue(response_time \u003c response_sleep)"},{"line_number":1498,"context_line":""},{"line_number":1499,"context_line":"    def test_COPY_with_ranges(self):"},{"line_number":1500,"context_line":"        req \u003d swift.common.swob.Request.blank("},{"line_number":1501,"context_line":"            \u0027/v1/a/c/o\u0027, method\u003d\u0027COPY\u0027,"},{"line_number":1502,"context_line":"            headers\u003d{\u0027Destination\u0027: \u0027c1/o\u0027,"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba8a016a_e96fafc1","side":"PARENT","line":1499,"in_reply_to":"da20952f_e4c83524","updated":"2015-11-20 02:38:09.000000000","message":"Done by acoles\u0027s patch set 16","commit_id":"eb62f1b3796e615ed4c25ec97f43d470c127bfab"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"54ce93344bc2806422e55ef874fb85fc8879bb04","unresolved":false,"context_lines":[{"line_number":3164,"context_line":"            res \u003d req.get_response(self.app)"},{"line_number":3165,"context_line":"            self.assertEqual(res.status_int, 400)"},{"line_number":3166,"context_line":""},{"line_number":3167,"context_line":"        def test_POST_meta_count(self):"},{"line_number":3168,"context_line":"            with save_globals():"},{"line_number":3169,"context_line":"                limit \u003d constraints.MAX_META_COUNT"},{"line_number":3170,"context_line":"                headers \u003d dict("}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_aa60d201","line":3167,"updated":"2015-09-07 17:02:02.000000000","message":"looks like a bunch of stuff got over indented here","commit_id":"fefd1e387e914391447a9b7e73045024916b8a1b"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"6c3c1ed5eaa84acd0c75acc2f8e3851f28f78079","unresolved":false,"context_lines":[{"line_number":3164,"context_line":"            res \u003d req.get_response(self.app)"},{"line_number":3165,"context_line":"            self.assertEqual(res.status_int, 400)"},{"line_number":3166,"context_line":""},{"line_number":3167,"context_line":"        def test_POST_meta_count(self):"},{"line_number":3168,"context_line":"            with save_globals():"},{"line_number":3169,"context_line":"                limit \u003d constraints.MAX_META_COUNT"},{"line_number":3170,"context_line":"                headers \u003d dict("}],"source_content_type":"text/x-python","patch_set":15,"id":"ba8a016a_c91e6b5e","line":3167,"in_reply_to":"da20952f_aa60d201","updated":"2015-11-20 02:38:09.000000000","message":"Done by acoles\u0027s patch set 16","commit_id":"fefd1e387e914391447a9b7e73045024916b8a1b"}]}
