Re: httpproxy authentication & agent simulation
Hello Mark Smith thank you very much for your tipp using HTTPHeaders for implementing another User-Agent! In the archives I found with the help of Mark Schonewille http://www.mail-archive.com/[EMAIL PROTECTED]/msg09789.html From: Dave Cragg <[EMAIL PROTECTED]> Subject: Re: HTTPProxy - authenticated proxy servers supported? Date: 2003-08-21 09:33:29 with information how to use proxy authentication. The solution in both cases uses HTTPHeaders. I try to set the HTTPHeaders to a multiline string "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" & cr & & other Headerinformation Perhaps I can avoid the shell(Perl-journey) and stay in runrev even in this case. Thank you. Nice day, Franz Mit freundlichen Grüßen Franz Böhmisch [EMAIL PROTECTED] 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 -------- httpproxy authentication & agent simulation Mark Smith mark at maseurope.net Wed Apr 16 13:12:36 CDT 2008 Franz, you can spoof the user-agent using another httpHeader: set the httpHeaders to "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" -- or somesuch, this will override the default user-agent. I'm pretty sure you can do http authentication with a header too, using the "WWW-Authenticate:" header, but I'm not sure exactly what form it takes. Hope this helps, Mark On 16 Apr 2008, at 18:26, runrev at animabit.de wrote: > 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","" & > dateiname, "multipart/form-data", "binary") into tData > put "http://htaccessusername:[EMAIL PROTECTED]/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 at 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 ... > ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: httpproxy authentication & agent simulation
Franz, you can spoof the user-agent using another httpHeader: set the httpHeaders to "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" -- or somesuch, this will override the default user-agent. I'm pretty sure you can do http authentication with a header too, using the "WWW-Authenticate:" header, but I'm not sure exactly what form it takes. Hope this helps, Mark On 16 Apr 2008, at 18:26, [EMAIL PROTECTED] wrote: 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","" & dateiname, "multipart/form-data", "binary") into tData put "http://htaccessusername:[EMAIL PROTECTED]/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:[EMAIL PROTECTED]: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 [EMAIL PROTECTED] 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 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
httpproxy authentication & agent simulation
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","" & dateiname, "multipart/form-data", "binary") into tData put "http://htaccessusername:[EMAIL PROTECTED]/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:[EMAIL PROTECTED]: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 [EMAIL PROTECTED] 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 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution