httpproxy authentication & agent simulation
runrev at animabit.de
runrev at animabit.de
Wed Apr 16 13:26:34 EDT 2008
Hello,
1.
I need fileupload from runrev via http using a proxy. This works with
on mouseUp
answer file "Which file ... Welche Datei soll auf den Server geladen werden?"
set httpproxy to "http://proxy:8080"
put it into dateiname
set the itemdelimiter to "/"
put the last item of dateiname into shortname
put dateiname && "wird aufgeladen ..." into field "protokoll"
put libUrlMultipartFormData(tForm, "pdftitel", shortname,"submit","Datei auf Server hochladen!") into tData
set the httpheaders to line 1 of tForm
delete line 1 of tForm
put libUrlMultipartFormAddPart(tForm, "filename","<file>" & dateiname, "multipart/form-data", "binary") into tData
put "http://htaccessusername:htaccesspassword@server.de/upload.cgi" into tURL
post tForm to url tUrl
set the htmltext of field "protokoll" to it
end mouseUp
2. But the proxy (http) needs
a) authentication
and perhaps
b) only allows Mozilla or IE compatible browsers for http access.
Now I have written a workaround in Perl:
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
...
$ua->proxy(['http', 'ftp'], 'http://proxyusername:proxypassword@proxy:8080/');
$ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)");
...
which allows http-upload through a proxy with authentication and agent simulation.
3. Question
Is it possible to define httpproxy authentication & agent simulation? Then I must not use Perl for a workaround ...
Regards,
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
More information about the use-livecode
mailing list