Merge "clean path in swift middleware"

This commit is contained in:
Jenkins 2014-10-07 11:34:59 +00:00 committed by Gerrit Code Review
commit d546973ea3

View File

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