[PATCH] ftp proxy by IPv6
here is the patch that can do ftp proxy by IPv6. i can connect to IPv6 ftp server when this patch is applyed to modules/proxy/proxy_ftp.c in httpd-2.0.39. please verify it and merge it if it is correct. regards, //shoichi sakane *** proxy_ftp-old.c Fri Jun 28 15:18:27 2002 --- proxy_ftp.c Fri Jun 28 15:05:26 2002 *** *** 942,984 connectname, NULL)); } - - if ((rv = apr_socket_create(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, - "proxy: FTP: error creating socket"); - return HTTP_INTERNAL_SERVER_ERROR; - } - - #if !defined(TPF) && !defined(BEOS) - if (conf->recv_buffer_size > 0 - && (rv = apr_setsocketopt(sock, APR_SO_RCVBUF, - conf->recv_buffer_size))) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, - "setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default"); - } - #endif - - if (APR_SUCCESS != (rv = apr_setsocketopt(sock, APR_SO_REUSEADDR, one))) { - #ifndef _OSD_POSIX /* BS2000 has this option "always on" */ - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, - "proxy: FTP: error setting reuseaddr option: setsockopt(SO_REUSEADDR)"); - return HTTP_INTERNAL_SERVER_ERROR; - #endif /* _OSD_POSIX */ - } - - /* Set a timeout on the socket */ - if (conf->timeout_set == 1) { - apr_setsocketopt(sock, APR_SO_TIMEOUT, (int)conf->timeout); - } - else { - apr_setsocketopt(sock, - APR_SO_TIMEOUT, (int)r->server->timeout); - } - - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, - "proxy: FTP: socket has been created"); - - /* * At this point we have a list of one or more IP addresses of the * machine to connect to. If configured, reorder this list so that the --- 942,947 *** *** 994,1005 int failed = 1; while (connect_addr) { ! /* FIXME: @@@: We created an APR_INET socket. Now there may be ! * IPv6 (AF_INET6) DNS addresses in the list... IMO the socket ! * should be created with the correct family in the first place. ! * (either do it in this loop, or make at least two attempts ! * with the AF_INET and AF_INET6 elements in the list) ! */ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: FTP: trying to connect to %pI (%s)...", connect_addr, connectname); --- 957,998 int failed = 1; while (connect_addr) { ! if ((rv = apr_socket_create(&sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) { ! ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, ! "proxy: FTP: error creating socket"); ! continue; ! } ! ! #if !defined(TPF) && !defined(BEOS) ! if (conf->recv_buffer_size > 0 ! && (rv = apr_setsocketopt(sock, APR_SO_RCVBUF, ! conf->recv_buffer_size))) { ! ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, ! "setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default"); ! } ! #endif ! ! if (APR_SUCCESS != (rv = apr_setsocketopt(sock, APR_SO_REUSEADDR, one))) { ! apr_socket_close(sock); ! #ifndef _OSD_POSIX /* BS2000 has this option "always on" */ ! ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, ! "proxy: FTP: error setting reuseaddr option: setsockopt(SO_REUSEADDR)"); ! continue; ! #endif /* _OSD_POSIX */ ! } ! ! /* Set a timeout on the socket */ ! if (conf->timeout_set == 1) { ! apr_setsocketopt(sock, APR_SO_TIMEOUT, (int)conf->timeout); ! } ! else { ! apr_setsocketopt(sock, !APR_SO_TIMEOUT, (int)r->server->timeout); ! } ! ! ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, !"proxy: FTP: socket has been created"); ! ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: FTP: trying to connect to %pI (%s)...", connect_addr, connectname); *** *** 1008,1013 --- 1001,1007 /* if an error occurred, loop round and try again */ if (rv != APR_SUCCESS) { + apr_socket_close(sock); ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server, "proxy: FTP: attempt to connect to %pI (%s) failed", connect_addr, connectname);
Re: cvs commit: httpd-2.0 STATUS
[EMAIL PROTECTED] writes: > trawick 2002/06/27 14:06:18 > > Modified:.STATUS > Log: > :( > > (and if somebody can figure out how to build APR today, my hat is off > to them) that should be "build APR on daedalus today" -- Jeff Trawick | [EMAIL PROTECTED] Born in Roswell... married an alien...
Re: 2.0 book
On Thu, 27 Jun 2002 [EMAIL PROTECTED] wrote: > If not... what's the price tag for this book and will > you allow portions of it to be reprinted online for > users of this 'public domain' software? Apache is not "public domain" software. A quick lookup says that the list price is $49 and "street price" will be ~$35. http://www.allbookstores.com/book/compare/0072223448 - ask -- ask bjoern hansen, http://askbjoernhansen.com/ !try; do();
Re: 2.0 book
> Ryan Bloom wrote. > > It's being printed now, should be in stores in a week or two. Congratulations ( I mean it ). Interesting timing, though. That means final draft(s) went to publisher on or about the time that you initiated the release of Apache 2.0 way before it was ready for GA ( 2.0.35 ). Will the copy be available online anywhere? If not... what's the price tag for this book and will you allow portions of it to be reprinted online for users of this 'public domain' software? Yours... Kevin Kiley
RE: 2.0 book
It's being printed now, should be in stores in a week or two. Ryan -- Ryan Bloom [EMAIL PROTECTED] 645 Howard St. [EMAIL PROTECTED] San Francisco, CA > -Original Message- > From: Aryeh Katz [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 27, 2002 8:18 AM > To: [EMAIL PROTECTED] > Subject: Re: 2.0 book > > > On Thu, 27 Jun 2002, Aryeh Katz wrote: > > > > > I saw that Ryan Bloom is (was) scheduled to release a book on the > > > 2.0 server. Does that book have information for developers, or is it > > > intended for sysadmins? > > > > It definitely has information for developers. Lots of it. :) > > > Do you know when it it's going to be released? > Aryeh > > --- > Aryeh Katz > VASCO > www.vasco.com
Re: 2.0 book
> On Thu, 27 Jun 2002, Aryeh Katz wrote: > > > I saw that Ryan Bloom is (was) scheduled to release a book on the > > 2.0 server. Does that book have information for developers, or is it > > intended for sysadmins? > > It definitely has information for developers. Lots of it. :) > Do you know when it it's going to be released? Aryeh --- Aryeh Katz VASCO www.vasco.com
Re: 2.0 book
On Thu, 27 Jun 2002, Aryeh Katz wrote: > I saw that Ryan Bloom is (was) scheduled to release a book on the 2.0 > server. Does that book have information for developers, or is it intended for > sysadmins? It definitely has information for developers. Lots of it. :) --Cliff
2.0 book
I saw that Ryan Bloom is (was) scheduled to release a book on the 2.0 server. Does that book have information for developers, or is it intended for sysadmins? If this is not for developers, is there any who will be releasing a 2.0 book that discusses the APIs (particularly the APR)? I hate to say this, but the header files aren't really enough documentation Thanks. Aryeh --- Aryeh Katz VASCO www.vasco.com
Re: cvs commit: httpd-2.0/server core.c
On Wed, Jun 26, 2002 at 10:20:56PM -0700, Brian Pane wrote: > Do you have a simple test case for this? I'd like to add it it > to httpd-test. You already have one. =) mod_bucketeer's test portion in include.t caught it. They are now passing for me. Horray for mod_bucketeer... -- justin
Re: cvs commit: httpd-2.0/server core.c
[EMAIL PROTECTED] wrote: >jerenkrantz2002/06/26 22:00:23 > > Modified:server core.c > Log: > - Fix segfault in core_output_filter when we are passed an empty brigade. > - Stash the remainder of the brigade in more when we see a flush bucket. >Previous to this commit, we would only process the buckets before the >flush on a HTTP/1.0 request and then return. > > We are proably only finding this now since we now correctly check for > keepalive connection status. > Do you have a simple test case for this? I'd like to add it it to httpd-test. Thanks, --Brian