-
Notifications
You must be signed in to change notification settings - Fork 311
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcomponent: botshelp wantedIndicates that a maintainer wants help on an issue or pull requestIndicates that a maintainer wants help on an issue or pull request
Description
The problem
When using the HTTPCollectorBot, it is possible to provide custom headers in the bot's configuration using the http_header variable. However, when running the bot, these custom headers are ignored, i.e. not passed on in the request.
Probable cause
The HTTPCollectorBot uses the HttpMixin class. This class contains a line that sets the instance's variable self.http_header to an empty dictionary. This overwrites possible custom headers set in the bot's configuration in the manager.
Possible solutions
- Simply commenting out this line seems to fix the problem.
- In
bot.pythere is a functionset_request_parameterswhich looks like it is supposed to set the custom headers (among other things). It might be a better solution to move this function to theHttpMixinand calling it at the start of thesetupfunction in theHttpMixin.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcomponent: botshelp wantedIndicates that a maintainer wants help on an issue or pull requestIndicates that a maintainer wants help on an issue or pull request