On 4/29/10 12:54 AM, Nick Kew wrote:
On 29 Apr 2010, at 04:56, Mark Harrison wrote:
I would like to do a simple mapper:
- given some inputs, calculate a file path
- let apache serve out that file for me
Is there a simple example of how to do this? mod_rewrite
is pretty heavy-duty
On 4/29/10 12:09 AM, Jerome Renard wrote:
I would have said mod_rewrite is a perfect example of what you can do.
mod_rewrite is a great piece of work, but I was hoping
for something a little bit more hello-world-ish.
My desired logic is:
- based on the input, calculate a file path
-
the file
}
static void register_mymapper(apr_pool_t *p)
{
ap_hook_translate_name(my_mapper,NULL,NULL,APR_HOOK_MIDDLE);
}
module AP_MODULE_DECLARE_DATA mymapper_module = {
STANDARD20_MODULE_STUFF,
NULL,
NULL,
NULL,
NULL,
NULL,
register_mymapper
};
--
Mark Harrison
Sam Carleton wrote:
I am trying to use apr_strtok() for the first time. I am taking the
add_cookie() function from mod_rewrite.c, no changes. I am passing in
the string, variable 's':
KioskViewingStation:KVS_VERSION::5
The first line that executes in the function is:
char *tok_cntx;
me:
http://service.bfast.com/clients/notify/exmerchant-1.html
It looks like a good book, I've just placed an order
with amazon.
Cheers,
Mark
--
Mark Harrison
Pixar Animation Studios
Ray Morris wrote:
Google Content-Disposition. This is techincally a
MAIL header, not an HTTP header, I think, but the
major browsers seem to pay some attention to it,
at least some times.
Ah, that's perfect. Firefox honors it on Save As...,
and Safari honors it on both Save As... and when
I have a module that is serving out images in various formats
and resolution. Our canonical format is:
/operation/image/resolution
for example, to get a jpeg thumbnail of foo.tif 256 pixels:
http://myserver/thumb/foo.tif/256-wide-jpg
This is all working well now and fits in with how other
merger */
NULL, /* server config creator */
NULL, /* server config merger */
NULL, /* command table */
kap_register_hooks, /* set up other request processing hooks */
};
/* eof: mod_kap.c */
--
Mark Harrison
Pixar Animation