AltME: R3 Protocols

Messages

Luis
Apparently sometimes hangs for some seconds, finally reach the end.
Is good for me.
Thanks !
amacleod
I believe this is where I got the prot-ftp.r script originally: https://github.com/gchiu/Rebol3/tree/master/protocols
Should be changed...
Never mind that links to same version...

Cyphre
Not sure if this it the case but in current R3 you have to wait on the port that operates on the real connection (usually tcp scheme). If you wait on the 'topmost' port used by some higher-level scheme the real 'connection port' will be awaken but not the 'topmost' one.
To solve this annoyance, we probably need to introduce new field to the port object (like port/parent-port) using which the AWAKE handler can find the top-most port easily and resolve correctly waiting on higher-level scheme wrappers.
GrahamC
I'd like to use the term socket to indicate the real tcp-level port to ease the terminology confusion here.  And yes, the ftp protocol does do a wait on the socket.  It works fine in other OS, just not Android according to Luis' tests.

GrahamC
@Luis .. I think the issues you were having with ftp protocol on Android are related to the alpha event handling on Android.
Cyphre could confirm.
Cyphre
Graham, it could be...Luis, if you have any simple test script (preferably using some free test ftp account so I don't need to create one) I could quickly try here to see what's goign on.
Luis
Cyphre: I am using http://www.byethost.com/ (you can register using  www.10minutemail.com  ) only need change line at https://github.com/gchiu/Rebol3/blob/master/protocols/prot-ftp.r#L583 .

GrahamC
I'd like to modify the http protocol so that I can do this
page: write http://www.rebol.com [ headers GET / ]
so that I return the headers and body.  Any thoughts on this?
Obviously the main idea is to be able to grab the cookies.
If people think this is worthwhile, I'll make a PR on one of the Rebol3 repos that is being actively maintained
Maxim
I think its a good idea (actually, almost essential in today's web environment) .
Maxim
when doing a successive read, there should also be a transparent way to modify and re-submit the same cookies... say, by adding a cookies attribute to the http port and maybe a few functions for modifying them (add, redate, update)
Cyphre
Luis, thanks...will give it a try hopefully soon.
GrahamC
@Maxim, I can't see how you'd do this using successive reads since the http protocol doesn't preserve state.  and currently if you open a port, you lose access to the write dialect.

GrahamC
write http://www.rebol.com [ HEAD / ]
now returns the last modified date correctly
Added a 'headers keyword in the write dialect to return the headers
page: write http://curecode.org/rebol3/view-tickets.rsp [ headers GET / ]
page/spec/debug/headers will now contain the headers for the page returned, including the cookies
and page/data will contain the web page data
Rondon
Hi Folks, How can I  use the https using R3. I'm using the saphirion Core distribution. Any tips?
I was using Rebol Commnad before but now I'm receiving the error .
Command Error: SSL error: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

Last message posted 489 weeks ago.