r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Cheyenne] Discussions about the Cheyenne Web Server

Kaj
4-Mar-2009
[4106x5]
So far, for the new versions, only the recipes for building from 
source:
http://syllable.cvs.sourceforge.net/viewvc/syllable/syllable/system/apps/utils/Builder/packages/uniserve-0.9.33/
http://syllable.cvs.sourceforge.net/viewvc/syllable/syllable/system/apps/utils/Builder/packages/cheyenne-0.9.19/
The previous versions are included in Syllable Server and the new 
Cheyenne will be included in the next Syllable Server:
http://web.syllable.org/Linux/downloads.html
Dockimbel
4-Mar-2009
[4111]
Nice work.
Graham
5-Mar-2009
[4112x8]
This is a video of my RSP pages showing binary at the top of the 
page.  http://screencast.com/t/WD2j8PJtse
The binary appears on a new RSP session
It will go away if I restart Cheyenne
Is there anything I can do to debug what is going on?
Each time I go to the RSP page, more binary appears above my html.
I'm running an command  encapped version of 9.19 ( I presume there's 
no difference between the earlier 9.19 and the official release )
you can try it yourself ... http://www.compkarori.co.nz:8000
I suspect I did somethng while writing some buggy rsp code
Dockimbel
5-Mar-2009
[4120]
- The garbage binary data looks like compressed data. 

- "more binary appears..." => issue with a string! or binary! buffer 
not cleared or initialized as literal value instead of using MAKE.

- "...above my html" => check your 'on-page-start event handler in 
%app.init.r
Graham
5-Mar-2009
[4121x4]
on-page-start: has [][
	set 't0 now/time/precise
]
REBOL [
	Purpose: "RSP environement init code"
]

on-application-start: does [
	;--- add here your library / modules loading
    *do %private/captcha.r
    captcha/set-fonts-path %private/fonts/
]

on-application-end: does [
	;--- add here your library / modules proper closing
]

on-session-start: does [
	;--- add here your per session init code
	;--- ex: session/add 'foo 0
	;--- that can be latter accessed with : session/content/foo
	
	session/add 'user "guest"
	session/add 'hits 1
]

on-session-end: does [
	;--- add here your per session closing/cleanup code

]

on-page-start: has [][
	set 't0 now/time/precise
]

on-page-end: has [pos time][
	if pos: find response/buffer "</body>" [
		time: to-integer 1000 * to-decimal (now/time/precise - t0)
		insert pos reform [
			"<br><br><small>Processed in :"
			either zero? time ["< 1"][time]
			"ms.</small>"
		]
	]
]
nothing special ...
This has happened a few times now .. I mentioned it before.  And 
usually only when I am rewriting RSP code.
Dockimbel
5-Mar-2009
[4125]
Are you using encmd v2.7.6 for encapping?
Graham
5-Mar-2009
[4126]
yes
Dockimbel
5-Mar-2009
[4127]
running on Linux?
Graham
5-Mar-2009
[4128x3]
windows
I need cmd for the odbc
If there's nothing I can do to debug this, I'll restart cheyenne
Dockimbel
5-Mar-2009
[4131x4]
You can restart it, I've a copy of the output.
The garbage data seems to increase by 830 bytes each time.
I thought it might be an internal response/buffer corruption (not 
been clear after the request), but the compressed size of the page 
is only 442 (in deflate format).
You should carefully examine each use of response/buffer in your 
RSP code. See if you're not inserting in response/buffer a growing 
 series?
Graham
5-Mar-2009
[4135x3]
server restarted
the only response/buffer I have is ...
nothing
Dockimbel
5-Mar-2009
[4138x2]
You should at least have one occurence for the captcha image
Need to go now, will give it a look tonight.
Graham
5-Mar-2009
[4140]
no, I do have this too ...
		response/buffer: xfdf

        response/set-header 'Content-type "application/vnd.adobe.xfdf"
Dockimbel
5-Mar-2009
[4141x2]
ah :-)
A suspect :)
Graham
5-Mar-2009
[4143]
Ok, let me look at the captcha
Dockimbel
5-Mar-2009
[4144]
Inpect first xfdf
Graham
5-Mar-2009
[4145]
xfdf: {<?xml version="1.0"?>
<xfdf xmlns="http://ns.adobe.com/xfdf/"xml:space="preserve">
<fields>
<field name="Submit"><value>Send</value></field>
<field name="TextField1"><value>$fname</value></field>
<field name="TextField2"><value>$surname</value></field>
<field name="syupdfid"><value>$syupdfid</value></field>
</fields>
<f href="$myhost/testpdf4.pdf?$time"/>
</xfdf>
}
Dockimbel
5-Mar-2009
[4146x2]
Look like we found the culprit :-)
I guess you're appending data to xfdf ?
Graham
5-Mar-2009
[4148x2]
xfdf: copy { }
I should fix that.
Dockimbel
5-Mar-2009
[4150]
:-)
Graham
5-Mar-2009
[4151]
rsp and not cgi
Dockimbel
5-Mar-2009
[4152]
Right
Graham
5-Mar-2009
[4153x3]
:(
thanks ...
If anyone is wonderng what I am doing, I am prefilling in PDF forms 
and sending them to the client browser