Hi,
I use :
- KLone 2.2.0
- Linux Mandrake 9.2
I have a random problem.
I compile my project contains a dynamique page (page1.kl1). The compilation
is ok.
So I execute "kloned -F" to launch KLone server, but when I called my page "
http://myip:8080/page1.kl1", the page is not complete. Indeed if I look the
HTML source code, it's :
==============================================
<html><head><title>Test 1</title></head>
<body>
<p>Hello Mr. 5
==============================================
The end of my page ( after the last call of io_printf() ) is not printed.
I don't find the cause of this bug, but I add other call of io_printf(),
this bug can disappear. It's very strange.
Here my KL1 page "page1.kl1" :
==============================================
<html><head><title>Test 1</title></head>
<body>
<p>Hello Mr. <% io_printf(out,"%d",5); %></p>
</body>
</html>
==============================================
Generated C source code of "page1.kl1" (in
build/target/klone-core-2.2.0/site)
==============================================
#include <klone/emb.h>
#include <klone/dypage.h>
static const char *SCRIPT_NAME = "page1.kl1";
static int pagepage1_kl1 (void) { static volatile int dummy; return dummy; }
static request_t *request = NULL;
static response_t *response = NULL;
static session_t *session = NULL;
static io_t *in = NULL;
static io_t *out = NULL;
static const char klone_html_zblock_0[] = {
0xB3, 0xC9, 0x28, 0xC9, 0xCD, 0xB1, 0xB3, 0xC9, 0x48, 0x4D, 0x4C, 0xB1,
0xB3, 0x29, 0xC9, 0x2C, 0xC9, 0x49, 0xB5, 0x0B, 0x49, 0x2D, 0x2E, 0x51,
0x30, 0xB4, 0xD1, 0x87, 0xF0, 0x6C, 0xF4, 0xC1, 0x72, 0x5C, 0x36, 0x49,
0xF9, 0x29, 0x95, 0x40, 0xAA, 0xC0, 0xCE, 0x23, 0x35, 0x27, 0x27, 0x5F,
0xC1, 0xB7, 0x48, 0x4F, 0x01, 0x00, };
static const char klone_html_zblock_1[] = {
0xB3, 0xD1, 0x2F, 0xB0, 0xE3, 0xB2, 0xD1, 0x4F, 0xCA, 0x4F, 0xA9, 0x04,
0xD1, 0x19, 0x25, 0xB9, 0x39, 0x76, 0x5C, 0x00, };
static void exec_page(dypage_args_t *args)
{
request = args->rq;
response = args->rs;
session = args->ss;
in = request_io(request);
out = response_io(response);
u_unused_args(SCRIPT_NAME, request, response, session, in, out);
pagepage1_kl1 () ;
dbg_if(u_io_unzip_copy(out, klone_html_zblock_0,
sizeof(klone_html_zblock_0)));
#line 3
"/home/all_user/ug_ma/klone-2.2.0_variableglobale/webapp/www/page1.kl1"
io_printf(out,"%d",5);
#line 47 "pg_7e60e05db880bc5e20196df53875f162.c"
dbg_if(u_io_unzip_copy(out, klone_html_zblock_1,
sizeof(klone_html_zblock_1)));
goto klone_script_exit;
klone_script_exit:
return;
}
static embpage_t e;
static void res_ctor(void)
{
e.res.type = ET_PAGE;
e.res.filename = "/www/page1.kl1";
e.fun = exec_page;
}
#ifdef __cplusplus
extern "C" {
#endif
void module_init_7e60e05db880bc5e20196df53875f162(void);
void module_init_7e60e05db880bc5e20196df53875f162(void)
{
res_ctor();
emb_register((embres_t*)&e);
}
void module_term_7e60e05db880bc5e20196df53875f162(void);
void module_term_7e60e05db880bc5e20196df53875f162(void)
{
emb_unregister((embres_t*)&e);
}
#ifdef __cplusplus
}
#endif
==============================================
My kloned.conf :
==============================================
server_list app_http
allow_root yes
log
{
type syslog
syslog.facility LOG_LOCAL0
}
app_http
{
type http
model iterative
addr.type IPv4
addr.port 8080
dir_root /www
}
==============================================
Good luke to repeat this bug and more to correct :)
--
Mickaël AUGER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20090325/c4014af8/attachment.htm