Error processing request
Parameters
CONTENT_LENGTH | 0 |
REQUEST_METHOD | GET |
REQUEST_URI | /revision/tclhttpd+content+compression?V=0 |
QUERY_STRING | V=0 |
CONTENT_TYPE | |
DOCUMENT_URI | /revision/tclhttpd+content+compression |
DOCUMENT_ROOT | /var/www/nikit/nikit/nginx/../docroot |
SCGI | 1 |
SERVER_PROTOCOL | HTTP/1.1 |
REMOTE_ADDR | 172.70.126.94 |
REMOTE_PORT | 41540 |
SERVER_PORT | 8888 |
SERVER_NAME | wiki.tcl-lang.org |
HTTP_HOST | wiki.tcl-lang.org |
HTTP_CONNECTION | Keep-Alive |
HTTP_ACCEPT_ENCODING | gzip |
HTTP_X_FORWARDED_FOR | 3.136.20.247 |
HTTP_CF_RAY | 88ceb06558422aa2-ORD |
HTTP_X_FORWARDED_PROTO | http |
HTTP_CF_VISITOR | {"scheme":"http"} |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected]) |
HTTP_CF_CONNECTING_IP | 3.136.20.247 |
HTTP_CDN_LOOP | cloudflare |
HTTP_CF_IPCOUNTRY | US |
Body
Error
Unknow state transition: LINE -> END
-code
1
-level
0
-errorstack
INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit {tclhttpd content compression} {[fr] a demo of tclhttpd content compression using zip deflate respectively
======
the tcl part, PATH/custom/filename.tcl
package require vfs::zip
proc repeat {x n} {
global Httpd
set sock $Httpd(currentSocket)
upvar #0 Httpd$sock data
#append newline as separator
set text [string repeat $x\n $n]
set data(headers) [list content-encoding deflate original-len [string length $text]]
return [vfs::zip -mode compress $text]
}
Direct_Url /repeat ::repeat
======
the browser part, e.g. as PATH/htdocs/fox.html
<HTML>
<HEAD>
<script type='text/javascript'>
var A=new String();
function $(id) {
return document.getElementById(id);
}
function show() {
var tt=new String();
$('var').value='';
var obj=$('d');
var b=$('f');
var tt=unescape(obj.contentWindow.document.body.innerHTML);
b.innerHTML=tt;
var p=new RegExp('^<pre>|</pre>$','ig');
//alert(tt);
tt=tt.replace(/'/g,'\\\'');
//remove auto-generated tags
tt=tt.replace(p,'\'');
tt=tt.replace(/\n/g,'\\n');
//alert('tt:<'+tt+'>');
//assign string to variable A
A=eval(tt);
var b=A.replace(/\n/g,'|');
$('var').value=b;
}
function repeat() {
var x=$('d');
var direct=new String('repeat?x=');
var toecho=$('x').value;
toecho=escape(toecho);
toecho=encodeURIComponent(toecho);
var count=parseInt($('n').value);
direct=direct.concat(toecho,'&n=',count);
//start request
x.setAttribute('src', direct);
//show request in headerline
$('h').innerHTML=direct;
}
</SCRIPT>
</HEAD>
<H4> functional in Firefox and Opera differently</H4>
<H5> sets the source attribute of the iframe to "repeat?x=sometext&n=counter"<H5>
<H5> x and n are the parameter names used in procedure repeat of tclhttpd-server<H5>
<H3 id='h'>url</H3>
<BODY onload="$('d').contentWindow.document.write('please press the button');$('x').value=unescape('-%e9-%f6%b7 %a5')">
<INPUT id='x'>text to echo</input>
<INPUT id='n' value=7 size=4 maxlength=4>times repeated</INPUT>
<INPUT type=button name=echo value='set iframe-src' onClick=repeat();><BR>
<br><input id='var' size=80> | replaces newline in var A</input><br>
<iframe id='d' onload=show();>
</iframe>
<DIV id='f'></DIV>
</BODY>
</HTML>
======
----
!!!!!!
%| [Category TclHttpd] |%
!!!!!!} regexp2} CALL {my render {tclhttpd content compression} {[fr] a demo of tclhttpd content compression using zip deflate respectively
======
the tcl part, PATH/custom/filename.tcl
package require vfs::zip
proc repeat {x n} {
global Httpd
set sock $Httpd(currentSocket)
upvar #0 Httpd$sock data
#append newline as separator
set text [string repeat $x\n $n]
set data(headers) [list content-encoding deflate original-len [string length $text]]
return [vfs::zip -mode compress $text]
}
Direct_Url /repeat ::repeat
======
the browser part, e.g. as PATH/htdocs/fox.html
<HTML>
<HEAD>
<script type='text/javascript'>
var A=new String();
function $(id) {
return document.getElementById(id);
}
function show() {
var tt=new String();
$('var').value='';
var obj=$('d');
var b=$('f');
var tt=unescape(obj.contentWindow.document.body.innerHTML);
b.innerHTML=tt;
var p=new RegExp('^<pre>|</pre>$','ig');
//alert(tt);
tt=tt.replace(/'/g,'\\\'');
//remove auto-generated tags
tt=tt.replace(p,'\'');
tt=tt.replace(/\n/g,'\\n');
//alert('tt:<'+tt+'>');
//assign string to variable A
A=eval(tt);
var b=A.replace(/\n/g,'|');
$('var').value=b;
}
function repeat() {
var x=$('d');
var direct=new String('repeat?x=');
var toecho=$('x').value;
toecho=escape(toecho);
toecho=encodeURIComponent(toecho);
var count=parseInt($('n').value);
direct=direct.concat(toecho,'&n=',count);
//start request
x.setAttribute('src', direct);
//show request in headerline
$('h').innerHTML=direct;
}
</SCRIPT>
</HEAD>
<H4> functional in Firefox and Opera differently</H4>
<H5> sets the source attribute of the iframe to "repeat?x=sometext&n=counter"<H5>
<H5> x and n are the parameter names used in procedure repeat of tclhttpd-server<H5>
<H3 id='h'>url</H3>
<BODY onload="$('d').contentWindow.document.write('please press the button');$('x').value=unescape('-%e9-%f6%b7 %a5')">
<INPUT id='x'>text to echo</input>
<INPUT id='n' value=7 size=4 maxlength=4>times repeated</INPUT>
<INPUT type=button name=echo value='set iframe-src' onClick=repeat();><BR>
<br><input id='var' size=80> | replaces newline in var A</input><br>
<iframe id='d' onload=show();>
</iframe>
<DIV id='f'></DIV>
</BODY>
</HTML>
======
----
!!!!!!
%| [Category TclHttpd] |%
!!!!!!}} CALL {my revision {tclhttpd content compression}} CALL {::oo::Obj315633 process revision/tclhttpd+content+compression} CALL {::oo::Obj315631 process}
-errorcode
NONE
-errorinfo
Unknow state transition: LINE -> END
while executing
"error $msg"
(class "::Wiki" method "render_wikit" line 6)
invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
(class "::Wiki" method "render" line 8)
invoked from within
"my render $name $C"
(class "::Wiki" method "revision" line 31)
invoked from within
"my revision $page"
(class "::Wiki" method "process" line 56)
invoked from within
"$server process [string trim $uri /]"
-errorline
4