summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Orozco <thomas@orozco.fr>2013-09-02 16:54:52 +0200
committerThomas Orozco <thomas@orozco.fr>2013-09-02 16:54:52 +0200
commiteee7d14403fa74a1dcf53c005bfd8aea5cc2517c (patch)
treec827a2bb98da877a9e7120fe09d5df0be92d42d2
parentedb038ad05a9b63612d91514ee60eed0dc3dcba7 (diff)
downloadboto-eee7d14403fa74a1dcf53c005bfd8aea5cc2517c.tar.gz
s3put: accept headers values containing "="
s3put tries to split headers on the "=" sign. Some headers include a "=" sign (e.g. max-age), and can't be used. This pull request splits on the first equal sign to support those. Caveat: if a user uses the command correctly (`s3put --header "header1=value1 header2=value2"), they won't get an exception.
-rwxr-xr-xbin/s3put2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/s3put b/bin/s3put
index faf10ffd..5af2d5a6 100755
--- a/bin/s3put
+++ b/bin/s3put
@@ -290,7 +290,7 @@ def main():
if o in ('-r', '--reduced'):
reduced = True
if o in ('--header'):
- (k, v) = a.split("=")
+ (k, v) = a.split("=", 1)
headers[k] = v
if o in ('--host'):
host = a