better post, get, cookie support?
[1/12] from: petr::krenzelok::trz::cz at: 27-Aug-2002 7:01
Hi,
sometimes I talk to rebollers (or they do talk to me:-), and I can
notice some thigns are a bit diffucult to do in Rebol. As I can see all
those POST method scripts here, I have to ask - RT is now open to
changes, some of you guys are pretty well skilled in Rebol - could
something be done about better POST, GET, cookie support in Rebol?
Simply having one good aproach, being used by all of us, not just pieces
of scripts sent to ml every here and there, upon someone's request?
I could provide lib-cookie to start with - it is basically slightly
changed Maarten's version, taken from Rugby ... so - what do you think?
Cheers,
-pekr-
[2/12] from: al:bri:xtra at: 27-Aug-2002 19:22
pekr wrote:
> ...could something be done about better POST, GET, cookie support in
Rebol?
I don't know. My GET software is becoming a special purpose dialect. One
dialect for my Rebol/Wiki, and another dialect for my other CGI scripts. I
haven't yet got enough experience with them to say to people, "this is
really good, you should use this as well."
As well, I want to make a round trip through the browser, giving a function
a block of Name Value pairs, and then receiving back the modified values
after the user has finished altering them. That would involve form creation,
then at least one CGI GET or POST as appropriate.
Andrew Martin
ICQ: 26227169 http://valley.150m.com/
[3/12] from: joel:neely:fedex at: 27-Aug-2002 6:44
Hi, Andrew and Petr,
Andrew Martin wrote:
> pekr wrote:
> > ...could something be done about better POST, GET, cookie
> > support in Rebol?
>
I'd like to second (third?) that sentiment. REBOL made such
great strides in unifying 'Net protocols by allowing READ to
operate transparently across the local file system, HTTP, FTP,
etc. on the client side, but then fell apart on the server
side with all of the unnecessary complexity in handling GET
vs. POST, the query string, etc.
I really thing someone should have looked at the implementation
of the CGI module in Perl, which can be invoked to hand back an
object that simply provides all of the parameters and headers
in a simple interface without having to worry about whether the
request was a GET or a POST, without any complexity over
getting all of the POST content, etc...
...
> As well, I want to make a round trip through the browser,
> ... That would involve form creation,
> then at least one CGI GET or POST as appropriate.
>
The other thing that is severly missing is any ability to get
to the environment (and I really hope somebody can show me that
I've missed something here!)
For example, there is a widely-used security product that handles
userlogin/authentication as a plug-in to the web server. It
offers very sophisticated, fine-grained management of resources,
including distributed management of user identity and priveleges,
workflow management for authentication/authorization, and single-
sign-on capability that can span multiple servers and apps.
Once a user has logged in to a protected app, this product can
allow entry to any other protected app (to which that user has
access, of course) without the need for another login cycle. It
can be configured to pass any directory-based information about
the user to the application that the user is accessing (e.g. for
customization to the individual user). It passes this user
information by setting environment variables (configurable by the
developer) to contain whatever user-specific data is desired/needed.
However, this assumes that the app (CGI) can read the environment!!!
Passing configuration and data via the environment is such a
frequently-used technique that I'm amazed that REBOL can't deal
with it, yet I've been unable to find any way to do so. Can
anybody help my ignorance, or is this a real omission?
-jn-
--
; Joel Neely joeldotneelyatfedexdotcom
REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip
do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] {
| e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]
[4/12] from: gchiu:compkarori at: 28-Aug-2002 1:29
I would like to know if there's a simple way to send and
receive cookies under https ...
--
Graham Chiu
[5/12] from: reffy:ulrich at: 27-Aug-2002 9:30
ahhhhhh the application framework rears its ugly head ??
[6/12] from: gscottjones:mchsi at: 27-Aug-2002 8:24
Hi, Joel,
From: "Joel Neely"
<snip>
> The other thing that is severly missing is any ability to get
> to the environment (and I really hope somebody can show me that
> I've missed something here!)
Is this the REBOL object that you seek?
system/options/cgi
Sample script:
#!/path/to/rebol --cgi -s
REBOL []
print "Content-Type: text/html^/"
print <html>
env: first system/options/cgi
foreach env-var env: next env [print [to-word env-var "=" get in
system/options/cgi env-var <br>]]
print </html>
--Scott Jones
[7/12] from: g:santilli:tiscalinet:it at: 27-Aug-2002 15:26
Hi Joel,
On Tuesday, August 27, 2002, 1:44:50 PM, you wrote:
JN> The other thing that is severly missing is any ability to get
JN> to the environment (and I really hope somebody can show me that
JN> I've missed something here!)
It's likely that REBOL has such a thing internally, but it is not
exposed to the user; I really don't understand why. It's the same
issue as the GET-VALUE function (and its relatives) on windows,
that is destroyed before the interpreter gets to execute any user
code. I understand that REBOL applications should probably not
play with the register, but well, what's the point in limiting
functionality in such a deliberate way?
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
[8/12] from: rebologue::yahoo at: 27-Aug-2002 8:39
Rebol would be very attractive if it could easily
transact with webservers exactly like a command-line
web browser (minus rendering and JavaScript, etc.). I
know that the protocols, the bits and pieces are
already there; I'm talking about out-of-the-box
support.
Currently, you need to know many system settings and
Rebol-specific network issues. For example, how to:
Bake your own cookie management system
Negotiate POST/GET transactions
Trap/manage redirects
Set the USER-AGENT, encoding types, etc.
Handle http uploads
Https and ftp
The list of needs are pretty attainable and
well-defined. I think it would help RT to sew this up
a bit better so that it is a key feature. But since
they are busy inventing the future, it would be
extremely beneficial to the Rebol if a standard script
or proxy mode were made available by some of the
CGI/http/networking gurus on this list. Then
spidery-apps and dashboards like Watson would be
attainable by nearly anyone with /View and a keyboard.
How popular might a solid kit like this be? Try VERY.
I mean, does anyone really want to muck around with Tk
and Perl for this sort of thing?
// Ed
--- Petr Krenzelok <[petr--krenzelok--trz--cz]> wrote:
[9/12] from: g:santilli:tiscalinet:it at: 27-Aug-2002 17:43
Hi Scott,
On Tuesday, August 27, 2002, 3:24:47 PM, you wrote:
GSJ> Is this the REBOL object that you seek?
GSJ> system/options/cgi
Doesn't that work for CGI only? I don't seem to be able to read an
arbitrary environment variable out of that.
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
[10/12] from: gscottjones:mchsi at: 27-Aug-2002 15:00
Hi, Gabriele,
From: "Gabriele Santilli"
> GSJ> Is this the REBOL object that you seek?
> GSJ> system/options/cgi
>
GS> Doesn't that work for CGI only? I don't seem to be able to read an
GS> arbitrary environment variable out of that.
I evidently misunderstood Joel's query. I thought he *was* talking about
the environment available in the context of CGI management. Apologies.
--Scott Jones
[11/12] from: joel:neely:fedex at: 27-Aug-2002 15:11
Hi, Reffy,
Not an application framework, just a critical piece of infrastructure
that can be factored completely out of the application.
-jn-
----- Original Message -----
From: [reffy--ulrich--net]
Date: Tuesday, August 27, 2002 12:30 pm
[12/12] from: gchiu:compkarori at: 28-Aug-2002 8:23
On Tue, 27 Aug 2002 08:39:05 -0700 (PDT)
"Ed O'Connor" <[rebologue--yahoo--com]> wrote:
>Bake your own cookie management system
>Negotiate POST/GET transactions
<<quoted lines omitted: 14>>
>I mean, does anyone really want to muck around with Tk
>and Perl for this sort of thing?
To get round the limitations of Rebol in this respect, I
use cURL, and build cURL scripts dynamically using
View/Pro which I then call.
However, I still have not been able to log onto hotmail (
which uses https ). :(
--
Graham Chiu
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted