1

If I try to list the files in an S3 directory using the built-in S3 integration in ColdFusion 9, I get an exception when any of the files contains a % (percent) character. The full error message looks like this:

An error occurred when performing a file operation listFiles on file /activities/18057/files.

The cause of this exception was: org.apache.commons.vfs.FileSystemException: Unknown message with code "Invalid URI escape sequence "%ui"."..

I think this is a ColdFusion bug caused by overzealous character escaping, but can anyone with S3 integration try it themselves to confirm? I'm literally just doing this:

<cfset var files = directoryList("s3://my.bucket.path/somefolder/")/>

It works find for "normal" files, but fails as soon as one of the files has a % in its filename.

2
  • 1
    Does it work if you use %25 instead? May 31, 2012 at 21:42
  • @PeterBoughton It works fine and, interestingly, the file name that directoryList returns is unmodified. Apparently the file is checked for (erroneously) illegal characters, but no escaping of % characters is actually performed. Jun 1, 2012 at 7:08

1 Answer 1

0

This would appear to be a "bug" in Adobe CF9 (ACF9). If it's not a bug, it's certainly odd behavior as I tried the code in Railo 3.3.3.0001 (current release) and it works perfectly.

I got the same error from ACF9 as you. In addition, ACF10 has the same error. I also tried in OpenBD but was not able to read the desired folder in my bucket (it read the main bucket, its files and listed the folder but was not able to get inside the folder). However, I've not used OpenBD a lot so this was probably more my error than anything else.

3
  • 1
    I'll submit it as a bug to Adobe. I appreciate the additional Railo test - one more reason to switch. Jun 1, 2012 at 7:12
  • No problem, Rupert. I migrated a pretty darn big app from CF to Railo and it was not too bad at all ... and it's been rock-solid since the transition. With no intended knock on ACF at all, I'm definitely a fan of Railo. Jun 1, 2012 at 15:58
  • Rupert, did you log a bug? I can't find it. Jun 3, 2013 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.