)]}'
{"swift/common/constraints.py":[{"author":{"_account_id":995,"name":"David Goetz","email":"david.goetz@rackspace.com","username":"david-goetz"},"change_message_id":"d82fe596cf7c12c7d0eeec394c3b9617cb2b05a6","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    for key, value in req.headers.iteritems():"},{"line_number":81,"context_line":"        if isinstance(value, basestring) and len(value) \u003e MAX_HEADER_SIZE:"},{"line_number":82,"context_line":"            return HTTPBadRequest(body\u003d\u0027Header Line Too Long: %s\u0027 % key,"},{"line_number":83,"context_line":"                                  request\u003dreq, content_type\u003d\u0027text/plain\u0027)"},{"line_number":84,"context_line":"        if not key.lower().startswith(prefix):"},{"line_number":85,"context_line":"            continue"},{"line_number":86,"context_line":"        key \u003d key[len(prefix):]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAQn%2F%2F0bo%3D","line":83,"updated":"2013-07-22 18:29:37.000000000","message":"not that big of a deal but restricting the key for the message might be a good idea:\n\n body\u003d\u0027Header Line Too Long: %s\u0027 % key[:MAX_META_NAME_LENGTH], \n\nAlso- was the purpose of this commit to restrict the size of user metadata (x-object-meta-*)? If so it would probably be better to add the key below:\n\nelif len(value) \u003e MAX_META_VALUE_LENGTH:\n            return HTTPBadRequest(\n                body\u003d\u0027Metadata value too long; max %d\u0027 % MAX_META_VALUE_LENGTH,\n                request\u003dreq, content_type\u003d\u0027text/plain\u0027)\n\nThis top level check is basically a sanity check on all headers- I can\u0027t remember exactly why I was worried about it because eventlet\u0027s wsgi restricts headers too but this check was there basically to prevent abuse so the helpful error message might be better served below in the user section. If you\u0027d rather leave it where you put it or want it in both places i don\u0027t have a problem either choice.","commit_id":"d730e51fa4065f841a603fda05e2eacca88b1883"}]}
