Re-2: waiting time of shell() + open process + proxy authentication in runrev
runrev at animabit.de
runrev at animabit.de
Wed Aug 6 07:39:18 EDT 2008
Mark S & Mark Sch
Thank you.
I got this advice using open process almost simultaneousely from the both Marks.
Mark Schonewille added I should implement in runrev the protocol with an authenticated proxy instead of using shell - I tried but only had success in perl.
I wrote this perl script, put it into a custom prop and replaced the $variables with the runrev variables with the same name before running it with perl -e.
use strict; use LWP::UserAgent; use HTTP::Request::Common; my $ua = LWP::UserAgent->new; $ua->proxy(['http', 'ftp'], 'http://$proxyusername:$proxypasswort@proxyserver:8080/'); $ua->timeout(30);$ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"); $ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"); my $req = POST 'http://$servername/admin/aniupload.cgi', Content_Type => 'multipart/form-data', Content => [ pdftitel => '$dateiname', verzeichnis=>'$verzeichnis', filename => ['$quelldatei'] ]; $req->authorization_basic('$username', '$passwort'); $req->header('Accept' => 'text/plain'); my $response = $ua->request($req); if ($response->is_success) { print $response->content; } else { die $response->status_line; }
I had successfully implemented all in runrev but not the line
$ua->proxy(['http', 'ftp'], 'http://$proxyusername:$proxypasswort@proxyserver:8080/');
http://mail.runrev.com/pipermail/use-revolution/2008-April/109930.html (Answers to http://mail.runrev.com/pipermail/use-revolution/2008-April/109876.html)
did not work for me.
Regards, Franz
Mit freundlichen Grüßen
Franz Böhmisch
boehmisch at animabit.de
http://www.animabit.de
GF Animabit Multimedia Software GmbH
Am Sonnenhang 22
D-94136 Thyrnau
Tel +49 (0)8501-8538
Fax +49 (0)8501-8537
Original Message processed by David InfoCenter
Subject: Re: waiting time of shell() (06-Aug-2008 11:12)
From: Mark Smith <lists at futilism.com>
To: boehmisch at animabit.de
Perhaps you could try using , something like:
open process perlupload for read
repeat
wait 500 millisecs with messages
read from process perlupload until empty
put it into tResponse
if "xyz" is in it then
put it into tResponse
exit repeat
end if
end repeat
close process perlupload
put tResponse
More information about the use-livecode
mailing list