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
9-Jun-2007
[1397x4]
I'm thinking this is not a good error to get ..

Script: "Untitled" (none)
## Error in [task-handler] : Make object! [
    code: 316
    type: 'script
    id: 'no-memory
    arg1: none
    arg2: none
    arg3: none
    near: [insert tail series :value]
    where: 'append
] !
/
I think it happened when I left the trailing %> off a rsp page.
How about including a global url-encode function ?
Or, where is the appropriate place to define globals like this?
Dockimbel
9-Jun-2007
[1401x2]
Url-encode is already defined and available in RSP scripts ;-)
I've just fixed the error you've reported.
Graham
9-Jun-2007
[1403x11]
I've got a new problem
could be mea culpa
but login as guest / 1234
https://www.compkarori.co.nz/
Click on results
click on "O2 Sat" at the bottom there
Now the url looks okay at the top, but the request url is wrong
in the rsp debug
good to know about url-encode :)
also the values in the request content show up with double quotes
eg. {"value"}
Dockimbel
9-Jun-2007
[1414x3]
  in parameters value =
=> known bug
will be fixed in next release (should be tonight)
Graham
9-Jun-2007
[1417]
Ok, thanks
Dockimbel
9-Jun-2007
[1418]
double quotes, that's normal they are present in the URL : https://www.compkarori.co.nz/testapp/filteredhl7.rsp?rtype="O2Sat"
Graham
9-Jun-2007
[1419x2]
Is the bug database online Yet ?
Ok.  About the double quotes
Dockimbel
9-Jun-2007
[1421x3]
unfortunately, not yet, I'll try to put it online after the next 
Cheyenne release (so, it could be online tomorrow).
Quick patch for url-encoded value bug: 

1: in %HTTPd.r find the 'parse-request-line function
2: change the following line :

    parse/all dehex ctx/status-line: copy line [
to
    parse/all ctx/status-line: copy line [

3: change the following line :

    ctx/url: path: trim url
to    
    ctx/url: path: dehex trim url
Marteen: about docs, the RSP API document will be published tonight 
with the new release. The module API is still incomplete and the 
general Cheyenne main doc is still pending (scheduled to be released 
for 13/06).
Maarten
9-Jun-2007
[1424]
Sounds good!
amacleod
9-Jun-2007
[1425]
I'm having trouble getting Cheyenne to display web page with an absolute 
path. It works when Root-dir is set to  %/www/ but when I set it 
to the absolute path ...say %"C:/Rebserver/Cheyenne/www/" I can not 
get hte default page but I do get my test.php script to work.
MikeL
9-Jun-2007
[1426]
It works for me but you might want to try using the rebol format 
on the directory name %/c/rebserver/cheyenne/www/
amacleod
9-Jun-2007
[1427]
That works. Thanks Mikel
Graham
9-Jun-2007
[1428]
url-encoded patch working :)
Dockimbel
9-Jun-2007
[1429]
Cheyenne release v0.9.14 beta. Download at http://softinnov.org/tmp/cheyenne-r0914.zip

Changelog :

o response/forward improved : 

 - fully supports URLs as argument (can now forward to another virtual 
 host).
	- URL validity check (must have an explicit target).
	- protection against cycles.


o Command line option -p extended, now you can specify several listen 
ports separated
   by a comma (ex: -p 80,10443).


o New command line option -e : load and initialize Cheyenne without 
entering the

   event loop (needed for embedding Cheyenne in third party apps).


o Added a new experimental module: mod-embed. Purpose is to allow 
easy Cheyenne

   integration in third-party REBOL applications that require an embedded 
   web
   server. (Uncomment mod-embed in httpd.cfg file to activate it)


o Added %embed-demo.r file to show a sample of the mod-embed usage 
and API. 

o RSP: <% without %> eats all the memory. Fixed.

o URL-encoded request values were not parsed correctly. Fixed.


o RSP: fixed a typo in 'decode-params blocking the multipart data 
decoding and
   also a local word ('type) leaking in GC.

o UniServe's service startup refactored to be more flexible.



The new mod-embed is experimental. Please look at the %embed-demo.r 
file and send your feedbacks here.
Terry
9-Jun-2007
[1430x5]
the mad Doctor cranking it out ;)
so, i take it each  mod-embed can have it's own listen port?
hmm.. followed the instructions.. uncommented the httpd.conf (need 
to comment out the others??)

[uniserve] Async Protocol FastCGI loaded
[uniserve] Starting task-master...
[uniserve] Starting HTTPd...

## Error in [uniserve] : On-received call failed with error: make 
object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'in
    arg2: 'object
    arg3: [object! port!]
    near: [if in site 'on-request [
            if site/on-request req params svc [return true]
        ]]
    where: 'handler
] !
ahh ok.. need to run embed-demo.r rather than cheyenne.r.. working 
fine now
very very cool.. perfect for this current project
btiffin
9-Jun-2007
[1435]
This is somewhat historic imho.  Embedding a full featured web server...historic.
Terry
9-Jun-2007
[1436x4]
Well, you could do this with Uniserve long ago.. just not with such 
ease and organization.
trailing slashes seem to play an important part.. will this be an 
issue with improperly formed urls?
cookies still not working with xp ?
Ok.. sessions work if i use 127.0.0.1 rather than localhost
Graham
9-Jun-2007
[1440x3]
Script: "Cheyenne Web Server" (9-Jun-2007)
Script: "Untitled" (none)
[uniserve] Async Protocol FastCGI loaded
[uniserve] Starting task-master...
[uniserve] Starting HTTPd...
make object! [
    code: 300
    type: 'script
    id: 'no-value
    arg1: 'do-events
    arg2: none
    arg3: none
    near: [do-events]
    where: none
]
>>
Needs rebol/view ???
>> do-events: func [
[        "Process all View events."
[    ][
[        wait []
[    ]
>> do %cheyenne.r
Script: "Cheyenne Web Server" (9-Jun-2007)
Script: "Untitled" (none)
[uniserve] Async Protocol FastCGI loaded
[uniserve] Starting task-master...
[uniserve] Starting HTTPd...
Will
9-Jun-2007
[1443]
in cheyenne.r:
- if unset? 'do-events [do-events: does [wait []]]
+ if not value? 'do-events [do-events: does [wait []]]
Graham
9-Jun-2007
[1444x2]
must be a mistake
instead of using do-events, just use wait []
Dockimbel
10-Jun-2007
[1446]
do-events == wait [ ], the docstring inside do-events func spec is 
not accurate, it should be "Process all events".