artifacts / AFCache

AFCache is an HTTP cache for iOS and OSX seeking towards full RFC2616 compliance
Apache License 2.0
361 stars 43 forks source link

Error was code: 63 - message: File name too long #12

Closed reallylongaddress closed 10 years ago

reallylongaddress commented 13 years ago

Hi there...

Been playing with your AFCache and got the above error (My urls are pretty darn long). So here's my hack/fix...do as you wish with it:

2011-10-09 09:57:45.091 MobileIgniter[7629:207] Error: could not create file "/Users/dominic/Library/Application Support/iPhone Simulator/4.0.2/Applications/99347D6D-885F-4E87-9D6B-7F553CC96062/Library/Caches/com.mobileigniter.proofofconcept.tropicana/localhost:8888/modules/index.php/listDetail/?signed_request=8mIgkXSbpKrxnKdIM1moOzTN66oFqSukvgwkS_HltWs.eyJ0aXRsZSI6IlRyb3BpY2FuYSBEZWFscyIsIm1vZHVsZV9rZXkiOiJsaXN0X2RldGFpbF9tb2R1bGVfa2V5IiwibW9kdWxlX2luc3RhbmNlX2tleSI6IndrbXozMjh2MGtubGFydmM4ZTM5ZzVkbGZtcjJqYzI2In0&system_name=iPhone%20OS&system_version=4.0.2"

2011-10-09 09:57:45.098 MobileIgniter[7629:207] Error was code: 63 - message: File name too long

----SO I shortened the url part of the filename via MD5-----

----WHERE MD5 generated via--- //generate md5 hash from string

}

Best, Dominic

reallylongaddress commented 13 years ago

After a bit more coding...i've moved the md5 function so it's accessed via all filepath generation:

//DBD modified this to shorten the filename, else we get a 'file name too long' error

artifacts commented 10 years ago

Filenames are hashes now, so this won't happen anymore.