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

Dockimbel
25-Nov-2011
[10957]
Not recently, but yes.
Ryan
25-Nov-2011
[10958]
Excellent work on Cheyenne, Doc! The structure is mostly excellent 
for what I am doing.
Dockimbel
25-Nov-2011
[10959]
I'm glad it's useful to someone. :-)
Ryan
25-Nov-2011
[10960]
One thing I need to do is add encrypted script files. What do you 
think would be the most logical method, modifying source or making 
my own interpreter?
Dockimbel
25-Nov-2011
[10961]
You mean you need to encrypt RSP files?
Ryan
25-Nov-2011
[10962]
or just includes is fine
Dockimbel
25-Nov-2011
[10963]
I guess yo would need to modify the RSP engine for that. The easiest 
way would probably be to create a custom 'include function able to 
decrypt your files.
Ryan
25-Nov-2011
[10964]
Sounds easy enough.
Dockimbel
25-Nov-2011
[10965]
I think that the cleanest way would be then to extend the existing 
INCLUDE function in RSP.r by adding a refinement (/with or /options) 
and use it to pass additional custom data to the INCLUDE function 
(like a 'decrypt word, followed by a key).
Ryan
25-Nov-2011
[10966]
got it. thanks!
Dockimbel
25-Nov-2011
[10967]
You would also need to patch the engine/add-file method where the 
RSP scripts are really loaded.
Ryan
25-Nov-2011
[10968]
patch it to do what?
Dockimbel
25-Nov-2011
[10969x3]
You could add a property to ENGINE object for controlling how files 
are loaded, and set/unset it depending on INCLUDE refinement.
Loading and compilation of RSP scripts are done in ENGINE object, 
not by INCLUDE.
INCLUDE is just the user API front-end.
Ryan
25-Nov-2011
[10972x2]
I see it now.
Where do I find engine?
Dockimbel
25-Nov-2011
[10974]
In handlers/RSP.r
Ryan
25-Nov-2011
[10975]
I ended up replacing the read with one that determines if its encrypted 
by the filename. Decrypts rsp or includes. Works nice. Thanks for 
helping get started on that.
Endo
28-Nov-2011
[10976]
about encap: I'll try to find the problem and if it's not difficult 
I try to fix it as well. I wanted to ask before spending time on 
it. Thank you. Doc: if you already done / test it please let me know. 
I'm planning to use it in a production.
Dockimbel
28-Nov-2011
[10977x2]
I'll do a quick test on that just after finishing the websocket implementation.
Should be in a an hour or two.
Pekr
28-Nov-2011
[10979]
Did the presentation to php audience already happen? What was the 
recpetion of Cheyenne?
Dockimbel
28-Nov-2011
[10980x8]
See: http://cheyenne-server.org/blog.rsp?view=29
Btw, a RSS feed is available for the Cheyenne blog.
There was about 25 people in the audience, a lot moved to other, 
more PHP-focused, conferences at the same time.
Some were very interested by a simple, small and easily deployed 
web server that could run PHP code efficiently.
Websocket support updated to hybi-10 revision. Websocket chat demo 
also upgraded: http://demo.cheyenne-server.org:8080/chat.html
You would need at least one of these browser to use the new websockets 
support: Chrome 14, FF 8 or IE 10.
Janko: I have extended AUTH to be able to return an HTTP code in 
revision 157:


FEAT: AUTH config keyword can now take an optional second parameter 
(HTTP code 4xx or 5xx) that will be returned to client instead of 
a redirection to the login URL.
The first parameter (a URL) is mandatory and should point to the 
resource where login happens (it's a pass-thru, every other URL will 
be redirected or will return a custom HTTP code, if specified).
Kaj
28-Nov-2011
[10988]
Chat demo works with Firefox 8.0.1 on Linux
Dockimbel
28-Nov-2011
[10989x2]
Thanks for testing.
Endo: I have pushed a few fixes for regressions in embedded mode 
support. I'm now looking into the possibility of encapping it that 
mode.
Endo
28-Nov-2011
[10991]
Thank you. I'll test tomorrow morning.
Endo
29-Nov-2011
[10992x2]
encapped embed-demo.exe application gives the following error:

** Script Error: select expected series argument of type: series 
object port
** Where: get-cache
** Near: select cache file
I tested on WinXP Pro SP3. Same error as in r151.
Dockimbel
29-Nov-2011
[10994x2]
I have added a few lines to embed-demo.r to show you how to prepare 
it for encapping with Cheyenne running in embedded mode: 
http://code.google.com/p/cheyenne-server/source/detail?r=161
At line 147, you should read "Comment the following line..." instead 
of "Comment this line..." (fixed in r162).
Endo
29-Nov-2011
[10996x2]
Fantastic! Thanks a lot Doc! Now I can make show to my manager for 
our next project :)
I think it is also possible to include mod-embed.r file. Currently 
embed-demo.exe requires mods/mod-embed.r file (probably the other 
mods as well)
Dockimbel
29-Nov-2011
[10998]
You don't need to include any Cheyenne own files, %cheyenne.r takes 
care about all the required dependencies when encapping.
Endo
29-Nov-2011
[10999x2]
I did not yet test but with this way we can easily write a websocket 
test server application.
So, mod-embed.r should be external anyway?
Dockimbel
29-Nov-2011
[11001x3]
I don't understand what you mean by "external" there?
websocket test server application

: you already have it, just run cheyenne.exe and start writing your 
websocket app.
Btw, the embedded mode is for providing an HTTP server to an existing 
app, not a full-featured Cheyenne. If you want to make a GUI app 
in View for just a few simple interaction with Cheyenne, you can 
just #include your View code in %cheyenne.r.
Endo
29-Nov-2011
[11004]
I don't understand what you mean by 

external" there?" when I copy embed-demo.exe alone to outside cheyenne 
directory, it gives an error like "cannot find the file mods/mod-embed.r". 
So even encapped it requires that file and probably the other modules 
(.r) files.


What I was thinking, when I use embed mode and encap the cheyenne, 
it already includes necessary mod files into encapped exe.
Dockimbel
29-Nov-2011
[11005]
Strange, all the dependent files should be encapped in the executable. 
Testing locally...
Endo
29-Nov-2011
[11006]
Here is the error:
make object! [
    code: 500
    type: 'access
    id: 'cannot-open
    arg1: "/C/Documents and Settings/endo/mods/mod-embed.r"
    arg2: none
    arg3: none
    near: [do any [get-cache file file]]
    where: 'do-cache
]