RE: [OT]: Thanks (c books)

2000-09-05 Thread David Hajoglou

Thanks to those of you who suggested c books.  That really helped.


Regards,
Dave




[OT] Language Question...

2000-09-01 Thread David Hajoglou

I would like to learn about the programming of mod_perl.  While I am an ok
perl programmer, I know very little of c code.  Can somebody suggest a (or
several) book that I can start to learn c from?

Thanks,
David




Re: [OT] Language Question...

2000-09-01 Thread David Hajoglou

Well, if you  must know, mod perl was programmed in c

On 1 Sep 2000, David Hodgkinson wrote:

 
 David Hajoglou [EMAIL PROTECTED] writes:
 
  I would like to learn about the programming of mod_perl.  While I am an ok
  perl programmer, I know very little of c code.  Can somebody suggest a (or
  several) book that I can start to learn c from?
 
 Why do you need C if you've got perl?
 
 -- 
 Dave Hodgkinson, http://www.hodgkinson.org
 Editor-in-chief, The Highway Star   http://www.deep-purple.com
   Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
   -
 




Re: [OT] Language Question...

2000-09-01 Thread David Hajoglou

I would like to be able to read the internals of mod_perl (the module that
plugs into apache).  I would like to understand how it works with apache
and to do this I need c coding skills.  So, regardless of my reason for
wanting to learn c (though it does relate), does anybody have any
suggestions for a good book or set of books that one can learn c from
(rather than just a language reference).

On 1 Sep 2000, David Hodgkinson wrote:

 
 David Hajoglou [EMAIL PROTECTED] writes:
 
  Well, if you  must know, mod perl was programmed in c
 
 I knew this.
 
 So?
 
 -- 
 Dave Hodgkinson, http://www.hodgkinson.org
 Editor-in-chief, The Highway Star   http://www.deep-purple.com
   Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
   -
 





difference between ...

2000-05-24 Thread David Hajoglou

Would there ever be any difference between the output of the following:

(looking on the mod_perl quick reference card)

From Apache::URI
$str = $uri-query()


From Request object
$str = $r-args();

As far as what they hold about the request, would these ever differ, or
do they access the same data (in different ways)?


Thanks 
David




Re: how to rewrite to a POST

2000-04-27 Thread David Hajoglou

Ok, looking at all the posts I need to spell all of it out.  I am using
the database through the backend to prevend any passwords from being
transmited and possibally cached in a browser.  Here is how it works:

Our user, lets call him John, loggs into our portal.  This is a microsoft
environment (www.asksimon.com).  He authenticates on an MS server.  At
that time, the microsoft server generates a random key with a time stamp,
which is | delineated, adds the user name and base64 encodes it. Then all
links for the user to check his e-mail are writen as:

a href="http://twig.asksimon.org/auth?k=b64_encoded_sequence"email/a

When I get the request my handler, which is triggered to fly when
/auth is requested, looks at the key, queries the MsSql database and
checks the random key and time stamp.  If all checks out, the request is
rewriten into a post like so:

twig.asksimon.org/index.php3 [log_name = "name" log_passwd = "passwd"].

I get the passwd from the .org server thereby keeping any passwords from
being transmitted between the microsoft environment and the linux
environment.

I need to use the post, because that is what php3 is expecting.  If
anybody can think of any better way I would like to hear it.  If not, then
is it possible to translate a GET uri into a POST uri with a
PerlTransHandler (or any other handler for that matter)??

I would like to use pnotes (that would have been easy) but I am going
from mod_perl to mod_php thereby nullifyiing all of the mod_perl gadgets.


Thanks
David




how to rewrite to a POST

2000-04-26 Thread David Hajoglou

I asked a similar question eariler with no response.  So, I shall change
my aproach.

I have figured that I need to use PerlTransHandler for my module, but I
still do not know how to turn a GET request into a POST.

I can rewrite the filename to the correct file:

$r-filename($r-document_root . '/index.php3'); #from /auth?k=...

but, how do I make it a post?  Can I respecificy the $r-content?  It
would seem that I can't by the docs:

=== $r-content from perldoc Apache
*NOTE*: you can only ask for this once, as the entire body is read from
the client.
===

so, is it possible to take a GET request and rewrite the uri into a POST
request and if so how?






design question

2000-04-25 Thread David Hajoglou

I am trying to implement a cross platform auth scheme whereby users log
into a system running in a microsoft environment.  Then, when they want to
check their e-mail, they click a link in the form of:

mail.isoftcorp.com/auth?k=sequence

the key sequence is determined when they log into the main site and it is
databased.  then, they hit my server and I will take the key sequence and
query the databse:

1)  The database returns foo, I deny the request (this I can eaily do)

2)  The database returns bar, I rewirte the request into a post.  The
handler would rerite the request and then turn it back over to apache for
further processing:

my new request would be in thr form of:
$request=HTTP::Request-new(POST='http://mail.isoftcotp.com/index.pl',
[var1='hojo',var2='val2']); #where val1 and val2 are from the DB


However, I do not know how to rewirte the request in this way and use it
in a handler. What would be the proper way to rewrite the request?  Which
handler should I use?

If I need to provide any more info, fell free to ask.