Re: Why FreeBSD fetch does not download a file via a proxy for HTTPS URLS (the same works fine for HTTP urls)
Hi RW, Thanks alot for your reply. Do you mean to say curl also not using a CONNECT to tunnel through to the actual server? How can I achieve downloading files HTTPS over a proxy? Thanks %20http://permalink.gmane.org/gmane.os.freebsd.devel.hackers/42588 -Chandra Hi All, I am working on a project where i need to download a file via a proxy server using HTTPS protocol. I found that fetch does not work/support HTTPS requests over a proxy. I just checked and neither do wget nor curl. I could overcome the above problem if I do the following change. 1375: 1.58 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.58 des 1376:if (purl) { 1.51 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.51 des 1377:URL = purl; I don't think that would work, presumably it would just cause an attempt at an ssl connection to the proxy, followed by a GET request for an https URL. https through a proxy is supposed to use a CONNECT to tunnel through to the actual server. On Thu, Feb 24, 2011 at 12:49 PM, chandra reddy cred...@gmail.com wrote: Hi All, I am working on a project where i need to download a file via a proxy server using HTTPS protocol. I found that fetch does not work/support HTTPS requests over a proxy. My setup would be like this: Intranet Internet --- | https or http | https | Client m/cs - Porxy Server --- Destination Server (or Download server) | | --- I can use https or http protocol between Client and Proxy but only HTTPS is used between proxy and Destination server(or Download server) . I tried to use squid proxy as my proxy server and tried to download a file from my download server to Client m/c using FreeBSD fetch command. It fails to download a file via proxy for HTTPS requests Please note that Proxy setup is 100% correct and a web server (Apache) running fine. [I have tested it using my Mozilla browser on my PC]. I have done the following: 1. *Download a file using HTTPS over a proxy server* #env HTTP_PROXY=http://proxy-server-ip:3128/ /usr/sbin/fetch -v -o /tmp/download.out 'https://destination-server-ip/index.htm' looking up destination-server-ip connecting todestination-server-ip:443 connection established fetch: https://destination-server-ip/index.htm Authentication error Even I have tried this also and found the same error. #env HTTP_PROXY=https://proxy-server-ip:3128/ /usr/sbin/fetch -v -o /tmp/download.out 'https://destination-serve-ip/index.htm' My question is why it is not connected via Proxy sever. It tries to connect directly. I could see that if I use HTTP protocol then it connects via proxy. Please see the logs here. 2. *Download a file using HTTP over a proxy server* #env HTTP_PROXY=http://proxy-server-ip:3128/ /usr/sbin/fetch -v -o /tmp/download.out 'http://destination-server-ip/index.htm' looking up proxy-server-ip connecting to proxy-server-ip:3128 connection established requesting http://destination-server-ip/index.htm Even I have tried this also and found that works fine. #env HTTP_PROXY=https://proxy-server-ip:3128/ /usr/sbin/fetch -v -o /tmp/download.out 'http://destination-serve-ip/index.htm' I have debugged fetch and found that the following check is stopping HTTPS requests over a proxy. *http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c .OR. http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c?annotate=1.78.2.5.4.1 * 1375: 1.58 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.58 des 1376:if (purl strcasecmp(URL-scheme, SCHEME_HTTPS) != 0) { 1.51 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.51 des 1377:URL = purl; I could overcome the above problem if I do the following change. 1375: 1.58 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.58 des 1376:if (purl) { 1.51 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.51 des 1377:URL = purl; I want to know why HTTPS over proxy is not working with libfetch. I want to make it work how can do it? Thanks -Chandra -- Thanks, cr(); -- Remote debugging a buggy debugger with a cross buggy debugger is a funny thing
Why FreeBSD fetch does not download a file via a proxy for HTTPS URLS (the same works fine for HTTP urls)
Hi All, I am working on a project where i need to download a file via a proxy server using HTTPS protocol. I found that fetch does not work/support HTTPS requests over a proxy. My setup would be like this: Intranet Internet --- | https or http | https | Client m/cs - Porxy Server --- Destination Server (or Download server) | | --- I can use https or http protocol between Client and Proxy but only HTTPS is used between proxy and Destination server(or Download server) . I tried to use squid proxy as my proxy server and tried to download a file from my download server to Client m/c using FreeBSD fetch command. It fails to download a file via proxy for HTTPS requests Please note that Proxy setup is 100% correct and a web server (Apache) running fine. [I have tested it using my Mozilla browser on my PC]. I have done the following: 1. *Download a file using HTTPS over a proxy server* #env HTTP_PROXY=http://proxy-server-ip:3128/ /usr/sbin/fetch -v -o /tmp/download.out 'https://destination-server-ip/index.htm' looking up destination-server-ip connecting todestination-server-ip:443 connection established fetch: https://destination-server-ip/index.htm Authentication error Even I have tried this also and found the same error. #env HTTP_PROXY=https://proxy-server-ip:3128/ /usr/sbin/fetch -v -o /tmp/download.out 'https://destination-serve-ip/index.htm' My question is why it is not connected via Proxy sever. It tries to connect directly. I could see that if I use HTTP protocol then it connects via proxy. Please see the logs here. 2. *Download a file using HTTP over a proxy server* #env HTTP_PROXY=http://proxy-server-ip:3128/ /usr/sbin/fetch -v -o /tmp/download.out 'http://destination-server-ip/index.htm' looking up proxy-server-ip connecting to proxy-server-ip:3128 connection established requesting http://destination-server-ip/index.htm Even I have tried this also and found that works fine. #env HTTP_PROXY=https://proxy-server-ip:3128/ /usr/sbin/fetch -v -o /tmp/download.out 'http://destination-serve-ip/index.htm' I have debugged fetch and found that the following check is stopping HTTPS requests over a proxy. *http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c .OR. http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c?annotate=1.78.2.5.4.1 * 1375: 1.58 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.58 des 1376:if (purl strcasecmp(URL-scheme, SCHEME_HTTPS) != 0) { 1.51 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.51 des 1377:URL = purl; I could overcome the above problem if I do the following change. 1375: 1.58 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.58 des 1376:if (purl) { 1.51 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libfetch/http.c#rev1.51 des 1377:URL = purl; I want to know why HTTPS over proxy is not working with libfetch. I want to make it work how can do it? Thanks -Chandra ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
how to find a directory is NFS mounted / locally mounted?
I want to know the command for finding a a directory is NFS mounted or not? -- debugging a buggy debugger with a cross buggy debugger leads to a buggy life ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
tar fails on FreeBSD 7 and passes on FreeBSD 6 for the same input
Hi, I am getting the following error when i run tar on a directory. [chan...@home]$ tar zcf config-xsl.tar config-xsl/9.6 tar: Cannot open directory config-xsl/9.6/configuration/protocols/mpls/label-switched-path/oam/bfd-liveness-detection/detection-time: No such file or directory tar: Cannot open directory config-xsl/9.6/configuration/protocols/mpls/label-switched-path/oam/bfd-liveness-detection/failure-action: No such file or directory [chan...@home]$ ldd tar tar: libc.so.6 = /usr/local/lib/compat/libc.so.6 (0x28097000) chan...@home]$ uname -a FreeBSD chandra 7.1-RC1 FreeBSD 7.1-RC1 #0: Sun Dec 7 05:57:33 UTC 2008 r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 I have debugged libc and found that system call fstafs is failing and returning -1. Can any one help me what is the real problem here and how to fix it? Thanks Chandra_ -- debugging a buggy debugger with a cross buggy debugger leads to a buggy life ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: tar fails on FreeBSD 7 and passes on FreeBSD 6 for the same input
Hi Doug, I have checked the files permission. It is fine. It passes on FreeBSD6 but fails on FreeBSD 7. It passes on a local file system but fails on NFS file system. Thanks -Chandra On Tue, Jan 20, 2009 at 2:02 PM, Doug Hardie bc...@lafn.org wrote: On Jan 19, 2009, at 23:54, chandra reddy wrote: Hi, I am getting the following error when i run tar on a directory. [chan...@home]$ tar zcf config-xsl.tar config-xsl/9.6 tar: Cannot open directory config-xsl/9.6/configuration/protocols/mpls/label-switched-path/oam/bfd-liveness-detection/detection-time: No such file or directory tar: Cannot open directory config-xsl/9.6/configuration/protocols/mpls/label-switched-path/oam/bfd-liveness-detection/failure-action: No such file or directory [chan...@home]$ ldd tar tar: libc.so.6 = /usr/local/lib/compat/libc.so.6 (0x28097000) chan...@home]$ uname -a FreeBSD chandra 7.1-RC1 FreeBSD 7.1-RC1 #0: Sun Dec 7 05:57:33 UTC 2008 r...@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 I have debugged libc and found that system call fstafs is failing and returning -1. Can any one help me what is the real problem here and how to fix it? Check and be sure that those directories have r and x for the user running tar. It looks like a permission problem. -- debugging a buggy debugger with a cross buggy debugger leads to a buggy life ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Assmbler Error: suffix or operands invalid for `mov'
Hi, I am building FreeBSD kernel with gcc 4.1.1. I can see the foloowing assembler error: My assemler version is GNU assembler 2.17 ../../../../../src/bsd/sys/i386/i386/locore.s: Assembler messages: ../../../../../src/bsd/sys/i386/i386/locore.s:362: Error: suffix or operands invalid for `mov' ../../../../../src/bsd/sys/i386/i386/locore.s:379: Error: suffix or operands invalid for `mov' ../../../../../src/bsd/sys/i386/i386/locore.s:397: Error: suffix or operands invalid for `mov' *** Error code 1 (continuing) The code in lcore.s is : movlUC_GS(%eax),%gs /* restore %gs */ movlUC4_GS(%eax),%gs/* restore %gs */ movlSC_GS(%eax),%gs /* restore %gs */ What is the patch for this problem? what should I use mov/movw? The same errors for bsd/sys/i386/i386/swtch.s movl%gs,PCB_GS(%edx) movlPCB_GS(%edx),%gs movl%gs,PCB_GS(%ecx) bsd/sys/i386/include/cpufunc.h __asm __volatile(movl %%gs,%0 : =rm (sel)); __asm __volatile(mov %0,%%fs : : rm (sel)); __asm __volatile(movl %0,%%gs : : rm (sel)); Thanks Chandra -- debugging a buggy debugger with a cross buggy debugger leads to a buggy life ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]