Closed GoogleCodeExporter closed 8 years ago
Here are comments from the wiki that appear to be related to this issue:
Comment by jajcus, Mar 15, 2010
I found a problem in the latest code:
Mar 14 18:53:41 jajo s3fs: URL is
http://s3.amazonaws.com/bucket?delimiter=/&prefix=&max-keys=50
Mar 14 18:53:41 jajo s3fs: URL changed is
http://bucket.s3.amazonaws.com?delimiter=/&prefix=&max-keys=50
Mar 14 18:53:41 jajo s3fs: connecting to URL
http://bucket.s3.amazonaws.com?delimiter=/&prefix=&max-keys=50
Mar 14 18:53:41 jajo s3fs: ###response=400
The missing '/' before '?' in the rewritten url is causing a 400 error for me.
Here is a little patch that fixes this:
--- s3fs/s3fs.cpp.orig 2010-02-05 01:45:59.000000000 +0100
+++ s3fs/s3fs.cpp 2010-03-15 09:46:56.000000000 +0100
@@ -296,7 +296,10 @@
int bucket_pos = url_str.find(token);
int bucket_size = token.size();
- url_str = url_str.substr(0,7) + bucket + "." +
url_str.substr(7,bucket_pos - 7) + url_str.substr((bucket_pos + bucket_size));
+ if (url_str[bucket_pos + bucket_size] != '/')
+ url_str = url_str.substr(0,7) + bucket + "." +
url_str.substr(7, bucket_pos - 7) + "/" + url_str.substr((bucket_pos +
bucket_size));
+ else
+ url_str = url_str.substr(0,7) + bucket + "." +
url_str.substr(7, bucket_pos - 7) + url_str.substr((bucket_pos + bucket_size));
syslog(LOG_DEBUG, "URL changed is %s", url_str.c_str());
Original comment by dmoore4...@gmail.com
on 20 Oct 2010 at 3:33
Is this still an issue with the latest code?
Original comment by dmoore4...@gmail.com
on 30 Dec 2010 at 7:25
No response in over a month. ...closing this old issue.
Original comment by dmoore4...@gmail.com
on 5 Feb 2011 at 1:37
Original issue reported on code.google.com by
marl...@gmail.com
on 24 Sep 2009 at 4:01Attachments: