[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] [BUG] https functionality and port default
From: |
Bug Goo |
Subject: |
Re: [Gnu-arch-users] [BUG] https functionality and port default |
Date: |
Sat, 31 Jul 2004 21:50:02 +0000 |
Created as bug 165
On Wed Jul 28 05:48:24 2004, Bryan Nollett wrote:
> This possible patch is a superset of Bug 83
> http://lists.gnu.org/archive/html/gnu-arch-users/2004-03/msg01239.html
> http://bugs.gnuarch.org/cgi-bin/bugreport.cgi?bug=83
> and perhaps should have been grouped with #83.
>
>
> --- orig/libarch/pfs-dav.c
> +++ mod/libarch/pfs-dav.c
> @@ -28,6 +28,7 @@
> #include "tla/libneon/ne_props.h"
> #include "tla/libneon/ne_uri.h"
> #include "tla/libneon/ne_redirect.h"
> +#include "tla/libneon/ne_socket.h"
>
> ^L
>
> @@ -146,6 +147,12 @@
> struct authinfo * auth = 0;
> int proxy_port_num;
>
> + /* ne_sock_init() is idempotent, so just init always */
> + if (ne_sock_init ())
> + {
> + panic ("arch_pfs_dav_connect: ne_sock_init() failed.");
> + }
> +
> answer = (struct arch_pfs_dav_session *)lim_malloc (0, sizeof (*answer));
> mem_set0 ((t_uchar *)answer, sizeof (*answer));
> answer->pfs.vtable = &dav_pfs_fns;
> @@ -202,7 +209,7 @@
> if (portstr)
> *(portstr++) = 0;
>
> - answer->dav_port = 80;
> + answer->dav_port = ne_uri_defaultport (answer->dav_scheme);
> if (portstr && (0 > cvt_decimal_to_uint (&ign, &answer->dav_port, portstr,
> str_length (portstr))))
> {
> safe_printfmt (2, "illegal port number in uri -- %s\n", uri);
> @@ -212,6 +219,11 @@
>
> answer->sess = ne_session_create (answer->dav_scheme,
> answer->dav_hostname, answer->dav_port);
>
> + if (!str_cmp ("https", answer->dav_scheme))
> + {
> + ne_ssl_trust_default_ca (answer->sess);
> + }
> +
> if (auth)
> {
> ne_set_server_auth (answer->sess, dav_client_auth, auth);
>
>
>
> _______________________________________________
> Gnu-arch-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnu-arch-users
>
> GNU arch home page:
> http://savannah.gnu.org/projects/gnu-arch/
>