<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#330099">
Stefano Barbato , On 9/12/2009 05:30:
<blockquote
cite="mid:80235A57-B560-49AE-9C1A-A2D4555EFE9B@koanlogic.com"
type="cite"><br>
That's probably because the cgi does not send back the proper
Content-type header field (should be text/html for web pages). Browsers
spawn the save dialog for any content-type they cannot display inline
and for each unknown content-type. <br>
<br>
Could you send us the verbatim response of the cgi (including the
response header)? <br>
</blockquote>
<br>
Stefano.<br>
<br>
Thanks for your answers so far. And great to hear from you!<br>
<br>
Here's the headers and a little more :) below...<br>
<br>
<br>
<br>
There seem to be two problems, but I am trying to stay with one at a
time :)<br>
<br>
*** Issue 1: my script_alias seems to be ignored. <br>
<br>
<a class="moz-txt-link-freetext" href="http://192.168.1.29:8087/">http://192.168.1.29:8087/</a><br>
(index.kl1):<br>
<br>
GET / HTTP/1.1<br>
Host: 192.168.1.29:8087å,ž<br>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3å,ž<br>
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8å,ž<br>
Accept-Language: en-us,en;q=0.5å,ž<br>
Accept-Encoding: gzip,deflateå,ž<br>
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7å,ž<br>
Keep-Alive: 300å,ž<br>
Connection: keep-aliveå,ž<br>
Cookie: klone_sid=5c85e0b8605a2f4469dd27b3712faf2bå,ž<br>
<br>
HTTP/1.0 200 OK<br>
Server: klone/2.1.0å,ž<br>
Date: Sat, 12 Sep 2009 19:11:35 GMTå,ž<br>
Content-Type: text/htmlå,ž<br>
Cache-Control: no-cache, must-revalidateå,ž<br>
Expires: Mon, 1 Jan 1990 05:00:00 GMTå,ž<br>
Pragma: no-cacheå,ž<br>
<br>
<br>
and the cgi:<br>
<br>
Test 1** Test fails when web address points to cgi:<br>
<a class="moz-txt-link-freetext"
href="http://192.168.1.29:8087/cgi/admin/flash.cgi">http://192.168.1.29:8087/cgi/admin/flash.cgi</a><br>
* note below: as script_alias is set to /cgi /axis-cgi I assume the
target directory is referenced as /www/... <br>
but just to be certain I also put axis_cgi in www/../ (one directory
below www). Get same result:<br>
<br>
<h1>Not Found</h1>
<p>URL: /cgi/admin/flash.cgi</p>
with:<br>
<br>
app_http<br>
{<br>
type http<br>
dir_root /www<br>
#dir_alias /cgi/ /axis-cgi/<br>
#dir_alias /admin-bin/ /www/admin-bin/<br>
#dir_alias /axis-release/ /www/axis-release/<br>
addr.type IPv4<br>
addr.port 8087<br>
<br>
}<br>
<br>
cgi<br>
{<br>
script_alias /cgi /axis-cgi<br>
# .pl and .cgi files will be executed as is<br>
pl.handler exec<br>
cgi.handler exec<br>
}<br>
<br>
and:<br>
[root@dev1 klone]# ls webapp/www/axis-cgi/admin/ -ltr<br>
total 280<br>
-rwxrwxrwx 1 root root 278782 Sep 7 15:43 flash.cgi<br>
<br>
<br>
*** Issue 2:<br>
When directly pointing to the CGI (It's included in the webapp/www
directory), the cgi responds but instead of launching at the server's
commandline it sends the cgi back and therefore presents a save/open
dialog.<br>
<br>
<br>
REQUEST:<br>
<br>
GET /axis-cgi/admin/flash.cgi HTTP/1.1<br>
192.168.1.29:8087日本語<br>
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3日本語<br>
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8日本語<br>
en-us,en;q=0.5日本語<br>
gzip,deflate日本語<br>
ISO-8859-1,utf-8;q=0.7,*;q=0.7日本語<br>
300日本語<br>
keep-alive日本語<br>
klone_sid=5c85e0b8605a2f4469dd27b3712faf2b日本語<br>
<br>
<br>
RESPONSE:<br>
<br>
HTTP/1.0 200 OK<br>
klone/2.1.0日本語<br>
Sat, 12 Sep 2009 19:33:05 GMT日本語<br>
application/octet-stream日本語<br>
Mon, 07 Sep 2009 19:43:31 GMT日本語<br>
278782日本語<br>
<br>
<br>
日本語 is because firefox handles japanese character encoding. <br>
<br>
This got me to considering... I did not set the http headers.<br>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</a>><br>
<html xmlns=<a class="moz-txt-link-rfc2396E"
href="http://www.w3.org/1999/xhtml">"http://www.w3.org/1999/xhtml"</a>><br>
<head><br>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" /><br>
<br>
After doing so I get the same response from the CGI.<br>
<br>
<br>
--<br>
<br>
And why not heap on two more (therefore can legitimately say "he has
issues"):<br>
<br>
***Issue 3: Although I have been around klone for some time (yet not
active for at least a year until now) I can't seem to figure out if
it's possible to have an external kloned.conf and still use an internal
(kloned-compiled) web page and other stuff (webapps/www...). If
possible, how does one reference "encapsulated" versus "external"
files? I was looking at this as a possible easy way to test the stuff
above.<br>
<br>
<br>
*** issue 4:I looked at how klone does mime. Apparently mime_types is
built into mime_map.c. <br>
<br>
Might be nice to have ability to override with an external file -
perhaps also referenced via kloned.conf?<br>
<br>
I can write this change if you thinks it's worthwhile.<br>
<br>
</body>
</html>