Closed AlexanderArvidsson closed 5 months ago
Hello--thanks for bringing this to our attention. There is actually a PR to fix this issue so this should be fixed in our next release
Hello--thanks for bringing this to our attention. There is actually a PR to fix this issue so this should be fixed in our next release
Ouch, my apologies for jumping the gun and not checking PRs (or other issues for that matter), I was in a bit of a rush. This is a duplicate of #1150!
We've got alerts from the browser agent injection code in New Relic.
Here's the offending code: https://github.com/newrelic/newrelic-python-agent/blob/45b575f8c5966b0a53216ad25bde6a659eff6e73/newrelic/api/asgi_application.py#L176-L183
The code does not take into consideration that content-length can be None, but it does check for None after the int conversion. The try-except should catch TypeError.
I'm using Django with Gunicorn, which to be fair is not really a supported framework, but it still works for us except for this piece of code that raises an error. So if that piece of code can just safely handle possibility of None in the header value, it should work fine.