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 #1961

Merged
merged 3 commits into from
Jan 26, 2024

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.
Applies to bots with telemetry middleware.

Specific Changes

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

Testing

  • Nothing new added.

An updated version of the original PR #1881.

Fix: content-type may not be present in some requests, e.g. /robots.txt request.
@tracyboehrer tracyboehrer merged commit 7a03e65 into microsoft:main Jan 26, 2024
1 of 2 checks passed
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