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

Fix url_verification error with the Flask adapter #543

Merged
merged 2 commits into from
Dec 14, 2021

Conversation

seratch
Copy link
Member

@seratch seratch commented Dec 12, 2021

After a recent update, the Slack server-side no longer accepts multiple Content-Type headers. The current Flask adapter implementation sends two "Content-Type" header values in response:

  • Content-Type: text/html (set by Flask)
  • Content-Type: application/json; charset=utf-8 (set by Bolt)

This pull request removes the first one to make it work with the current Slack server-side.

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@seratch seratch added bug Something isn't working area:adapter labels Dec 12, 2021
@seratch seratch added this to the 1.11.0 milestone Dec 12, 2021
@seratch seratch self-assigned this Dec 12, 2021
@codecov
Copy link

codecov bot commented Dec 12, 2021

Codecov Report

Merging #543 (10b8a1f) into main (e8556c1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #543   +/-   ##
=======================================
  Coverage   91.29%   91.29%           
=======================================
  Files         169      169           
  Lines        5606     5608    +2     
=======================================
+ Hits         5118     5120    +2     
  Misses        488      488           
Impacted Files Coverage Δ
slack_bolt/adapter/flask/handler.py 87.50% <100.00%> (+0.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8556c1...10b8a1f. Read the comment docs.

@seratch seratch force-pushed the flask-url-verification branch from 2d46f69 to 10b8a1f Compare December 13, 2021 02:05
@seratch seratch merged commit d5289c9 into slackapi:main Dec 14, 2021
@seratch seratch deleted the flask-url-verification branch December 14, 2021 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:adapter bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant