Skip to content

Commit

Permalink
Encode the request data for CDN
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Mar 17, 2023
1 parent 0c8d7fa commit 5a92016
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion pmaweb/cdn.py
Expand Up @@ -33,7 +33,7 @@
def perform(url, paths):
"""Perform CDN POST request"""

data = json.dumps({'paths': paths})
data = json.dumps({'paths': paths}).encode('utf-8')
req = urllib2.Request(url, data, {
'Content-Type': 'application/json',
'Accept': 'application/json',
Expand Down
1 change: 0 additions & 1 deletion pmaweb/tests.py
Expand Up @@ -24,7 +24,6 @@
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.utils.timezone import utc, make_aware
from urlparse import parse_qs
import httpretty
import datetime
from pmaweb.views import REDIRECT_MAP
Expand Down

0 comments on commit 5a92016

Please sign in to comment.