)]}'
{"tempest/common/compute.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"a896f2ac9935c5c60bdffd7c1eddf4b278d0e721","unresolved":false,"context_lines":[{"line_number":402,"context_line":"        # so use it if present"},{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        # Add / prefix to provide correct request format, so novnc server can response correctly"},{"line_number":406,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":407,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":408,"context_line":"        # Add port only if we have one specified"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_c518f876","line":405,"updated":"2020-04-06 18:44:41.000000000","message":"pep8: E501 line too long (96 \u003e 79 characters)","commit_id":"0006efeeb30bc89e9702e2c64f335ca45d3b34ab"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"a1283dc21b4dcf54bebee348cd09b3c2703774a9","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        # Add / prefix to provide correct request format"},{"line_number":406,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":407,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":408,"context_line":"        # Add port only if we have one specified"},{"line_number":409,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_83cf0356","line":406,"updated":"2020-04-07 03:33:40.000000000","message":"I am curious why it works before?","commit_id":"36799435d6cef711b873c2f825bb04d3ab1487a9"},{"author":{"_account_id":31707,"name":"Jason Li","email":"dl2017@att.com","username":"jason2020"},"change_message_id":"ce4a43071ecc4b953357f169df071f0c8e3236ab","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        # Add / prefix to provide correct request format"},{"line_number":406,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":407,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":408,"context_line":"        # Add port only if we have one specified"},{"line_number":409,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_f60158b1","line":406,"in_reply_to":"df33271e_1b918547","updated":"2020-04-07 19:33:59.000000000","message":"updated by addressing the /websockify path. thanks Doug.","commit_id":"36799435d6cef711b873c2f825bb04d3ab1487a9"},{"author":{"_account_id":31707,"name":"Jason Li","email":"dl2017@att.com","username":"jason2020"},"change_message_id":"0482cc1a3da551a9922996104049864bf9f4ab11","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        # Add / prefix to provide correct request format"},{"line_number":406,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":407,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":408,"context_line":"        # Add port only if we have one specified"},{"line_number":409,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_8c0722ca","line":406,"in_reply_to":"df33271e_25739182","updated":"2020-04-07 15:15:37.000000000","message":"This is not Dev stack environment. It is in our production environment. Our production environment is deployed using k8s cluster and the noVNC endpoint is accessed using ingress, which needs the request to follow a more strict http request format. The / prefix is needed to meet that requirement.\n\nThe request before change is \nGET ?token\u003ddc9c5489-ebe9-4bf4-9e99-404fd404420f HTTP/1.1\nThe request format after change is:\nGET /?token\u003ddc9c5489-ebe9-4bf4-9e99-404fd404420f HTTP/1.1\nAfter change, the request format is more strictly comply to http request format and able to go through.\n\nThe TCs were in blacklist before the change due to \"HTTP/1.1 400 Bad Request\" error. After the change, TCs pass  successfully.","commit_id":"36799435d6cef711b873c2f825bb04d3ab1487a9"},{"author":{"_account_id":17887,"name":"Doug Schveninger","email":"ds6901@att.com","username":"Doug.Schveninger"},"change_message_id":"bb9e98c3426b765ad2e1cb67e64a5ecba24fd435","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        # Add / prefix to provide correct request format"},{"line_number":406,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":407,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":408,"context_line":"        # Add port only if we have one specified"},{"line_number":409,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_25739182","line":406,"in_reply_to":"df33271e_83cf0356","updated":"2020-04-07 13:02:06.000000000","message":"My guess is that in DEV stack it is using the else when assigning path variable and others deployment are using qparams[\u0027path\u0027][0].\n\nThat is a guess by looking at the code.\n\nWith that said I would say that the path should be corrected not the reqdata, but please debug this and prove my guess.\n\nIf the else on path is set the value will be \n\nGET //websockify HTTP/1.1\\r\\n\u0027 \n\nand that looks wrong\n\nformat requirements from here https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages","commit_id":"36799435d6cef711b873c2f825bb04d3ab1487a9"},{"author":{"_account_id":31707,"name":"Jason Li","email":"dl2017@att.com","username":"jason2020"},"change_message_id":"0482cc1a3da551a9922996104049864bf9f4ab11","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        # Add / prefix to provide correct request format"},{"line_number":406,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":407,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":408,"context_line":"        # Add port only if we have one specified"},{"line_number":409,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_acfe6602","line":406,"in_reply_to":"df33271e_83cf0356","updated":"2020-04-07 15:15:37.000000000","message":"Our production environment is deployed using k8s cluster now and the noVNC endpoint is accessed using ingress, which needs the request to follow a more strict http request format. The / prefix is needed to meet that requirement.","commit_id":"36799435d6cef711b873c2f825bb04d3ab1487a9"},{"author":{"_account_id":17887,"name":"Doug Schveninger","email":"ds6901@att.com","username":"Doug.Schveninger"},"change_message_id":"68adaeac772c60abdc92d167db08c28e251702a0","unresolved":false,"context_lines":[{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        # Add / prefix to provide correct request format"},{"line_number":406,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":407,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":408,"context_line":"        # Add port only if we have one specified"},{"line_number":409,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df33271e_1b918547","line":406,"in_reply_to":"df33271e_acfe6602","updated":"2020-04-07 18:59:50.000000000","message":"My point is that reqdata can be either \nGET //websockify HTTP/1.1\\r\\n\nor\n\u0027GET /{value from path} HTTP/1.1\\r\\n\u0027\n\nthis value is invalid to my knowledge and caused by you path set\nGET //websockify HTTP/1.1\\r\\n","commit_id":"36799435d6cef711b873c2f825bb04d3ab1487a9"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"1c68eca5380f23c062eccc60efa3a451e9176012","unresolved":false,"context_lines":[{"line_number":402,"context_line":"        # so use it if present"},{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        if \u0027path\u0027 in qparams:"},{"line_number":406,"context_line":"            # Add / prefix to provide correct request format"},{"line_number":407,"context_line":"            # updated request format: GET /?token\u003dxxx HTTP/1.1"},{"line_number":408,"context_line":"            reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":409,"context_line":"        else:"},{"line_number":410,"context_line":"            # /Websockify path stays the same"},{"line_number":411,"context_line":"            # it already has / prefix"},{"line_number":412,"context_line":"            reqdata \u003d \u0027GET %s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":413,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":414,"context_line":"        # Add port only if we have one specified"},{"line_number":415,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_2954fac9","line":412,"range":{"start_line":405,"start_character":0,"end_line":412,"end_character":50},"updated":"2020-04-08 00:23:34.000000000","message":"How about lstrip \"/\" from path then adding one \"/\" for path?","commit_id":"312b5f5686515e4dd92d0fec87e408d9cb73dc8b"},{"author":{"_account_id":31707,"name":"Jason Li","email":"dl2017@att.com","username":"jason2020"},"change_message_id":"032d1c60c842787920487153dd5d423535fb78cb","unresolved":false,"context_lines":[{"line_number":402,"context_line":"        # so use it if present"},{"line_number":403,"context_line":"        qparams \u003d urlparse.parse_qs(url.query)"},{"line_number":404,"context_line":"        path \u003d qparams[\u0027path\u0027][0] if \u0027path\u0027 in qparams else \u0027/websockify\u0027"},{"line_number":405,"context_line":"        if \u0027path\u0027 in qparams:"},{"line_number":406,"context_line":"            # Add / prefix to provide correct request format"},{"line_number":407,"context_line":"            # updated request format: GET /?token\u003dxxx HTTP/1.1"},{"line_number":408,"context_line":"            reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":409,"context_line":"        else:"},{"line_number":410,"context_line":"            # /Websockify path stays the same"},{"line_number":411,"context_line":"            # it already has / prefix"},{"line_number":412,"context_line":"            reqdata \u003d \u0027GET %s HTTP/1.1\\r\\n\u0027 % path"},{"line_number":413,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":414,"context_line":"        # Add port only if we have one specified"},{"line_number":415,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df33271e_c8fd763b","line":412,"range":{"start_line":405,"start_character":0,"end_line":412,"end_character":50},"in_reply_to":"df33271e_2954fac9","updated":"2020-04-08 14:10:13.000000000","message":"good point! this makes code much clean. thanks zhufl!\nUpdated in new patch set.","commit_id":"312b5f5686515e4dd92d0fec87e408d9cb73dc8b"},{"author":{"_account_id":17887,"name":"Doug Schveninger","email":"ds6901@att.com","username":"Doug.Schveninger"},"change_message_id":"932f564d7d8eb9af79837e2154549c64ecc02563","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        # Enusre / prefix is added to correct request format"},{"line_number":406,"context_line":"        # updated request format: GET /?token\u003dxxx HTTP/1.1"},{"line_number":407,"context_line":"        # or GET /websockify HTTP/1.1"},{"line_number":408,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path.lstrip(\u0027/\u0027)"},{"line_number":409,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":410,"context_line":"        # Add port only if we have one specified"},{"line_number":411,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_b447884c","line":408,"range":{"start_line":408,"start_character":17,"end_line":408,"end_character":59},"updated":"2020-04-09 16:19:57.000000000","message":"urlparse.parse_qs(url.query) take the query string and give you key value pairs [1] so you donot have to worry about the http query string RFC [2].\n\nWith that said i would add the / to line 408 and remove th e / from  line 404 /websockify so that line 408 just uses path directly.\n\nI would also lead a comment update so people know what and why you did this that do not know the references below.\n\n[1] https://docs.python.org/3/library/urllib.parse.html \n[2} https://tools.ietf.org/html/rfc3986#section-3.4","commit_id":"72fd55302ff6cade93dfd9492ebcbc339b8367e6"},{"author":{"_account_id":31707,"name":"Jason Li","email":"dl2017@att.com","username":"jason2020"},"change_message_id":"fbbabcbb741569fa04f24e4174f55ec181cdc91f","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        # Enusre / prefix is added to correct request format"},{"line_number":406,"context_line":"        # updated request format: GET /?token\u003dxxx HTTP/1.1"},{"line_number":407,"context_line":"        # or GET /websockify HTTP/1.1"},{"line_number":408,"context_line":"        reqdata \u003d \u0027GET /%s HTTP/1.1\\r\\n\u0027 % path.lstrip(\u0027/\u0027)"},{"line_number":409,"context_line":"        reqdata +\u003d \u0027Host: %s\u0027 % url.hostname"},{"line_number":410,"context_line":"        # Add port only if we have one specified"},{"line_number":411,"context_line":"        if url.port:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_c8bf0ca8","line":408,"range":{"start_line":408,"start_character":17,"end_line":408,"end_character":59},"in_reply_to":"df33271e_b447884c","updated":"2020-04-09 17:45:43.000000000","message":"thanks Doug. updated per your comments.","commit_id":"72fd55302ff6cade93dfd9492ebcbc339b8367e6"}]}
