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

memfis - July 12, 2008 - 13:46
Priority:normal» critical

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

memfis - July 16, 2008 - 10:28

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

memfis - July 16, 2008 - 10:30
Title:Download/view links don't work with clean URLs disabled» Download/view links don't work

I also allowed myself to change the bug report's title, because this issue needs fixing with both clean URLs disabled and enabled.

#4

memfis - July 16, 2008 - 11:25

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.

AttachmentSize
bitcache.patch 1.67 KB

#5

rmh3093 - October 12, 2008 - 21:13

I can confirm that this patch fixes this issues for me also, thanks.

#6

Arto - October 22, 2008 - 15:10

Looking into this for the next release.

#7

Arto - October 22, 2008 - 15:11
Assigned to:Anonymous» Arto

#8

Arto - December 1, 2008 - 15:58
Status:active» fixed

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

System Message - December 15, 2008 - 16:02
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#10

Justin Hopkins - January 14, 2009 - 16:47

Thanks Arto!

 
 

Drupal is a registered trademark of Dries Buytaert.