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

Send bytestrings to sumo #19825

Merged
merged 2 commits into from
Mar 16, 2018
Merged

Send bytestrings to sumo #19825

merged 2 commits into from
Mar 16, 2018

Conversation

proteusvacuum
Copy link
Contributor

We started getting: https://sentry.io/dimagi/commcarehq/issues/493068892/ after #19786 was merged. That PR inadvertently changed our headers to be unicode, instead of bytestrings.

This issue tedder/requests-aws4auth#24 seems to suggest that that can cause urllib3 to do funny things when we are sending large POST requests using the requests library.

FYI @amstone326

@proteusvacuum proteusvacuum added the product/invisible Change has no end-user visible impact label Mar 15, 2018
@@ -198,11 +198,11 @@ def _get_header(self, fmt):
if settings.SERVER_ENVIRONMENT == 'production':
environment = 'prod'

return {"X-Sumo-Category": "{env}/{domain}/{fmt}".format(
return {str("X-Sumo-Category"): "{env}/{domain}/{fmt}".format(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want b"X-Sumo-Category" here, right?

@emord
Copy link
Contributor

emord commented Mar 16, 2018

fyi @nickpell

@emord emord merged commit 3182117 into master Mar 16, 2018
@emord emord deleted the fr/sumologic-unicode branch March 16, 2018 02:09
@amstone326
Copy link
Contributor

@emord will you let me know whenever you do an ICDS deploy next? I want to confirm that this fixed things

@emord
Copy link
Contributor

emord commented Mar 16, 2018

@amstone326 @snopoke is going to kick one off tonight after maintenance

@amstone326
Copy link
Contributor

amstone326 commented Mar 16, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/invisible Change has no end-user visible impact
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants