LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[Webdev] Nasty apache problem

[Webdev] Nasty apache problem

John P. Looney (Kate) jplooney-ilug at online.ie
Thu Jun 15 10:43:30 IST 2000


 I've been trying to work out how to get an AOLserver machine to post IMP
authentication data, and then write out all the cookie info IMP sends back
to the client browsers. What I'm doing is (bear with me on the TCL, but you
get the idea):

    set form_data [ ns_set create form_data ]
    ns_set put $form_data actionID 6
    ns_set put $form_data imapuser jplooney
    ns_set put $form_data pass secret
    ns_set put $form_data mailbox INBOX
    ns_set put $form_data server mail1.mail.online.ie
    ns_set put $form_data folders INBOX.
    ns_set put $form_data port 143

    set out_headers [ ns_set create out_headers ]
    ns_set put $out_headers User-Agent "AOLserver"
   
# Save result html, just in case it's needed at a later date, for debugging
    set result_html [ ol_httpPostSimpleForm "http://mail.online.ie/horde/imp/mailbox.php3" $out_headers $form_data return_headers ]
   
# Send the cookies IMP has sent us, to the client's browser.
    if {[set set_cookie [ns_set iget $return_headers Set-cookie]] != ""} {
       regexp {^([^=]+)=([^;]+)} $set_cookie {} cookiename cookievalue
       if {[info exists cookiename] && [info exists cookievalue]} {
           set cookie [itcl::local Cookie #auto $cookiename $cookievalue]
           $cookie setAttribute domain .online.ie
           $cookie send
       }
    }

# And then send them to IMP
    ns_returnredirect "http://mail.online.ie/mail/index.php3"

 However, it's not working. It seems that when I try to post it to
 mailbox.php3, it's getting redirected to login.php3, and it's breaking.

 Obviously, there is something different to when I'm logging in manually, and
when I login with this little code fragment. Anyone know how to get apache to
dump what it's after receiving, and what it's sending to clients ? It'd be
nice if I could do it for a specific page (as other people are using the
server too), but i can sift through it if apache can do that.
   
Kate
   
-- 
The words of the unwary are apt to cause needless pain and bloody violence.
                                                        - Zen Master Greg




More information about the Webdev mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell