Thanks Gustaf (Hahaha) that is the cause of the mime-type problem. I’ve 
upgraded to ns 4.99.15 and the MIME type bug is now gone.

However, I’m still not having gzipped files automatically made.  I’ve "chmod 
777 ." and also "chmod 666 *.css" to try to find the root.

—

It appears that ns_gzipfile is not being called at all, as I modded it with 
this:

proc ns_gzipfile {source target} {
    puts "ns_gzipfile $source $target"

and it’s not ever called.

How would you recommend debugging this problem?

Is there some other nsd.tcl parameter needed indicate that (say) .js and .css 
files should be gzipped, but .jpg and .gif should not?


—

A different topic. I use the code patch below to get rid of the need for ".adp" 
on the end of my URLs.

In other words, naviserver transparently rewrites
https://decentespresso.com/cart
as
https://decentespresso.com/cart.adp

and doesn’t display the .adp to the user in the browser.  This makes for very 
clear urls.

This works for me, but would you recommend a less hard-wired hack to accomplish 
this same thing?

nsd/request.c
    if (*url != '\0' && url[strlen(url) - 1] == '/') {
        Ns_DStringAppend(&ds2, "/");
    }
     
/* john buckman added 4/14/06 */
/* check if should add default filename extension of .adp */
/* only if no / on end of url which indicates a directory */
char * dotpos;
if (ds2.string[ds2.length - 1] != '/') {
    /* if not . in the entire url, or if there is a dot before the final / 
(indicating a . in a
       directory name, which is ok, then add the default filename extension */
    dotpos = strrchr(ds2.string, '.');
    if ((dotpos == NULL) || (strchr(dotpos, '/') != NULL)) {
        Ns_DStringAppend(&ds2, ".adp");
/*        Ns_Log(Notice, "added default extension to get '%s'", ds2.string); */
    }
}
/* end john buckman added */

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to