Thank you, that cleared it out. Took some time before I spotted the
problem, even with working code.

After looking again at the documentation for that feature, it seems
like it is wrong, since no place does it say that the url given to the
hashing logic have to start with /, and later on with the given code
there and the examples it gives implies the / not being there.

Otherwise /downloads/ac003ebbb88c4fc9a75687223c72c6da/49b40a43/bar/foo/example.iso
should be 
/downloads/ac003ebbb88c4fc9a75687223c72c6da/49b40a43//bar/foo/example.iso
(which, for the record, also works)

I think that page could do with some clarification on that point.

Once again, thanks for the help. I don't think I would have figured it
out by myself.

-Mikael

2011/3/3 Alvaro Lopez Ortega <[email protected]>
>
> Hello Mikael,
> Please, check this mail I sent a few weeks ago on the same matter:
>   http://lists.octality.com/pipermail/cherokee/2011-January/014313.html
> Hope it clarifies things.
> Cheers.
>
> On Thu, Mar 3, 2011 at 10:39 AM, Mikael Turøy <[email protected]> wrote:
>>
>> Ok, I have used most of today on trying to get Hidden Downloads to work, but 
>> no luck.
>>
>> I only get 403 errors, and 410 errors when the link times out.
>>
>> Python code for generating link:
>>
>> -----------------------------------------------------------
>> >>> s = "Test"
>>
>> >>> def geturl(url):
>> ...  t = '%08x' % (time.time())
>> ...  print s
>> ...  return "getfile/" + "%s/%s/%s" % (hashlib.md5(s+url+t).hexdigest(), t, 
>> url)
>>
>>
>> >>> geturl("orginal.mod")
>> Test
>> 'getfile/8d956c2beea487b37a1cbb57199166ac/4d6d616d/orginal.mod'
>> -----------------------------------------------------------
>>
>> Relevant cherokee config (first rule for default handler):
>>
>> -----------------------------------------------------------
>> vserver!1!rule!1100!document_root = 
>> /home/terra/stablevibes/static/media/music
>> vserver!1!rule!1100!handler = secdownload
>> vserver!1!rule!1100!handler!iocache = 0
>> vserver!1!rule!1100!handler!secret = Test
>> vserver!1!rule!1100!match = directory
>> vserver!1!rule!1100!match!directory = /getfile
>> -----------------------------------------------------------
>>
>> A normal Static File handler can serve the file perfectly, so it's not a 
>> permission issue. I've tried different filenames and secrets, but same 
>> result every time.
>>
>> Using Cherokee v1.2.1 compiled from source, running on 64bit Debian Squeeze.
>>
>> Could anyone help me a bit with getting this to work? Server in question is 
>> up (for now) at http://demovibes.thelazy.net/ with hidden downloads rule 
>> active.
>> Folder is also avaliable at /static/media/music/ (with directory listing)
>>
>> I can add that I had the same problem with v1.0.8, and updated to latest 
>> version because of that.
>>
>> _______________________________________________
>> Cherokee mailing list
>> [email protected]
>> http://lists.octality.com/listinfo/cherokee
>>
>
>
>
> --
> Greetings, alo
> http://www.alobbs.com/
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to