clean path in swift middleware

the path also requires encoding as syslogs still show errors.

Closes-Bug: #1369124
Change-Id: Ie4d19a5a7dd5ce29e10c6e082bfcb33e6e641623
(cherry picked from commit dbe8c8b20f)
This commit is contained in:
gordon chung 2014-09-29 18:39:03 -04:00 committed by Eoghan Glynn
parent 8b61fdd2db
commit e6078929fd
1 changed files with 2 additions and 1 deletions

View File

@ -44,6 +44,7 @@ import logging
from oslo.utils import timeutils
import six
import six.moves.urllib.parse as urlparse
from ceilometer.openstack.common import context
from ceilometer import pipeline
@ -144,7 +145,7 @@ class CeilometerMiddleware(object):
return iter_response(iterable)
def publish_sample(self, env, bytes_received, bytes_sent):
path = env['PATH_INFO']
path = urlparse.quote(env['PATH_INFO'])
method = env['REQUEST_METHOD']
headers = {}
for header in env: