<!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.&nbsp; 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.&nbsp; <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&aring;,&#382;<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&aring;,&#382;<br>
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&aring;,&#382;<br>
Accept-Language: en-us,en;q=0.5&aring;,&#382;<br>
Accept-Encoding: gzip,deflate&aring;,&#382;<br>
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&aring;,&#382;<br>
Keep-Alive: 300&aring;,&#382;<br>
Connection: keep-alive&aring;,&#382;<br>
Cookie: klone_sid=5c85e0b8605a2f4469dd27b3712faf2b&aring;,&#382;<br>
<br>
HTTP/1.0 200 OK<br>
Server: klone/2.1.0&aring;,&#382;<br>
Date: Sat, 12 Sep 2009 19:11:35 GMT&aring;,&#382;<br>
Content-Type: text/html&aring;,&#382;<br>
Cache-Control: no-cache, must-revalidate&aring;,&#382;<br>
Expires: Mon, 1 Jan 1990 05:00:00 GMT&aring;,&#382;<br>
Pragma: no-cache&aring;,&#382;<br>
<br>
<br>
and the cgi:<br>
<br>
Test 1**&nbsp; Test fails when web address points to cgi:<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <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>
&nbsp;* note below: as script_alias is set to /cgi&nbsp; /axis-cgi&nbsp; I assume the
target directory is referenced as /www/...&nbsp; <br>
&nbsp;&nbsp; but just to be certain I also put axis_cgi in www/../ (one directory
below www).&nbsp; Get same result:<br>
<br>
<h1>Not Found</h1>
<p>URL: /cgi/admin/flash.cgi</p>
with:<br>
<br>
app_http<br>
{<br>
&nbsp;&nbsp;&nbsp; type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; http<br>
&nbsp;&nbsp;&nbsp; dir_root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /www<br>
&nbsp;&nbsp;&nbsp; #dir_alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /cgi/ /axis-cgi/<br>
&nbsp;&nbsp;&nbsp; #dir_alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /admin-bin/ /www/admin-bin/<br>
&nbsp;&nbsp;&nbsp; #dir_alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /axis-release/ /www/axis-release/<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; addr.type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IPv4<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; addr.port&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8087<br>
<br>
}<br>
<br>
cgi<br>
{<br>
&nbsp;&nbsp;&nbsp; script_alias&nbsp;&nbsp;&nbsp; /cgi&nbsp; /axis-cgi<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # .pl and .cgi files will be executed as is<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pl.handler&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exec<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cgi.handler&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp; 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&#26085;&#26412;&#35486;<br>
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3&#26085;&#26412;&#35486;<br>
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8&#26085;&#26412;&#35486;<br>
en-us,en;q=0.5&#26085;&#26412;&#35486;<br>
gzip,deflate&#26085;&#26412;&#35486;<br>
ISO-8859-1,utf-8;q=0.7,*;q=0.7&#26085;&#26412;&#35486;<br>
300&#26085;&#26412;&#35486;<br>
keep-alive&#26085;&#26412;&#35486;<br>
klone_sid=5c85e0b8605a2f4469dd27b3712faf2b&#26085;&#26412;&#35486;<br>
<br>
<br>
RESPONSE:<br>
<br>
HTTP/1.0 200 OK<br>
klone/2.1.0&#26085;&#26412;&#35486;<br>
Sat, 12 Sep 2009 19:33:05 GMT&#26085;&#26412;&#35486;<br>
application/octet-stream&#26085;&#26412;&#35486;<br>
Mon, 07 Sep 2009 19:43:31 GMT&#26085;&#26412;&#35486;<br>
278782&#26085;&#26412;&#35486;<br>
<br>
<br>
&#26085;&#26412;&#35486; is because firefox handles japanese character encoding.&nbsp; <br>
<br>
This got me to considering... I did not set the http headers.<br>
&nbsp;&nbsp;&nbsp; &lt;!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>&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;html xmlns=<a class="moz-txt-link-rfc2396E"
 href="http://www.w3.org/1999/xhtml">"http://www.w3.org/1999/xhtml"</a>&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;head&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;meta http-equiv="Content-Type" content="text/html;
charset=utf-8" /&gt;<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...).&nbsp; If
possible, how does one reference "encapsulated" versus "external"
files?&nbsp; 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.&nbsp; 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>