World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Graham 13-Feb-2010 [7937] | me too |
Carl 13-Feb-2010 [7938x4] | The "magic" RSP line is: <% insert tail response/buffer request/posted %> |
so, now, need to throw some binary at it.... | |
>> write http://host4.altme.com/echo.rsp#{0209103040508898af} == #{0209103040508898AF0A0A} Good to go. | |
Ok... basically got it working, but it's very slow due to hitting a timeout on each packet. | |
Graham 13-Feb-2010 [7942x2] | Why is it timing out? |
And is this a http timeout or a cheyenne timeout? | |
Carl 13-Feb-2010 [7944x2] | The core of the problem is that SET-MODES port [close: false] is not supported in 2.7. Without it, we cannot close half of the duplex socket. |
In other words, there is no socket shutdown() function. | |
Graham 13-Feb-2010 [7946] | so the client times out ... |
Carl 13-Feb-2010 [7947x3] | The server's input request packet times out. |
Ok, no problem... will add content-length field. Shouldn't take much time. | |
So, R3 Chat server has been moved to Dallas TX running in Cheyenne on a cloud. | |
Graham 13-Feb-2010 [7950] | Not logging in though |
Maxim 13-Feb-2010 [7951] | working for me. |
Graham 13-Feb-2010 [7952] | --- Note: login initiated *** RebDev Error: server connection failed, is server down? (server-failed) |
Maxim 13-Feb-2010 [7953] | probably a DNS issue... he has changed servers... so the IP surely has changed? |
Graham 13-Feb-2010 [7954x3] | POST /cgi-bin/rebdev HTTP/1.0 Accept: */* Accept-Charset: utf-8 Host: host.rebol.net User-Agent: REBOL Content-Type: application/x-www-form-urlencoded; charset=utf-8 Content-Length: 56 [0.4.0 "Graham" password login]HTTP/1.1 500 Internal error in REBOL CGI Proxy Date: Sun, 14 Feb 2010 02:05:45 GMT Server: Apache/2.0.53 (Fedora) Content-Type: text/plain; charset=UTF-8 Via: 1.1 bc7 Connection: close Cannot connect (3) |
I believe it has shifted from rebol.net . | |
Found the issue ... http://www.rebol.com/r3/chat.rwas being cached. Refreshed it in my browser until I got the new version and now it is working again. | |
Dockimbel 14-Feb-2010 [7957] | SVN revision 72: File uploading improvements (changes might break older scripts) FEAT: File upload management improved, in-memory uploading removed for consistency. FEAT: request/store specifications changed. Now it renames the temp file to its original name by default. Use the new /as refinement to move the file (see Changelog). FEAT: New complete example of file uploading (client and server-side) in www/ folder. FEAT: New config keyword: 'incoming-dir <%/path/> to specify a custom incoming folder per domain or per webapp. |
Dockimbel 15-Feb-2010 [7958x2] | Btw, thanks to Will for improvements in the upload.html demo and to Oldes for its frequent feedbacks. |
its => his | |
Oldes 15-Feb-2010 [7960] | Maybe a silly question, but why Carl uses: <% insert tail response/buffer request/posted %> instead of: <% print request/posted %> |
Dockimbel 15-Feb-2010 [7961x2] | or just <%=request/posted%> :-) |
He's using <% insert tail response/buffer send-chat request/posted %>. So the shorter version would be : <%= send-chat request/posted %> | |
Oldes 15-Feb-2010 [7963x2] | Yes... already posted as a comment to his blog. |
Anyway.. I thought that APPEND is already a native in R2 as well. It's not. | |
Dockimbel 15-Feb-2010 [7965x2] | Strange, your blog comment code line appears empty here both in Chrome and IE8, but ok in FF?? |
Might be an XP related issue, will try with Seven. | |
Oldes 15-Feb-2010 [7967] | It looks that FF converts < > chars automatically inside PRE. It should be converted on the server side I think. |
jrichards 16-Feb-2010 [7968] | Can someone give me some guidance on the following I keep getting a decoding error. <% fname: request/content/fname lname: request/content/lname spouse: request/content/spouse address: request/content/address city: request/content/city state: request/content/state zip: request/content/zip h_phone: request/content/h_phone c_phone: request/content/c_phone email: request/content/email do-sql 'bugs ["INSERT INTO names VALUES (?,?,?,?,?,?,?,?,?,?)"fname lname spouse address city state zip h_phone c_phone email ] %> |
Graham 16-Feb-2010 [7969x3] | What does trace.log say? |
BTW, I normally do it this way fname: any [ select request/content 'fname copy "" ] so that the variable is always a string ... | |
Also, I specify the field names ... so I've never used your syntax sql: do-sql 'bugs [ {insert into names ( fname, lname, spouse .... ) values (?, ?, .... ) } fname lname .. ] | |
jrichards 16-Feb-2010 [7972] | Thanks Graham I'll give your methods a shot. I'm just a newbie trying to learn so I put the listed code together from what documentation I could find. |
Oldes 17-Feb-2010 [7973x2] | Is there any inbuilt way how to store per-session data which are not sent to client as a cookie? |
Or the session is used only to store the data inside cookies? | |
Dockimbel 17-Feb-2010 [7975] | There's *no data* sent as cookies. Cheyenne session cookies are just hash keys. |
Oldes 17-Feb-2010 [7976x2] | So I can strore sensitive informations inside? Good to know. |
jim: it's also good to use validate function before you process the request content! | |
Dockimbel 17-Feb-2010 [7978x2] | RSP sessions purpose is to provide a way to store temporary persistent data efficiently (in memory) across client requests (the alternatives are storing data on disk in flat files or databases). RSP session data is lost when the session expires or when you restart Cheyenne without using the 'persist config directive. |
Right, for both Jim and Graham, 'validate is the way to go : http://cheyenne-server.org/docs/rsp-api.html#def-23 | |
Oldes 17-Feb-2010 [7980x2] | What about improving validate to produce default values for missing content? |
(produce = provide) | |
Dockimbel 17-Feb-2010 [7982x2] | Validate already assign a 'none value to missing parameters. |
assigns | |
Oldes 17-Feb-2010 [7984x2] | Yes... but in most cases you don't want none and you and up using code similar to Graham's |
Also the Jim's code does not looks much friendly - too many request/content/ paths. | |
Dockimbel 17-Feb-2010 [7986] | Request parameters are used to transport data from client to server. If a parameter is not sent, having 'none seems appropriate. Setting them to anything else "by default" will make you loose this important information. |
older newer | first last |