{"action":"closed","issue":{"url":"https://api.github.com/repos/twitter/diffy/issues/18","repository_url":"https://api.github.com/repos/twitter/diffy","labels_url":"https://api.github.com/repos/twitter/diffy/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/twitter/diffy/issues/18/comments","events_url":"https://api.github.com/repos/twitter/diffy/issues/18/events","html_url":"https://github.com/twitter/diffy/issues/18","id":107252503,"node_id":"MDU6SXNzdWUxMDcyNTI1MDM=","number":18,"title":"Diffy relies too much in the content-type header","user":{"login":"camiloribeiro","id":972114,"node_id":"MDQ6VXNlcjk3MjExNA==","avatar_url":"https://avatars0.githubusercontent.com/u/972114?v=4","gravatar_id":"","url":"https://api.github.com/users/camiloribeiro","html_url":"https://github.com/camiloribeiro","followers_url":"https://api.github.com/users/camiloribeiro/followers","following_url":"https://api.github.com/users/camiloribeiro/following{/other_user}","gists_url":"https://api.github.com/users/camiloribeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/camiloribeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camiloribeiro/subscriptions","organizations_url":"https://api.github.com/users/camiloribeiro/orgs","repos_url":"https://api.github.com/users/camiloribeiro/repos","events_url":"https://api.github.com/users/camiloribeiro/events{/privacy}","received_events_url":"https://api.github.com/users/camiloribeiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-09-18T18:26:19Z","updated_at":"2018-09-28T07:49:47Z","closed_at":"2018-09-28T07:49:47Z","author_association":"CONTRIBUTOR","body":"I was running some tests here to know how it works, and in one of my tests I have the following setup:\n\nservice primary:\n    - content-type header => application/json\n    - response-body => { \"hello_world\" : \"primary\" }\n\nservice secondary:\n    - content-type header => application/json\n    - response-body => { \"hello_world\" : \"secondary\" }\n\nservice candidate:\n    - content-type header => application/**xml**\n    - response-body => { \"hello_world\" : \"candidate\" }\n\nIn this scenario the diffy never checks the response and hangs forever.\n\nAnother test that I did could give you some more context on that issue. The test data in that case is the following:\n\nservice primary:\n    - response code => **401**\n    - content-type header => application/**json**\n    - response-body => { \"hello_**world**\" : \"primary\" }\n\nservice secondary:\n    - response code => **402**\n    - content-type header => application/**xml**\n    - response-body => { \"hello_**foo**\" : \"secondary\" }\n\nservice candidate:\n    - response code => **403**\n    - content-type header => application/**text**\n    - response-body => { \"hello_**bar**\" : \"candidate\" }\n\nIn this case diffy holds for a long time, something around 40 seconds, and returns saying that everything is fine and there is no difference in the responses.\n\nIn a third scenario for this issue, if I use the same response code for primary and secondary, it returns fast as usual, but still without differences.\n\nPlease let me know if you have any questions regarding the scenarios. I am using my docker-compose setup to test it, so if you need feel free to clone it. \n"}}
{"actor":{"display_login":"puneetkhanduri"}}