On 28.02.19 21:59, Ben Brink via naviserver-devel wrote:
Is there a way to set a default mime-type for nscgi similar to how
other naviserver modules use the default mime-types associated by file
suffix, or in any other way, or have I goofed the config?
With 4.99.18 and these settings, no mime-type is provided. Browsers
aren't recognizing such content and nscgi isn't sending the content in
these cases as far as I can tell.
cgi-scripts have to provide the content type.
Here is a very short example, where one can verify via browser developer
tools, that the server sends the provided content type correctly (when
browsing to "..../hello-word.cgi".
Do you see different results?
-gn
hello-world.cgi
==================================================================
puts "HTTP/1.0 200 OK
Date: Monday, 06-Nov-95 17:50:15 GMT
Content-Type: text/html
<html>
<body>
Hello World
</body>
"
==================================================================
config snippet
==================================================================
# CGI
#
ns_section "ns/server/${server}/module/nscgi" {
ns_param map "GET /*.cgi"
ns_param Interps cgi
}
ns_section "ns/interps/cgi" {
ns_param .cgi "/usr/local/ns/bin/tclsh"
}
==================================================================
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel