Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always get bad request response before any code in def root() runs #40

Open
christopherreay opened this issue Sep 6, 2017 · 3 comments

Comments

@christopherreay
Copy link

christopherreay commented Sep 6, 2017

I tried adding a print as the first line of def root():

so im running from docker
Ive connected into the running docker container
if I run wget --post-data="some=data" localhost:5000
I get this error:

bash-4.3# wget --post-data="asd=sd" localhost:5000
Connecting to localhost:5000 (127.0.0.1:5000)
wget: server returned error: HTTP/1.0 400 BAD REQUEST

where the first line of def root(): never runs. Any ideas?

(github webhook is set to application/json and also returns that the server says bad request)

@ptersilie
Copy link
Member

The bad request on your wget example is normal. Why Github does the same I don't know. I'd need some more information. Like your config, if you are using a secret, etc.

@christopherreay
Copy link
Author

christopherreay commented Sep 7, 2017

So here is the config:

USERNAME = "Github"
ICON_URL = "chat.example.net/github.png"
MATTERMOST_WEBHOOK_URLS = {
    'default' : ("http://chat.example.net/hooks/jtk9idg4ifnj7ncm9et6tjdi5w", "off-topic"),
    'metacurrency/holochain' : ("http://chat.example.net/hooks/jtk9idg4ifnj7ncm9et6tjdi5w", "feedcode"),
    #'teamname' : ("yourdomain.org/hooks/hookid3", "town-square"),
    #'teamname/unimportantrepo' : None,
}
GITHUB_IGNORE_ACTIONS = {
    "issues": ["labeled", "assigned"],
}
SECRET = None
SHOW_AVATARS = True
SERVER = {
    'hook': "/"
,   'address': "0.0.0.0"
,   'port': 5000
}

I can tell you that:

  • chat.example.net/github.png does not exist
  • If I set SECRET to some string, there is a casting error on server startup
  • Im not sure if SECRET should be set to None or to ""

Thank you

@ptersilie
Copy link
Member

@christopherreay Sorry for the late reply. Do you still have this issue? SECRET=None should be fine. Did you set a secret in the Github webhook?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants