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

Graham
7-Oct-2008
[2969x3]
I want to be able to edit my rsp pages remotely, and I've got this 
file here called edit.rsp
<html>
<title>
Editor
</title>
<body>

<%

filename: to-file request/content/filename
if (suffix? filename) <> %.rsp [ quit ]
; if filename = %edit.rsp [ quit ]
either source: select request/content 'source [
	; a http post, so save it
	write filename dehex source
][
	source: read filename
]


val-tag: rejoin [ {<input type="hidden" value="} form filename {" 
name="filename">} ]
replace/all source "<" "&lt;"
replace/all source ">" "&gt;"

print rejoin [
<form method="POST" action="/hylafax/edit.rsp">
<input type="submit" value="Save">
<hr>
<textarea rows="40" cols="140" name="source" > source
</textarea>
val-tag
<p/>
<input type="submit" value="Save">
]
include-file %footer.inc
%>
Problem is, if I edit edit.rsp using edit.rsp, then my entities get 
changes to their equivalents

So, this line

replace/all source "<" "&lt;"

gets changed to 

replace/all source "<" "<"

No matter .. just figured it out!

replace/all source "<" join "&" "lt;"
Chris
7-Oct-2008
[2972]
Shouldn't you also escape ampersands?
Nicolas
7-Oct-2008
[2973]
Hi, I'm new to cheyenne. I've tried http://localhost/and I get 
the message It works!. But I can't view my site.  How can I ? Any 
tips?
Henrik
7-Oct-2008
[2974]
Where do you store your site?
Graham
7-Oct-2008
[2975]
I tried escaping ampersands and that got really wierd.
BrianH
7-Oct-2008
[2976]
In the case above you are using ampersands properly.
Graham
8-Oct-2008
[2977x2]
Are RSP errors logged as well?  Or just to the web page?
Trying to debug other people's RSP errors where the client doesn't 
record them :(
Dockimbel
8-Oct-2008
[2979x3]
Look in latest v0.9.19. By default, RSP errors are catched and logged 
in a %rsp-errors.log file in Cheyenne's home directory. It works 
well for RSP webapps, but not really tested yet for standalone RSP 
scripts (there might be some bug/issue in that case).
See the changelog file.
Production vs Debug mode. In Production mode, when an RSP error occurs, 
Cheyenne displays a general error page (or a custom one if defined 
in config file) and logs the error on server.
Graham
8-Oct-2008
[2982x2]
this was a standalone rsp page.
and tehre is no %rsp-errors.log file in the %Cheyenne directory.
Will
8-Oct-2008
[2984]
I have errors mailed to me and a code 204 returning to the client 
8-)
Graham
9-Oct-2008
[2985]
Is there a chance to use basic authentication instead of using cookies 
to access pages inside the webapp?
Terry
9-Oct-2008
[2986]
you would need to pass some kind of identifier with each REST.. the 
web is stateless
Graham
9-Oct-2008
[2987x3]
I think Cheyenne's webapps are protected by cookie authentication
I need to access some images inside the webapp from a Rebol plugin.
I could store the images in the public directory ... but that's not 
secure.
Terry
9-Oct-2008
[2990]
You're using the plugin? Good luck
Graham
9-Oct-2008
[2991]
trying ... trying ... trying ...
Henrik
9-Oct-2008
[2992]
I'm not sure you can pass binaries from the DOM to the plugin, if 
that is what you are trying.
Graham
9-Oct-2008
[2993]
nearly there!
Terry
9-Oct-2008
[2994]
You need a proxy.
Graham
9-Oct-2008
[2995]
why?
Terry
9-Oct-2008
[2996x2]
Can a plugin manipulate the DOM of the page?
REBOL/Plugin includes a function callable from REBOL scripts, do-browser, 
that allows you to execute and retrieve the result of browser script 
code. This script code may manipulate the browser's document object 
model (DOM), giving you the ability to interact with other elements 
in the HTML page.
Graham
9-Oct-2008
[2998]
so I could load the image as normal and then use the plugin to access 
the image?
Terry
9-Oct-2008
[2999x2]
yeah
well, you access some JS.. and it manips the image
Henrik
9-Oct-2008
[3001]
Yes, the plugin can manipulate the DOM. I still don't think you can 
load binaries into the plugin from  the DOM
Terry
9-Oct-2008
[3002]
you can message the plugin
Graham
9-Oct-2008
[3003x4]
eeek ..need to switch to plugin group
Looks like my cheyenne server has crashed ...
http://compkarori.no-ip.biz:8001/
static pages ( index.html ) work .. but cgi and rsp don't.
Terry
9-Oct-2008
[3007x2]
Security Error: Content at http://compkarori.no-ip.biz:8001/ may 
not load or link to chrome://firebug/content/highlighter.css.
In other words, I can't see it in Firebug
Graham
9-Oct-2008
[3009]
Just a crash involving cgi and rsp.  Static pages are still okay.
Dockimbel
9-Oct-2008
[3010x2]
I've seen that happen here too in rare cases (cause undetermined). 
If you can run the %UniServe/clients/rconsole.r script on your server, 
you should check for this :
probe uniserve/services/task-master/shared/pool-count
Graham
9-Oct-2008
[3012]
I'lll have to wait to I get to work .. unfortunately I don't have 
vnc access to this box
Dockimbel
9-Oct-2008
[3013]
In some cases, this value can be messed up and Cheyenne doesn't seem 
able to start a new process anymore. I've made a small improvement 
in v0.9.19, but I'm unsure how if it will be really efficient.
Graham
9-Oct-2008
[3014]
I'd better upgrade to 9.19
Dockimbel
9-Oct-2008
[3015]
Right, but test well your RSP webapps first with this new version 
before upgrading in production.
Graham
9-Oct-2008
[3016x2]
Odd .. crashed on me again.  the above probe said 8
This is with 9.19
Dockimbel
10-Oct-2008
[3018]
Have you identified the pattern of actions causing that ?