World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Dockimbel 2-Jun-2007 [882] | RSP sessions (and web-apps) require that cookies support be enabled in the browser. |
btiffin 2-Jun-2007 [883] | Ok, I'll track that down..I've got cookies turned on, accept from all sites.But I'll start looking at other settings. |
Dockimbel 2-Jun-2007 [884] | Strange... |
btiffin 2-Jun-2007 [885x2] | It'll be something simple :) |
Once I get the agenda for IRUA meeting two posted, I'll try it out with Wine and IE. | |
MikeL 2-Jun-2007 [887x2] | i had trouble getting virtual hosts to work with other servers. This works very nicely |
; To add a new virtual host just duplicate and fill the following ; example host : ; ; my.vhost.com [ ; root-dir %/www/ ; documents root directory ; default [...] ; default files ; ] | |
btiffin 2-Jun-2007 [889x2] | Sorry Doc, I'm getting the same failure cases in IE under Wine. But now that I know that you have it working, I'll start poking around and exploring this setup... |
Can I make one suggestion? The clients/rconsole.r prompt should be something like R> instead of >>. I've typed q into the wrong window twice now. :) So I modified my copy of the client. Nice feature by the way. | |
Dockimbel 2-Jun-2007 [891] | You're right, I get caught a few times too :-) |
btiffin 2-Jun-2007 [892] | I've been playing. login.rsp <% user: "test" pass: "letmein" print [<html> <body> <pre>] help request help request/content help session help session/content print [</pre> </body> </html>] in-user: select request/content 'login in-pass: select request/content 'pass if all [user = in-user pass = in-pass][ session/content/login?: yes response/redirect "/testapp" ] %> REQUEST/CONTENT is a block of value: [] Everytime through...first time and after filling in the login form. |
Graham 2-Jun-2007 [893x3] | My working login.rsp script ... <% in-user: select request/content 'login in-pass: select request/content 'pass encoding-salt: to-binary "My encryption string" print [ <p/> "Login is: " in-user " and pass is " in-pass <p/> ] encode-pass: func [ pass [string!] salt [binary!] ] [ checksum/secure append to binary! pass salt ] if all [ in-user in-pass ][ print <pre> qry: rejoin [ {select staffname, sid, fullname from staff where staffname = '} in-user {' and pwd = '} form encode-pass in-pass encoding-salt {'} ] probe qry print </p> sql: do-sql 'remr qry print [ "Query result: " sql ] print </pre> if found? sql/1 [ response/redirect "/testapp/" ] ] %> |
No need to give hint to user that userid or password is incorrect ... ! :) | |
oops .. should add session/content/login?: yes | |
btiffin 2-Jun-2007 [896] | I'm still stuck. Not getting past the login screen at all. Did you modify anything else... httpd.cfg? or app-init.r or ... |
Graham 2-Jun-2007 [897] | nope |
btiffin 2-Jun-2007 [898] | Hmm... request/content is empty on response/redirect "anything" everytime. |
Graham 2-Jun-2007 [899x3] | what does the debug say? |
should there be any content until you have submitted the form? | |
It should be empty first off | |
btiffin 2-Jun-2007 [902] | If I turn on debug in webapp in httpd.cfg I get the Redirection catched everytime. The contents are empty, before and after the "POST", but I'm not sure since the redirect is plopping me back at login.rsp. Even empty when I change the form to method="GET" and hit return... |
Graham 2-Jun-2007 [903] | I'm on win32 at present so can't test it under linux |
btiffin 2-Jun-2007 [904x2] | This change in-user: "test" in-pass: "letmein" if all [user = in-user pass = in-pass][ session/content/login?: yes response/redirect "/testapp/" ] Causes Ice Weasel to catch an "improper redirect" |
I just know this is going to end up being something simple :) | |
Graham 2-Jun-2007 [906x3] | what happens if you just remove the test ? |
and do the redirect ? | |
session/content/login?: yes response/redirect "/testapp/" | |
btiffin 2-Jun-2007 [909x3] | I was just going to try that... I started up cheyenne with -vvv this time :) |
Ice weasel caught improper redirect... | |
Changed to response/redirect "/show.rsp" (out of the testapp dir, to www/show.rsp) No request variables, no session... | |
Dockimbel 2-Jun-2007 [912] | Brian: are you using a local proxy or special plugins for Ice weasel ? |
btiffin 2-Jun-2007 [913x2] | Nope...never with the plugins :) Well except flash. |
I know that this is going to be a DOH! when it starts working :) Something my eye isn't catching... | |
Dockimbel 2-Jun-2007 [915] | try with : http://localhost/manual.rsp(manualy starting the session, then see the /show.rsp) |
btiffin 2-Jun-2007 [916x2] | Tried a few times. Start Session, redisplays as Start Session... I've plopped a few help lines in the manual.rsp. |
I've enpro 'ed cheyenne.r same fail cases... | |
Will 2-Jun-2007 [918] | tryed on port 8080 or 80? do other website write cookie in your browser and you can see them? |
btiffin 2-Jun-2007 [919x2] | Yep. Lots of cookies. :) |
I'm going to config for port 80 and try from root.... | |
Will 2-Jun-2007 [921] | tray removing this line at the end of mod-rsp: insert tail out "; HttpOnly" |
Dockimbel 2-Jun-2007 [922] | I've only tested as root on my linux virtual box. |
btiffin 2-Jun-2007 [923x3] | Same fail cases from root...I'm going back to user mode. :) |
I'm about to try Will's last suggestion | |
I'm going to try some REBOL code I can execute to get out of 'browser' mysteries. raw-http type stuff, for tests...one minute (or two) | |
Will 2-Jun-2007 [926x2] | then I would say use any tool that permit you to see the header request/response, look closely what working websites sen in the response header for set-cookie change the mod-rsp to send the same apart from the RSPSID=xxx , eg remove path and expiration date |
sen=send | |
btiffin 2-Jun-2007 [928] | Cool. Thanks for the tip... |
Will 2-Jun-2007 [929] | the cookie must be set, otherwise maybe the browser has special rules for order of headers (shouldn't), on wine what version of window and IE did u try? |
btiffin 2-Jun-2007 [930] | Umm, I'll have to look at the wine and Ie versions...one sec |
Will 2-Jun-2007 [931] | did you try only on localhost ? can you add something like "127.0.0.1 domain.local" in your /etc/hosts file and in the http.cfg add a corresponding domain preference |
older newer | first last |