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

Avoid exceptions for request without Content-Type header #1881

Conversation

ivopisarovic
Copy link
Contributor

Description

If a non-bot request comes to the server, it raised an exception because some request may not have content-type header.

Specific Changes

  • Improved the condition to check if the content-type header is present before checking its value.

Testing

  • Nothing new added.

Fix: some requests may not have content-type header.
@ivopisarovic ivopisarovic requested review from garypretty and a team as code owners January 5, 2022 13:55
@ivopisarovic ivopisarovic requested review from axelsrz and removed request for a team January 5, 2022 13:55
@ivopisarovic ivopisarovic changed the title Update aiohttp_telemetry_middleware.py Avoid exceptions for request without Content-Type header Jan 5, 2022
@tracyboehrer
Copy link
Member

We can't make changes to previous release branches. Is this still applicable to main?

@ivopisarovic
Copy link
Contributor Author

I’m afk now. I will look at it in 2 weeks.

@ivopisarovic ivopisarovic changed the base branch from releases/4.14 to main August 8, 2022 12:43
@ivopisarovic ivopisarovic requested a review from a team as a code owner August 8, 2022 12:43
@ivopisarovic ivopisarovic changed the base branch from main to releases/4.14 August 8, 2022 12:44
@ivopisarovic
Copy link
Contributor Author

@tracyboehrer I looked at it an the affected files has not been changed since then. Hence, the same change applies also to main. I am closing this and opening a new PR into main: #1961

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

Successfully merging this pull request may close these issues.

2 participants