Download/view links don't work
markj - July 7, 2008 - 03:00
| Project: | Bitcache |
| Version: | 6.x-1.0-alpha1 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Arto |
| Status: | closed |
Description
With clean URLs disabled, clicking on view or download links produces a 'Page not found' error; enabling clean URLs corrects problem.

#1
Downloading a bitstream doesn't work for me with both clean URLs enabled and disabled. The error is always "Page not found". Tested with Drupal 6.2 and 6.3.
#2
For my clean URL setup the problem seems to be fixed by this change:
--- bitcache.original/bitcache.server.inc 2008-05-09 13:15:59.000000000 +0200
+++ bitcache/bitcache.server.inc 2008-07-16 12:24:44.000000000 +0200
@@ -23,7 +23,7 @@
}
$method = $_SERVER['REQUEST_METHOD'];
- $request = $_SERVER['REDIRECT_URL']; // FIXME: handle lack of mod_rewrite?
+ $request = urldecode($_SERVER['REQUEST_URI']); // FIXME: handle lack of mod_rewrite?
// Create the repository directory if it doesn't exist yet.
file_check_directory($path = BITCACHE_ROOT, TRUE);
I haven't given this a lot of testing, so it's possible I broke something else at the same time.
#3
I also allowed myself to change the bug report's title, because this issue needs fixing with both clean URLs disabled and enabled.
#4
The patch I submitted above doesn't work with the File Framework, because it adds a disposition parameter to the request which isn't understood by Bitcache_Server. I haven't found a way to pass this parameter, so in this new patch it's simply ignored. File Framework now seems to be working, both with clean URLs enabled and disabled.
#5
I can confirm that this patch fixes this issues for me also, thanks.
#6
Looking into this for the next release.
#7
#8
Thanks for the patch, Marcin. It proved to be a tad more complex yet, but this has now been fixed in 6.x-1.0-alpha3.
#9
Automatically closed -- issue fixed for two weeks with no activity.
#10
Thanks Arto!