danielkappelle / bitbucket-mattermost-bridge

Bridge to use bitbucket webhooks with mattermost
MIT License
7 stars 6 forks source link

Bad request type #8

Closed velychkovskyi closed 6 years ago

velychkovskyi commented 6 years ago

Hello, I have installed Mattermost 4.5.0 via Bitnami AWS package with Nginx proxing and SSL. Now I try to integrate bitbucket-mattermost-bridge but get code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00\xd5\x01\x00\x00\xd1\x03\x03"\xe1\x13\xea\xcd3\x14j\x01!\xbdrJ\x1e\xae\x95\x19\x94h\xe2\x0eu\xb0\x1c\x8f]\xcc\x81\xd7') on bridge

Running on http://0.0.0.0:5000/

104.192.XXX.XXX - - [05/Apr/2018 07:44:21] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00\xd5\x01\x00\x00\xd1\x03\x03"\xe1\x13\xea\xcd3\x14j\x01!\xbdrJ\x1e\xae\x95\x19\x94h\xe2\x0eu\xb0\x1c\x8f]\xcc\x81\xd7') 104.192.XXX.XXX - - [05/Apr/2018 07:44:21] "��"���3j!�rJ���h�u��]́� ��J�0�,�/�+̨̩������̪��(�$��" 400 -

Tell me please is it problem with new Mattermost API or wrong configuration? (e.g. Pre-installed Jira-mattermost plugin is working correctly). My config.py is

import os host = os.environ.get('BRIDGE_LISTEN_ADDR', '0.0.0.0') port = os.environ.get('BRIDGE_LISTEN_POST', 5000) webhook_url = os.environ.get('MATTERMOST_HOOK', 'https://mattermost.mycompanyname.com/hooks/some_ID') if not webhook_url: raise Exception('You need to set MATTERMOST_HOOK environment variable') username = os.environ.get('MATTERMOST_USERNAME', 'Bitbucket') icon = os.environ.get('MATTERMOST_ICON', '')

velychkovskyi commented 6 years ago

I have made a step forward

danielkappelle commented 6 years ago

To be honest, I haven't used this anymore for over a year and I'm not really planning on using it in the future either. Therefore, I don't really know why it's not working. Perhaps the API has changed.

If you get it to work, please feel free to fork the project and continue working on it. Or, check out this fork: stocky37/bitbucket-mattermost-bridge those folks may have an idea :-)

Anyway, good luck!