World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
btiffin 2-Jun-2007 [876] | Well that's good news. That probably means it's just some setting, or weirdo config at this end. And thanks for taking the time to try. Knowing that it can work, will give me the incentive to dig in... |
Dockimbel 2-Jun-2007 [877] | start cheyenne.r with -vv (2 v) option and paste here what Cheyenne answers to your attempts to log in http://localhost/testapp |
btiffin 2-Jun-2007 [878x2] | One sec... |
It's not a short paste... [HTTPd] ================== NEW REQUEST ================== [HTTPd] Request Line=>GET /testapp/ HTTP/1.1 [HTTPd] Request Headers=> Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1) Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive [HTTPd] Phase url-to-filename done ( mod-alias ) [HTTPd] Phase url-to-filename done ( mod-rsp ) [HTTPd] Phase url-to-filename done ( mod-fastcgi ) [HTTPd] Phase url-to-filename done ( mod-static ) [HTTPd] Phase access-check done ( mod-action ) [HTTPd] Phase set-mime-type done ( mod-action ) [HTTPd] Phase make-response done ( mod-rsp ) [HTTPd] Response=> HTTP/1.1 302 Moved Temporarily Server: Cheyenne/0.9.11 Connection: close Location: /testapp/login.rsp [HTTPd] Phase logging done ( mod-static ) [HTTPd] Phase clean-up done ( mod-rsp ) [HTTPd] Connection closed [HTTPd] ================== NEW REQUEST ================== / [HTTPd] Request Line=>GET /testapp/login.rsp HTTP/1.1 [HTTPd] Request Headers=> Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1) Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive [HTTPd] Phase url-to-filename done ( mod-alias ) [HTTPd] Phase url-to-filename done ( mod-rsp ) [HTTPd] Phase url-to-filename done ( mod-fastcgi ) [HTTPd] Phase url-to-filename done ( mod-static ) [HTTPd] Phase access-check done ( mod-action ) [HTTPd] Phase set-mime-type done ( mod-action ) [HTTPd] Phase make-response done ( mod-rsp ) [HTTPd] Response=> HTTP/1.1 200 OK Server: Cheyenne/0.9.11 Content-Length: 482 Content-Type: text/html Connection: Keep-Alive Set-Cookie: RSPSID=EISPOMAZTPDFKVIWJAFONZDE; expires=Sat, 02 Jun 2007 11:54:30 GMT; path=/testapp; HttpOnly Pragma: no-cache Cache-Control: no-cache, must-revalidate Expires: Thu, 01 Dec 1994 16:00:00 GMT [HTTPd] Phase logging done ( mod-static ) [HTTPd] Phase clean-up done ( mod-rsp ) [HTTPd] Phase task-done done ( mod-rsp ) [HTTPd] ================== NEW REQUEST ================== \ [HTTPd] Request Line=>POST /testapp/login.rsp HTTP/1.1 [HTTPd] Request Headers=> Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1) Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost:8080/testapp/login.rsp Content-Type: application/x-www-form-urlencoded Content-Length: 23 [HTTPd] Phase url-to-filename done ( mod-alias ) [HTTPd] Phase url-to-filename done ( mod-rsp ) [HTTPd] Phase url-to-filename done ( mod-fastcgi ) [HTTPd] Phase url-to-filename done ( mod-static ) [HTTPd] Posted data=>login=test&pass=letmein [HTTPd] Phase access-check done ( mod-action ) [HTTPd] Phase set-mime-type done ( mod-action ) [HTTPd] Phase make-response done ( mod-rsp ) [HTTPd] Response=> HTTP/1.1 301 Moved Permanently Server: Cheyenne/0.9.11 Connection: close Location: /testapp/ Set-Cookie: RSPSID=YDADUIONKJPHLFBWEDZDFCXN; expires=Sat, 02 Jun 2007 11:54:37 GMT; path=/testapp; HttpOnly [HTTPd] Phase logging done ( mod-static ) [HTTPd] Phase clean-up done ( mod-rsp ) [HTTPd] Phase task-done done ( mod-rsp ) [HTTPd] Connection closed [HTTPd] ================== NEW REQUEST ================== [HTTPd] Request Line=>GET /testapp/ HTTP/1.1 [HTTPd] Request Headers=> Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1) Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost:8080/testapp/login.rsp [HTTPd] Phase url-to-filename done ( mod-alias ) [HTTPd] Phase url-to-filename done ( mod-rsp ) [HTTPd] Phase url-to-filename done ( mod-fastcgi ) [HTTPd] Phase url-to-filename done ( mod-static ) [HTTPd] Phase access-check done ( mod-action ) [HTTPd] Phase set-mime-type done ( mod-action ) [HTTPd] Phase make-response done ( mod-rsp ) [HTTPd] Response=> HTTP/1.1 302 Moved Temporarily Server: Cheyenne/0.9.11 Connection: close Location: /testapp/login.rsp [HTTPd] Phase logging done ( mod-static ) [HTTPd] Phase clean-up done ( mod-rsp ) [HTTPd] Connection closed [HTTPd] ================== NEW REQUEST ================== [HTTPd] Request Line=>GET /testapp/login.rsp HTTP/1.1 [HTTPd] Request Headers=> Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1) Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://localhost:8080/testapp/login.rsp [HTTPd] Phase url-to-filename done ( mod-alias ) [HTTPd] Phase url-to-filename done ( mod-rsp ) [HTTPd] Phase url-to-filename done ( mod-fastcgi ) [HTTPd] Phase url-to-filename done ( mod-static ) [HTTPd] Phase access-check done ( mod-action ) [HTTPd] Phase set-mime-type done ( mod-action ) [HTTPd] Phase make-response done ( mod-rsp ) [HTTPd] Response=> HTTP/1.1 200 OK Server: Cheyenne/0.9.11 Content-Length: 482 Content-Type: text/html Connection: Keep-Alive Set-Cookie: RSPSID=RTJSUKAVYBNOLCJCJBSTNUHP; expires=Sat, 02 Jun 2007 11:54:37 GMT; path=/testapp; HttpOnly Pragma: no-cache Cache-Control: no-cache, must-revalidate Expires: Thu, 01 Dec 1994 16:00:00 GMT [HTTPd] Phase logging done ( mod-static ) [HTTPd] Phase clean-up done ( mod-rsp ) [HTTPd] Phase task-done done ( mod-rsp ) | |
Dockimbel 2-Jun-2007 [880x3] | Your browser is not sending cookies back to Cheyenne. |
That's why it keeps looping on the login page. | |
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) | |
older newer | first last |