Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion slack_bolt/oauth/async_oauth_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ async def handle_installation(self, request: AsyncBoltRequest) -> BoltResponse:
body=html,
headers={
"Content-Type": "text/html; charset=utf-8",
"Content-Length": len(bytes(html, "utf-8")),
"Set-Cookie": [set_cookie_value],
},
)
Expand Down
2 changes: 0 additions & 2 deletions slack_bolt/oauth/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def _build_callback_success_response( # type: ignore
status=200,
headers={
"Content-Type": "text/html; charset=utf-8",
"Content-Length": len(bytes(html, "utf-8")),
"Set-Cookie": self._state_utils.build_set_cookie_for_deletion(),
},
body=html,
Expand All @@ -66,7 +65,6 @@ def _build_callback_failure_response( # type: ignore
status=status,
headers={
"Content-Type": "text/html; charset=utf-8",
"Content-Length": len(bytes(html, "utf-8")),
"Set-Cookie": self._state_utils.build_set_cookie_for_deletion(),
},
body=html,
Expand Down
1 change: 0 additions & 1 deletion slack_bolt/oauth/oauth_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def handle_installation(self, request: BoltRequest) -> BoltResponse:
body=html,
headers={
"Content-Type": "text/html; charset=utf-8",
"Content-Length": len(bytes(html, "utf-8")),
"Set-Cookie": [set_cookie_value],
},
)
Expand Down
1 change: 0 additions & 1 deletion tests/adapter_tests/aws/test_aws_chalice.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,4 @@ def install() -> Response:
)
assert response["statusCode"] == 200
assert response["headers"]["content-type"] == "text/html; charset=utf-8"
assert response["headers"]["content-length"] == "565"
assert "https://slack.com/oauth/v2/authorize?state=" in response.get("body")
2 changes: 0 additions & 2 deletions tests/adapter_tests/aws/test_aws_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ def test_oauth(self):
response = SlackRequestHandler(app).handle(event, self.context)
assert response["statusCode"] == 200
assert response["headers"]["content-type"] == "text/html; charset=utf-8"
assert response["headers"]["content-length"] == "565"
assert response.get("body") is not None

event = {
Expand All @@ -318,5 +317,4 @@ def test_oauth(self):
response = SlackRequestHandler(app).handle(event, self.context)
assert response["statusCode"] == 200
assert response["headers"]["content-type"] == "text/html; charset=utf-8"
assert response["headers"]["content-length"] == "565"
assert "https://slack.com/oauth/v2/authorize?state=" in response.get("body")
1 change: 0 additions & 1 deletion tests/adapter_tests/django/test_django.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ def test_oauth(self):
response = SlackRequestHandler(app).handle(request)
assert response.status_code == 200
assert response.get("content-type") == "text/html; charset=utf-8"
assert response.get("content-length") == "565"
assert "https://slack.com/oauth/v2/authorize?state=" in response.content.decode(
"utf-8"
)
1 change: 0 additions & 1 deletion tests/adapter_tests/starlette/test_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,5 +213,4 @@ async def endpoint(req: Request):
response = client.get("/slack/install", allow_redirects=False)
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert response.headers.get("content-length") == "565"
assert "https://slack.com/oauth/v2/authorize?state=" in response.text
1 change: 0 additions & 1 deletion tests/adapter_tests/starlette/test_starlette.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,5 +222,4 @@ async def endpoint(req: Request):
response = client.get("/slack/install", allow_redirects=False)
assert response.status_code == 200
assert response.headers.get("content-type") == "text/html; charset=utf-8"
assert response.headers.get("content-length") == "565"
assert "https://slack.com/oauth/v2/authorize?state=" in response.text
1 change: 0 additions & 1 deletion tests/slack_bolt/oauth/test_oauth_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def test_handle_installation_default(self):
resp = oauth_flow.handle_installation(req)
assert resp.status == 200
assert resp.headers.get("content-type") == ["text/html; charset=utf-8"]
assert resp.headers.get("content-length") == ["576"]
assert "https://slack.com/oauth/v2/authorize?state=" in resp.body

# https://github.com/slackapi/bolt-python/issues/183
Expand Down
1 change: 0 additions & 1 deletion tests/slack_bolt/oauth/test_oauth_flow_sqlite3.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def test_handle_installation(self):
resp = oauth_flow.handle_installation(req)
assert resp.status == 200
assert resp.headers.get("content-type") == ["text/html; charset=utf-8"]
assert resp.headers.get("content-length") == ["565"]
assert "https://slack.com/oauth/v2/authorize?state=" in resp.body

def test_handle_callback(self):
Expand Down
1 change: 0 additions & 1 deletion tests/slack_bolt_async/oauth/test_async_oauth_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ async def test_handle_installation_default(self):
resp = await oauth_flow.handle_installation(req)
assert resp.status == 200
assert resp.headers.get("content-type") == ["text/html; charset=utf-8"]
assert resp.headers.get("content-length") == ["565"]
assert "https://slack.com/oauth/v2/authorize?state=" in resp.body

@pytest.mark.asyncio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ async def test_handle_installation(self):
resp = await oauth_flow.handle_installation(req)
assert resp.status == 200
assert resp.headers.get("content-type") == ["text/html; charset=utf-8"]
assert resp.headers.get("content-length") == ["565"]
assert "https://slack.com/oauth/v2/authorize?state=" in resp.body

@pytest.mark.asyncio
Expand Down