Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
8190e843
Commit
8190e843
authored
Feb 04, 2012
by
Giorgos Verigakis
Browse files
Unquote header names and values
parent
5650145b
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/plankton/views.py
View file @
8190e843
...
...
@@ -35,6 +35,7 @@ import json
from
string
import
punctuation
from
StringIO
import
StringIO
from
urllib
import
unquote
from
django.conf
import
settings
from
django.http
import
HttpResponse
,
HttpResponseNotFound
...
...
@@ -99,10 +100,10 @@ def _get_image_headers(request):
for
key
,
val
in
request
.
META
.
items
():
if
key
.
startswith
(
META_PROPERTY_PREFIX
):
name
=
normalize
(
key
[
META_PROPERTY_PREFIX_LEN
:])
headers
[
'properties'
][
name
]
=
val
headers
[
'properties'
][
unquote
(
name
)
]
=
unquote
(
val
)
elif
key
.
startswith
(
META_PREFIX
):
name
=
normalize
(
key
[
META_PREFIX_LEN
:])
headers
[
name
]
=
val
headers
[
unquote
(
name
)
]
=
unquote
(
val
)
is_public
=
headers
.
get
(
'is_public'
,
None
)
if
is_public
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment