Tagging 2.0.37

2002-05-23 Thread Sander Striker

Hi,

What about tagging the tree on monday?
Thoughts?

Sander




Re: cvs commit: httpd-2.0/server log.c

2002-05-23 Thread Greg Stein

On Thu, May 23, 2002 at 02:31:45PM -0700, Justin Erenkrantz wrote:
> On Thu, May 23, 2002 at 02:25:48PM -0700, Greg Stein wrote:
> > Oof... needlessly complicated. Just use apr_file_read_full(). It will return
> > all the bytes that you ask for, unless an error condition occurs (EOF).
> > There is no need to do any looping.
> 
> You'd have to do a stat() on the file to get the file size as we
> don't know how much data we need.  
> 
> According to the docs, it says that it is not possible for bytes
> to be read and an APR_EOF error to be returned.  That seems like
> it is conflict with the Unix impl though.  (The Unix impl could
> return bytes and APR_EOF.)  -- justin

The doc should probably match that of write_full:

It is possible for both bytes to be written and an error to be
returned.  And if *bytes_written is less than nbytes, an
accompanying error is _always_ returned.

IOW, read_full should be: you get success and all-read, or you get an error
and some-read. But never EINTR or somesuch.

It means that you can avoid the stupid loops to ensure that you get
everything read or written.

In the case of the pidfile, you just read in BUFFER_SIZE. It will always
come back with some number read and APR_EOF. If you truly read that many
bytes, then something is wrong :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/



Re: QNX 6.1a mod/peer review

2002-05-23 Thread Justin Erenkrantz

On Thu, May 23, 2002 at 05:36:26PM -0500, Igor Kovalenko wrote:
> I had submitted patch foir QNX6 twice in the past. There was no ACK and
> generally it was ignored. The patch was used for about half a year on public
> site without any problems.

You should keep resubmitting (once a week or so) until someone
says something (positive or negative).

That is our policy.  We have so many different people reading this
list from week-to-week that you'll get a different audience each
week.  -- justin



Re: QNX 6.1a mod/peer review

2002-05-23 Thread Igor Kovalenko

I had submitted patch foir QNX6 twice in the past. There was no ACK and
generally it was ignored. The patch was used for about half a year on public
site without any problems.

-- Igor

- Original Message -
From: "Davide Berti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 12:28 PM
Subject: QNX 6.1a mod/peer review


> Hello all
>
> httpd-2.0.36, QNX 6.1 RTOS
>
> I have made a modification to apache to get it to run
> on qnx.  It kept hanging.  I traced it down and made
> some changes to get it to run.  I wanted to proof
> these changes with the apache community and get some
> feedback as to the longterm consequences/ side effects
> of these changes.  I am attaching a diff of the
> changes that I made.
>
> I also noticed that SSL doesn't seem to work unless
> the -X flag is passed to httpd, any ideas.
>
> Thanks
> /Davide
>
> --- httpd-2.0.36/srclib/apr/locks/unix/proc_mutex.c
> Mon Apr  8 23:56:56 2002
> +++ ../httpd-2.0.36/srclib/apr/locks/unix/proc_mutex.c
> Wed May  8 16:04:51 2002
> @@ -318,7 +318,9 @@
>  if (munmap((caddr_t)mutex->pthread_interproc,
> sizeof(pthread_mutex_t))){
>  return errno;
>  }
> -}
> +if(shm_unlink("/datapoints")) // DB
> +return errno;
> + }
>  return APR_SUCCESS;
>  }
>
> @@ -329,11 +331,15 @@
>  int fd;
>  pthread_mutexattr_t mattr;
>
> -fd = open("/dev/zero", O_RDWR);
> -if (fd < 0) {
> -return errno;
> -}
> +fd=shm_open("/datapoints",O_RDWR|O_CREAT,0777);
> file://DB
> + if (fd < 0)
> + return errno;
>
> + if(ftruncate(fd,sizeof(pthread_mutex_t))==-1)  file://DB
> + return errno;
> +
> +
> +
>  new_mutex->pthread_interproc = (pthread_mutex_t
> *)mmap(
> (caddr_t) 0,
>
> sizeof(pthread_mutex_t),
> @@ -363,10 +369,11 @@
>
> PTHREAD_MUTEX_ROBUST_NP))) {
>  #ifdef PTHREAD_SETS_ERRNO
>  rv = errno;
> -#endif
> +#endif // DB
>  proc_mutex_proc_pthread_cleanup(new_mutex);
>  return rv;
>  }
> +#endif
>  if ((rv = pthread_mutexattr_setprotocol(&mattr,
> PTHREAD_PRIO_INHERIT))) {
>  #ifdef PTHREAD_SETS_ERRNO
>  rv = errno;
> @@ -374,9 +381,15 @@
>  proc_mutex_proc_pthread_cleanup(new_mutex);
>  return rv;
>  }
> +if ((rv =
> pthread_mutex_destroy(new_mutex->pthread_interproc)))
> { // DB
> +#ifdef PTHREAD_SETS_ERRNO
> +rv = errno;
>  #endif
> +proc_mutex_proc_pthread_cleanup(new_mutex);
> +return rv;
> +}
>
> -if ((rv =
> pthread_mutex_init(new_mutex->pthread_interproc,
> &mattr))) {
> + if ((rv =
> pthread_mutex_init(new_mutex->pthread_interproc,
> &mattr))) {
>  #ifdef PTHREAD_SETS_ERRNO
>  rv = errno;
>  #endif
>
> __
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>




[PATCH] For SSI include if statement with regexp

2002-05-23 Thread GAWLAS,JULIUS (HP-Cupertino,ex1)

It appears that SSI if statement with regular expressions is broken:

try to serve something like that:




TRUE

FALSE


you get: "[an error occurred while processing this directive] "

Maybe I am missing something obvious but this error apprears to be in
mod_include get_ptoken function; after getting the string inside // we don't
move passed the closing / and return / instead. Attached patch attepmts to
fix it.

Julius Gawlas

Index: mod_include.c
===
RCS file: /home/cvspublic/httpd-2.0/modules/filters/mod_include.c,v
retrieving revision 1.222
diff -u -r1.222 mod_include.c
--- mod_include.c   17 May 2002 11:33:09 -  1.222
+++ mod_include.c   23 May 2002 21:56:52 -
@@ -1890,6 +1890,8 @@
 if (ch == qs) {
 qs = 0;
 tkn_fnd = 1;
+   /* move passed qs */
+   ++string;
 }
 else {
 token->value[next++] = ch;



Re: libhttpd.dsp use of xcopy /y breaks compile on NT 4.0

2002-05-23 Thread William A. Rowe, Jr.

At 12:11 PM 5/23/2002, you wrote:
>Here is the commit message for using xcopy:
>
>"Tired of 'foo.h not found' messages in the build.  Checked ms's docs,
>  seems xcopy's /y arg goes all the way back to Win95.  This shouldn't
>  introduce any hassles."

I know... but Win95 was after NT 4.0's cmd processor.  [Yes they succeeded
in substantially creating NT 4.0 before introducing the sad 9x series, wasting
millions of development hours on a now-dead OS line.]

The patch to foo around with COPYCMD [which does/doesn't work on 9x?
I have to check...] really looks like overkill. Bill; I can't find a 
bootable NT4.0
partition at the moment, could you email me just the output of

copy /? > help
xcopy /? >> help

so I can review?  [If they are sent to stderr, use 2> instead of >]

Thx,

Bill




Re: cvs commit: httpd-2.0/server log.c

2002-05-23 Thread Justin Erenkrantz

On Thu, May 23, 2002 at 02:25:48PM -0700, Greg Stein wrote:
> Oof... needlessly complicated. Just use apr_file_read_full(). It will return
> all the bytes that you ask for, unless an error condition occurs (EOF).
> There is no need to do any looping.

You'd have to do a stat() on the file to get the file size as we
don't know how much data we need.  

According to the docs, it says that it is not possible for bytes
to be read and an APR_EOF error to be returned.  That seems like
it is conflict with the Unix impl though.  (The Unix impl could
return bytes and APR_EOF.)  -- justin



[PATCH] worker deadlock patch (simpler approach)

2002-05-23 Thread Brian Pane

This is a simpler approach to fixing what I think is the
root cause of the worker deadlocks.



Index: server/mpm/worker/worker.c
===
RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
retrieving revision 1.125
diff -u -r1.125 worker.c
--- server/mpm/worker/worker.c  23 May 2002 12:58:37 -  1.125
+++ server/mpm/worker/worker.c  23 May 2002 21:19:38 -
@@ -689,6 +689,7 @@
 apr_pollfd_t *pollset;
 apr_status_t rv;
 ap_listen_rec *lr, *last_lr = ap_listeners;
+int have_idle_worker = 0;
 
 free(ti);
 
@@ -711,18 +712,22 @@
 }
 if (listener_may_exit) break;
 
-rv = ap_queue_info_wait_for_idler(worker_queue_info,
-  &recycled_pool);
-if (APR_STATUS_IS_EOF(rv)) {
-break; /* we've been signaled to die now */
-}
-else if (rv != APR_SUCCESS) {
-ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "apr_queue_info_wait failed. Attempting to shutdown "
- "process gracefully.");
-signal_threads(ST_GRACEFUL);
-break;
+if (!have_idle_worker) {
+rv = ap_queue_info_wait_for_idler(worker_queue_info,
+  &recycled_pool);
+if (APR_STATUS_IS_EOF(rv)) {
+break; /* we've been signaled to die now */
+}
+else if (rv != APR_SUCCESS) {
+ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+ "apr_queue_info_wait failed. Attempting to "
+ " shutdown process gracefully.");
+signal_threads(ST_GRACEFUL);
+break;
+}
+have_idle_worker = 1;
 }
+
 /* We've already decremented the idle worker count inside
  * ap_queue_info_wait_for_idler. */
 
@@ -833,6 +838,9 @@
 ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
  "ap_queue_push failed");
 }
+else {
+have_idle_worker = 0;
+}
 }
 }
 else {
@@ -875,6 +883,7 @@
 apr_pool_t *last_ptrans = NULL;
 apr_pool_t *ptrans;/* Pool for per-transaction stuff */
 apr_status_t rv;
+int is_idle = 0;
 
 free(ti);
 
@@ -883,14 +892,17 @@
 bucket_alloc = apr_bucket_alloc_create(apr_thread_pool_get(thd));
 
 while (!workers_may_exit) {
-rv = ap_queue_info_set_idle(worker_queue_info, last_ptrans);
-last_ptrans = NULL;
-if (rv != APR_SUCCESS) {
-ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
- "ap_queue_info_set_idle failed. Attempting to "
- "shutdown process gracefully.");
-signal_threads(ST_GRACEFUL);
-break;
+if (!is_idle) {
+rv = ap_queue_info_set_idle(worker_queue_info, last_ptrans);
+last_ptrans = NULL;
+if (rv != APR_SUCCESS) {
+ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
+ "ap_queue_info_set_idle failed. Attempting to "
+ "shutdown process gracefully.");
+signal_threads(ST_GRACEFUL);
+break;
+}
+is_idle = 1;
 }
 
 ap_update_child_status_from_indexes(process_slot, thread_slot, SERVER_READY, 
NULL);
@@ -928,6 +940,7 @@
 }
 continue;
 }
+is_idle = 0;
 worker_sockets[thread_slot] = csd;
 process_socket(ptrans, csd, process_slot, thread_slot, bucket_alloc);
 worker_sockets[thread_slot] = NULL;



Re: cvs commit: httpd-2.0/server log.c

2002-05-23 Thread Greg Stein

On Thu, May 23, 2002 at 12:19:09PM -, [EMAIL PROTECTED] wrote:
>...
>   +++ log.c   23 May 2002 12:19:09 -  1.121
>...
>   +bytes_wanted = BUFFER_SIZE;
>   +endptr = buf = apr_palloc(p, BUFFER_SIZE);
>   +do {
>   +bytes_read = bytes_wanted;
>   +rv = apr_file_read(pid_file, endptr, &bytes_read);
>   +if (rv != APR_SUCCESS && rv != APR_EOF) {
>   +return rv;
>   +}
>   +bytes_wanted -= bytes_read;
>   +endptr += bytes_read; 
>   +}
>   +while (bytes_wanted > 0 && rv != APR_EOF);

Oof... needlessly complicated. Just use apr_file_read_full(). It will return
all the bytes that you ask for, unless an error condition occurs (EOF).
There is no need to do any looping.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/



Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Cliff Woolley

On Thu, 23 May 2002, Joshua Slive wrote:

> I believe you need to clear your cache (or shift-reload or whatever).  We
> are sending an expires header which is probably causing the script with
> the broken links to hang around.

Didn't help, sorry.  I guess the only way I'm going to figure this out is
if I go digging into closer.cgi itself... I'll do that.

Thanks,
Cliff

--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Joshua Slive


On Thu, 23 May 2002, Cliff Woolley wrote:

> On Thu, 23 May 2002, Joshua Slive wrote:
>
> > I can't replicate that.  What is the IP address of your client?
> > Perhaps it doesn't have reverse DNS?  I'm not sure how the
> > script would handle that.
>
> That's true, it doesn't.  Well, at least not from outside our department.
> Friggin bureaucratic DNS admins.  :-p
>
> 128.143.69.223

Hmmm... Well, short of rewriting the script to use
http://maxmind.com/geoip/
(which would be a nice little perl project if anyone wants to
do it), I don't see any way to solve that.

>
> > In any case, I have fixed it so you should get a proper link
> > to the full list of mirrors regardless of your domain.
>
> It's better I think but still a little screwy.  Now, if I click on full
> listing from the page that says this:

I believe you need to clear your cache (or shift-reload or whatever).  We
are sending an expires header which is probably causing the script with
the broken links to hang around.

Joshua.




Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Cliff Woolley

On Thu, 23 May 2002, Joshua Slive wrote:

> I can't replicate that.  What is the IP address of your client?
> Perhaps it doesn't have reverse DNS?  I'm not sure how the
> script would handle that.

That's true, it doesn't.  Well, at least not from outside our department.
Friggin bureaucratic DNS admins.  :-p

128.143.69.223

> In any case, I have fixed it so you should get a proper link
> to the full list of mirrors regardless of your domain.

It's better I think but still a little screwy.  Now, if I click on full
listing from the page that says this:

--
http

httpd/

Use one of the sites above or see the full listing of download sites.
--

I get http://www.apache.org/dyn/closer.cgi/mirrors/, which is this:
--
http

mirrors/

Use one of the sites above or see the full listing of download sites.
--

If I then click on the "mirrors/" link, I again get the
mirrors/dist/mirrors/ nonsense, as in
http://www.apache.org/dyn/closer.cgi/mirrors/dist/mirrors/:
--
http

mirrors/dist/mirrors/

Use one of the sites above or see the full listing of download sites.
--

If I click on the "full listing of download sites" link from the
/dyn/closer.cgi/mirrors/ page or any of the
"mirrors/dist/mirrors/dist/mirrors" pages, I get the actual full listing
from http://www.apache.org/mirrors/.


Odd.

--Cliff

--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Joshua Slive


On Thu, 23 May 2002, Cliff Woolley wrote:

> On Thu, 23 May 2002, Joshua Slive wrote:
>
> > Well, if you are coming from .edu, then you should be getting all the
> > us ones.  Is that not working?  I can only test from .ca and .org.
>
> Nope.  I get:
>

I can't replicate that.  What is the IP address of your client?
Perhaps it doesn't have reverse DNS?  I'm not sure how the
script would handle that.

When I try from .ca I get the proper "See the full list" message because
there are no mirrors.  When I login to www.apache.org and do
lynx http://httpd.apache.org/
and follow the link from there, I get a list of download sites with
proper links.

In any case, I have fixed it so you should get a proper link
to the full list of mirrors regardless of your domain.

Joshua.




Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Cliff Woolley

On Thu, 23 May 2002, Joshua Slive wrote:

> Well, if you are coming from .edu, then you should be getting all the
> us ones.  Is that not working?  I can only test from .ca and .org.

Nope.  I get:

---



Apache HTTP Server Download





 


Choose a download site close to you


http


httpd/


Use one of the sites above or see the
full listing of download sites.


How do I become an Apache mirror site?






---





Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Joshua Slive


On Thu, 23 May 2002, Cliff Woolley wrote:

> On Thu, 23 May 2002, Joshua Slive wrote:
>
> > I'm not sure where you are getting that.  There is a slight problem with
> > the link to the full list of mirrors (and I'll fix that in a second), but
> > if it finds mirrors in your country code, then those work fine.
>
> What country code?  :)

Well, if you are coming from .edu, then you should be getting all the
us ones.  Is that not working?  I can only test from .ca and .org.

Joshua.




Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Cliff Woolley

On Thu, 23 May 2002, Joshua Slive wrote:

> I'm not sure where you are getting that.  There is a slight problem with
> the link to the full list of mirrors (and I'll fix that in a second), but
> if it finds mirrors in your country code, then those work fine.

What country code?  :)

--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Joshua Slive


On Thu, 23 May 2002, Cliff Woolley wrote:
> >   +  http://www.apache.org/dyn/closer.cgi/httpd/";>from a 
>mirror
>
> Have you tried it?  It's nonsensical.  It comes up with an "httpd/" link,
> which when you click on it expands to a "httpd/dist/httpd/" link, and you
> click on that and get "httpd/dist/httpd/dist/httpd/" etc.  It doesn't seem
> to do anything more than that, and that seems to be the only difference
> between that link and the non-"httpd/" version.

I'm not sure where you are getting that.  There is a slight problem with
the link to the full list of mirrors (and I'll fix that in a second), but
if it finds mirrors in your country code, then those work fine.

Joshua.




Re: [PATCH] Allow mod_rewrite to talk to external rewrite engineover TCP/IP

2002-05-23 Thread Cliff Woolley

On Thu, 23 May 2002, James Tait wrote:

> The 1.3.24 patch is in Bugzilla, id #8882, but I thought I'd post it here
> for completeness.
> The patch adds a new RewriteMap type:
> RewriteMap MapName tcp:host:port

-0 for 1.3.

--Cliff




Re: cvs commit: httpd-site/xdocs/stylesheets project.xml

2002-05-23 Thread Cliff Woolley

On 23 May 2002 [EMAIL PROTECTED] wrote:

> slive   02/05/23 13:16:12
>
>   Modified:xdocs/stylesheets project.xml
>   Log:
>   My fault: I forgot to commit this when I commited the html transforms
>   a couple hours ago.
>
>   And yes, this link should work.
>   +  http://www.apache.org/dyn/closer.cgi/httpd/";>from a mirror

Have you tried it?  It's nonsensical.  It comes up with an "httpd/" link,
which when you click on it expands to a "httpd/dist/httpd/" link, and you
click on that and get "httpd/dist/httpd/dist/httpd/" etc.  It doesn't seem
to do anything more than that, and that seems to be the only difference
between that link and the non-"httpd/" version.

--Cliff


--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





Re: cvs commit: httpd-site/docs/test index.html

2002-05-23 Thread Joshua Slive


On 23 May 2002 [EMAIL PROTECTED] wrote:
>   I'm not sure at what point all of these links got out of date
>   w.r.t. the stylesheet, but anyway I regenerated them all.  This
>   link seems to work better than the old one, kind of.

Nope.  The one with httpd should be correct.  I had just forgotten to
commit my project.xml change from a couple hours ago.

Joshua.




[PATCH] Allow mod_rewrite to talk to external rewrite engine overTCP/IP

2002-05-23 Thread James Tait

The 1.3.24 patch is in Bugzilla, id #8882, but I thought I'd post it here 
for completeness.

The patch adds a new RewriteMap type:

RewriteMap MapName tcp:host:port

Since several child processes can connect to a multi-threaded rewrite 
engine at once, RewriteLock is not required, and requests to the rewrite 
engine are not serialised resulting in increased performance over the 
current stdin/stdout implementation.

Cheers,

JT
-- 
+++
| James Tait | ICQ# 17834893  |
| MUD programmer and Linux advocate  | http://www.wyrddreams.demon.co.uk/ |
+++



This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


--- src/modules/standard/mod_rewrite.c  Sat Mar 16 23:44:20 2002
+++ /home/jtait/src/apache_1.3.24/src/modules/standard/mod_rewrite.cWed May  8 
+15:18:36 2002
@@ -507,6 +507,11 @@
   a2+4, NULL);
 }
 }
+else if (strncmp(a2, "tcp:", 4) == 0) {
+new->type  = MAPTYPE_TCP;
+new->datafile  = a2+4;
+new->checkfile = NULL;
+}
 else {
 new->type  = MAPTYPE_TXT;
 new->datafile  = a2;
@@ -2751,6 +2756,17 @@
 return NULL;
 #endif
 }
+else if (s->type == MAPTYPE_TCP) {
+if ((value = lookup_map_tcp(r, s->datafile, key)) != NULL) {
+rewritelog(r, 5, "map lookup OK: map=%s(%s) key=%s -> val=%s",
+   s->name, s->datafile, key, value);
+return value;
+}
+else {
+rewritelog(r, 5, "map lookup FAILED: map=%s(%s), key=%s",
+   s->name, s->datafile, key);
+}
+}
 else if (s->type == MAPTYPE_PRG) {
 if ((value =
  lookup_map_program(r, s->fpin, s->fpout, key)) != NULL) {
@@ -2945,6 +2961,126 @@
 }
 }
 
+static char *lookup_map_tcp(request_rec *r, const char *hoststr, char *key)
+{
+char buf[LONG_STRING_LEN];
+char c;
+int i, sock;
+
+/* create a socket connection to the external program */
+sock = make_socket_connection(r, hoststr);
+if (sock == -1) {
+return NULL;
+}
+
+ap_hard_timeout("Send external rewrite request", r);
+/* write out the request key */
+i = send(sock, key, strlen(key), 0);
+if (i != strlen(key)) {
+ap_kill_timeout(r);
+return NULL;
+}
+ap_reset_timeout(r);
+
+i = send(sock, "\n", 1, 0);
+if (i != 1) {
+ap_kill_timeout(r);
+return NULL;
+}
+ap_kill_timeout(r);
+
+/* read in the response value */
+ap_hard_timeout("Receive external rewrite response", r);
+i = 0;
+while (recv(sock, &c, 1, 0) == 1 && (i < LONG_STRING_LEN - 1)) {
+if (c == '\n') {
+break;
+}
+buf[i++] = c;
+}
+buf[i] = '\0';
+ap_pclosesocket(r->pool, sock);
+ap_kill_timeout(r);
+
+if (strcasecmp(buf, "NULL") == 0) {
+return NULL;
+}
+else {
+return ap_pstrdup(r->pool, buf);
+}
+}
+
+static int make_socket_connection(request_rec *r, const char *hoststr)
+{
+struct hostent *server_hp;
+struct sockaddr_in addr;
+int i, sock, port;
+char *host;
+char *portstr;
+
+memset(&addr, '\0', sizeof(addr));
+addr.sin_family = AF_INET;
+
+host = ap_pstrdup(r->pool, hoststr);
+rewritelog(r, 5, "Extracting port from string: [%s]", host);
+
+port = 0;
+portstr = strchr(host, ':');
+if (portstr != NULL) {
+*(portstr++) = '\0';
+rewritelog(r, 5, "Port found: [%s]", portstr);
+if (ap_isdigit(*portstr)) {
+port = atoi(portstr);
+}
+}
+
+addr.sin_port = htons(port);
+
+for (i = 0; host[i] != '\0'; i++) {
+if(!ap_isdigit(host[i]) && host[i] != '.') {
+break;
+}
+}
+if (host[i] == '\0') {
+rewritelog(r, 3, "External rewrite host IP: %s:%d", host, port);
+addr.sin_addr.s_addr = inet_addr(host);
+}
+else {
+rewritelog(r, 3, "External rewrite hostname: %s:%d", host, port);
+server_hp = gethostbyname(host);
+if (host == NULL) {
+addr.sin_addr.s_addr = 0;
+}
+else {
+addr.sin_addr.s_addr = ((struct in_addr 
+*)server_hp->h_addr_list[0])->s_addr;
+}
+}
+
+sock = ap_psocket(r->pool, PF_INET, SOCK_STREAM, IPPROTO_TCP);
+if (sock == -1) {
+ap_log_rerror(APLOG_MARK,

Re: cvs commit: httpd-2.0 STATUS

2002-05-23 Thread Cliff Woolley

On Thu, 23 May 2002, Brian Pane wrote:

> I don't think we're ready.  The worker MPM deadlocks under load, and as
> far as I know there's no patch yet that fully solves the problem.

That's why there's a wide gap in there time-frame-wise.  We don't *have*
to tag on Saturday, but I'd like us to at least have that in mind as a
goal.  There's enough stuff that has been fixed that we need to get out
there, so we need to just do what we can on the rest.  By the time it
comes out, we'll be pushing a month since 2.0.36 was released, and once
again we're getting to that point where we spend more time closing
duplicate bug reports than fixing new bugs.  I'd ask everyone that can to
help focus on the worker issues so we can get them resolved at least
pseudo-satisfactorily soon.

--Cliff

--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





Re: cvs commit: httpd-2.0 STATUS

2002-05-23 Thread Cliff Woolley

On 23 May 2002 [EMAIL PROTECTED] wrote:

>   +* 37 status: Cliff proposes that 2.0.37 be tagged on Saturday, May 25,
>   +  with the aim of releasing by Friday, May 31, and volunteers to RM.

There are a few outstanding showstoppers listed in the STATUS file,
including one outstanding veto.  Can you all please take another look at
these and let's come to a consensus on these matters soon-ish?  Thanks..

--Cliff




Re: cvs commit: httpd-2.0 STATUS

2002-05-23 Thread Brian Pane

[EMAIL PROTECTED] wrote:

>  +* 37 status: Cliff proposes that 2.0.37 be tagged on Saturday, May 25,
>  +  with the aim of releasing by Friday, May 31, and volunteers to RM.
>

I don't think we're ready.  The worker MPM deadlocks under load, and
as far as I know there's no patch yet that fully solves the problem.
Leader/follower might be a reasonable alternative if we can't get
worker fixed, but I'd want to see positive test reports from people
running platforms other than Solaris before proposing widespread use
of L/F.

--Brian





Re: [PATCH] simplified apachectl that passes through options tohttpd

2002-05-23 Thread Cliff Woolley

On 23 May 2002, Jeff Trawick wrote:

> Existing apachectl keywords are still supported for now (except for
> some alternate spellings of "startssl" -- whats up with that stuff?).

I always assumed it was for Apache-SSL compatibility.  Ben?

--Cliff

--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





[PATCH] simplified apachectl that passes through options to httpd

2002-05-23 Thread Jeff Trawick

This apachectl can supposedly be used to pass anything through to
httpd.  Thus, we now have a wrapper script people can use to run httpd
with the proper environment variables.

Existing apachectl keywords are still supported for now (except for
some alternate spellings of "startssl" -- whats up with that stuff?).

Comments?

Index: support/apachectl.in
===
RCS file: /home/cvs/httpd-2.0/support/apachectl.in,v
retrieving revision 1.12
diff -u -r1.12 apachectl.in
--- support/apachectl.in15 Apr 2002 00:41:25 -  1.12
+++ support/apachectl.in23 May 2002 19:23:20 -
@@ -25,9 +25,6 @@
 #  START CONFIGURATION SECTION  
 #   
 # 
-# the path to your PID file
-PIDFILE=@exp_runtimedir@/@progname@.pid
-#
 # the path to your httpd binary, including options if necessary
 HTTPD='@exp_sbindir@/@progname@'
 #
@@ -50,146 +47,28 @@
 
 ERROR=0
 if [ "x$ARGV" = "x" ] ; then 
-ARGS="help"
+ARGV="-h"
 fi
 
-for ARG in $ARGV $ARGS
-do
-# check for pidfile
-if [ -f $PIDFILE ] ; then
-   PID=`cat $PIDFILE`
-   if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null ; then
-   STATUS="@progname@ (pid $PID) running"
-   RUNNING=1
-   else
-   STATUS="@progname@ (pid $PID?) not running"
-   RUNNING=0
-   fi
-else
-   STATUS="@progname@ (no pid file) not running"
-   RUNNING=0
-fi
-
-case $ARG in
-start)
-   if [ $RUNNING -eq 1 ]; then
-   echo "$0 $ARG: @progname@ (pid $PID) already running"
-   continue
-   fi
-   if $HTTPD ; then
-   echo "$0 $ARG: @progname@ started"
-   else
-   echo "$0 $ARG: @progname@ could not be started"
-   ERROR=3
-   fi
-   ;;
-startssl|sslstart|start-SSL)
-if [ $RUNNING -eq 1 ]; then
-echo "$0 $ARG: @progname@ (pid $PID) already running"
-continue
-fi
-if $HTTPD -DSSL; then
-echo "$0 $ARG: @progname@ started"
-else
-echo "$0 $ARG: @progname@ could not be started"
-ERROR=3
-fi
-;;
-stop)
-   if [ $RUNNING -eq 0 ]; then
-   echo "$0 $ARG: $STATUS"
-   continue
-   fi
-   if kill $PID ; then
-   echo "$0 $ARG: @progname@ stopped"
-   else
-   echo "$0 $ARG: @progname@ could not be stopped"
-   ERROR=4
-   fi
-   ;;
-restart)
-   if [ $RUNNING -eq 0 ]; then
-   echo "$0 $ARG: @progname@ not running, trying to start"
-   if $HTTPD ; then
-   echo "$0 $ARG: @progname@ started"
-   else
-   echo "$0 $ARG: @progname@ could not be started"
-   ERROR=5
-   fi
-   else
-   if $HTTPD -t >/dev/null 2>&1; then
-   if kill -HUP $PID ; then
-   echo "$0 $ARG: @progname@ restarted"
-   else
-   echo "$0 $ARG: @progname@ could not be restarted"
-   ERROR=6
-   fi
-   else
-   echo "$0 $ARG: configuration broken, ignoring restart"
-   echo "$0 $ARG: (run 'apachectl configtest' for details)"
-   ERROR=6
-   fi
-   fi
-   ;;
-graceful)
-   if [ $RUNNING -eq 0 ]; then
-   echo "$0 $ARG: @progname@ not running, trying to start"
-   if $HTTPD ; then
-   echo "$0 $ARG: @progname@ started"
-   else
-   echo "$0 $ARG: @progname@ could not be started"
-   ERROR=5
-   fi
-   else
-   if $HTTPD -t >/dev/null 2>&1; then
-   if kill -@AP_SIG_GRACEFUL_SHORT@ $PID ; then
-   echo "$0 $ARG: @progname@ gracefully restarted"
-   else
-   echo "$0 $ARG: @progname@ could not be restarted"
-   ERROR=7
-   fi
-   else
-   echo "$0 $ARG: configuration broken, ignoring restart"
-   echo "$0 $ARG: (run 'apachectl configtest' for details)"
-   ERROR=7
-   fi
-   fi
-   ;;
-status)
-   $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
-   ;;
-fullstatus)
-   $LYNX $STATUSURL
-   ;;
-configtest)
-   if $HTTPD -t; then
-   :
-   else
-   ERROR=8
-   fi
-   ;;
-*)
-   echo "usage: $0 
(start|stop|restart|fullstatus|status|graceful|configtest|help)"
-   cat <


Re: cvs commit: httpd-dist README.html

2002-05-23 Thread Joshua Slive

On Thu, 23 May 2002, Jerry Baker wrote:

> Aaron Bannert wrote:
> > >   +Do not download from www.apache.org.  Please use a mirror site
> > May I suggest that we put this notice in HEADER.html? Otherwise
> > it shows up underneath the links that allow downloads from apache.org
> > directly, which means that many people won't even see the message.
>
> I think another thing to address is that the mirrors are not true
> "mirrors" of the Apache dist site. The have different directory trees
> which may confuse people into just getting it from apache.org.

Jerry: I'm not sure exactly what you mean.  There are only a couple sites
I saw that weren't carrying the whole www.apache.org/dist/ tree.  I'll
kill them the next time I go through the list.

Aaron: You may indeed be right, but I was trying to keep in the spirit of
Will's changes to put an index at the top and the meat at the bottom.

One question is, should we just eliminate the direct links to our download
site and link only to the mirrors?  A problem with this is that smart
people will want to download the KEYS/asc/md5 file directly from
apache.org even if they download the rest from a mirror.  I suppose we
could put those in a different place, but then we are getting complicated,
and I hate complications.

Joshua.




Re: cvs commit: httpd-dist README.html

2002-05-23 Thread Greg Marr

On Thu, May 23, 2002 at 06:45:03PM -, [EMAIL PROTECTED] wrote:
 > slive   02/05/23 11:45:02
...
 >   +Do not download from www.apache.org.  Please use a mirror site
 >   +   to help use save apache.org bandwidth.

should that be "help us save"?

-- 
Greg Marr
[EMAIL PROTECTED]
"We thought you were dead."
"I was, but I'm better now." - Sheridan, "The Summoning"




Re: cvs commit: httpd-dist README.html

2002-05-23 Thread Jerry Baker

Aaron Bannert wrote:
> 
> On Thu, May 23, 2002 at 06:45:03PM -, [EMAIL PROTECTED] wrote:
> > slive   02/05/23 11:45:02
> ...
> >   +Do not download from www.apache.org.  Please use a mirror site
> >   +   to help use save apache.org bandwidth.
> >   +   http://www.apache.org/dyn/closer.cgi/httpd/";>Go
> >   here to find your nearest mirror.
> 
> May I suggest that we put this notice in HEADER.html? Otherwise
> it shows up underneath the links that allow downloads from apache.org
> directly, which means that many people won't even see the message.
> 
> -aaron

I think another thing to address is that the mirrors are not true
"mirrors" of the Apache dist site. The have different directory trees
which may confuse people into just getting it from apache.org.

-- 
Jerry Baker



RE: [PATCH] prg: type RewriteMap can now take arguments again

2002-05-23 Thread Ryan Bloom

> From: James Tait [mailto:[EMAIL PROTECTED]]
> 
> See bugzilla id #8464 for details, but currently in 2.0.36 you cannot
> specify command-line arguments to an external rewrite program, thus:
> 
> RewriteMap "prg:/path/to/my/engine -arg1 -arg2"
> 
> This was valid in 1.3.24, as it exec'd a shell with the "-c
> /path/to/my/engine -arg1 -arg2" arguments.
> 
> Hopefully this patch should enable us to be able to supply
command-line
> arguments to our external program again, negating the need for a shell
> script wrapper and meaning the configuration is all in httpd.conf.

In general, this is good, but it duplicates some logic already in apr.
There is a function, tokenize_to_argv, which given a string, will pass
back an argv array.  If we use that, then we get the ability to quote
the arguments, and there is less duplicate code.  Please re-submit with
that change, and I will apply the patch.

Ryan





Re: cvs commit: httpd-dist README.html

2002-05-23 Thread Aaron Bannert

On Thu, May 23, 2002 at 06:45:03PM -, [EMAIL PROTECTED] wrote:
> slive   02/05/23 11:45:02
...
>   +Do not download from www.apache.org.  Please use a mirror site
>   +   to help use save apache.org bandwidth.
>   +   http://www.apache.org/dyn/closer.cgi/httpd/";>Go 
>   here to find your nearest mirror.

May I suggest that we put this notice in HEADER.html? Otherwise
it shows up underneath the links that allow downloads from apache.org
directly, which means that many people won't even see the message.

-aaron



Re: [PATCH] Re: libhttpd.dsp use of xcopy /y breaks compile on NT 4.0

2002-05-23 Thread Jerry Baker

Bill Stoddard wrote:
> 
> This patch seems to work ok on both NT 4.0 and 2K. I don't know what's going on with 
>the
> USERDEP change though... (from USERDEP__WIN32 to USERDEP_GEN_T).

Does MSVC really spawn a new shell for every command? I wouldn't be
surprised, but if not, the env CMDCOPY should only need to be set once.

-- 
Jerry Baker



[PATCH] prg: type RewriteMap can now take arguments again

2002-05-23 Thread James Tait

See bugzilla id #8464 for details, but currently in 2.0.36 you cannot 
specify command-line arguments to an external rewrite program, thus:

RewriteMap "prg:/path/to/my/engine -arg1 -arg2"

This was valid in 1.3.24, as it exec'd a shell with the "-c 
/path/to/my/engine -arg1 -arg2" arguments.

Hopefully this patch should enable us to be able to supply command-line 
arguments to our external program again, negating the need for a shell 
script wrapper and meaning the configuration is all in httpd.conf.

Cheers,

JT
-- 
+++
| James Tait | ICQ# 17834893  |
| MUD programmer and Linux advocate  | http://www.wyrddreams.demon.co.uk/ |
+++



This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com


--- ../httpd-2.0.36-unmodified/modules/mappers/mod_rewrite.cMon Apr 22 11:27:01 
2002
+++ modules/mappers/mod_rewrite.c   Thu May 23 17:21:26 2002
@@ -3370,6 +3370,24 @@
 apr_status_t rc;
 apr_procattr_t *procattr;
 apr_proc_t *procnew;
+char *arg;
+char *datafile;
+const char **args;
+int nargs;
+
+procnew = apr_pcalloc(p, sizeof(*procnew));
+datafile = apr_pstrdup(p, progname);
+nargs = 0;
+while (*datafile && ap_getword_white_nc(p, &datafile)) {
+nargs++;
+}
+args = (const char **)apr_pcalloc(p, sizeof(char *) * (nargs + 1));
+datafile = apr_pstrdup(p, progname);
+nargs = 0;
+while (*datafile && (arg = ap_getword_white_nc(p, &datafile))) {
+args[nargs++] = apr_pstrdup(p, arg);
+}
+args[nargs] = NULL;
 
 if (((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
 ((rc = apr_procattr_io_set(procattr, APR_FULL_BLOCK,



Re: cvs commit: httpd-2.0/server/mpm/worker mpm.h worker.c

2002-05-23 Thread Jeff Trawick

Brian Pane <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] wrote:
> 
> >trawick 02/05/23 05:58:38
> >
> >  Modified:.CHANGES
> >   include  http_main.h mpm_common.h
> >   server   main.c mpm_common.c
> >   server/mpm/prefork mpm.h prefork.c
> >   server/mpm/worker mpm.h worker.c
> >  Log:
> >  Add "-k start|startssl|restart|graceful|stop" support to httpd
> >  for the Unix MPMs.  These have semantics very similar to the
> >  old apachectl commands of the same name.
> >
> 
> I'll add the same change to leader/follower.  From what you
> changed in worker, it looks like the required modifications are:
> 
> * #define AP_MPM_WANT_SIGNAL_SERVER in mpm.h
> * and add ap_mpm_rewrite args via the pre-parsing hook
> 
> Did I miss anything?

no, that is all that is required...  but note that I postponed playing
with the other MPMs for Unix until I had time to actually verify :)

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...



[PATCH] Re: libhttpd.dsp use of xcopy /y breaks compile on NT 4.0

2002-05-23 Thread Bill Stoddard

This patch seems to work ok on both NT 4.0 and 2K. I don't know what's going on with 
the
USERDEP change though... (from USERDEP__WIN32 to USERDEP_GEN_T).

Index: libhttpd.dsp
===
RCS file: /home/cvs/httpd-2.0/libhttpd.dsp,v
retrieving revision 1.38
diff -u -r1.38 libhttpd.dsp
--- libhttpd.dsp 17 Apr 2002 03:02:02 - 1.38
+++ libhttpd.dsp 23 May 2002 18:25:03 -
@@ -197,7 +197,7 @@
 !IF  "$(CFG)" == "libhttpd - Win32 Release"

 # PROP Ignore_Default_Tool 1
-USERDEP__WIN32=".\include\os.h"
+USERDEP__GEN_T=".\include\os.h"
 # Begin Custom Build - Generating test_char.h
 InputPath=.\server\gen_test_char.exe

@@ -210,7 +210,7 @@
 !ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"

 # PROP Ignore_Default_Tool 1
-USERDEP__WIN32=".\include\os.h"
+USERDEP__GEN_T=".\include\os.h"
 # Begin Custom Build - Generating test_char.h
 InputPath=.\server\gen_test_char.exe

@@ -234,8 +234,9 @@
 InputPath=.\modules\http\mod_core.h

 ".\include\mod_core.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\modules\http\mod_core.h .\include
- echo Created mod_core.h
+ set COPYCMD=/y
+ xcopy  .\modules\http\mod_core.h .\include
+ echo Created mod_core.h

 # End Custom Build

@@ -246,8 +247,9 @@
 InputPath=.\modules\http\mod_core.h

 ".\include\mod_core.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\modules\http\mod_core.h .\include
- echo Created mod_core.h
+ set COPYCMD=/y
+ xcopy  .\modules\http\mod_core.h .\include
+ echo Created mod_core.h

 # End Custom Build

@@ -265,8 +267,9 @@
 InputPath=.\modules\dav\main\mod_dav.h

 ".\include\mod_dav.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\modules\dav\main\mod_dav.h .\include
- echo Created mod_dav.h
+ set COPYCMD=/y
+ xcopy  .\modules\dav\main\mod_dav.h .\include
+ echo Created mod_dav.h

 # End Custom Build

@@ -277,8 +280,9 @@
 InputPath=.\modules\dav\main\mod_dav.h

 ".\include\mod_dav.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\modules\dav\main\mod_dav.h .\include
- echo Created mod_dav.h
+ set COPYCMD=/y
+ xcopy  .\modules\dav\main\mod_dav.h .\include
+ echo Created mod_dav.h

 # End Custom Build

@@ -296,8 +300,9 @@
 InputPath=.\modules\proxy\mod_proxy.h

 ".\include\mod_proxy.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\modules\proxy\mod_proxy.h .\include
- echo Created mod_proxy.h
+ set COPYCMD=/y
+ xcopy  .\modules\proxy\mod_proxy.h .\include
+ echo Created mod_proxy.h

 # End Custom Build

@@ -308,8 +313,9 @@
 InputPath=.\modules\proxy\mod_proxy.h

 ".\include\mod_proxy.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\modules\proxy\mod_proxy.h .\include
- echo Created mod_proxy.h
+ set COPYCMD=/y
+ xcopy  .\modules\proxy\mod_proxy.h .\include
+ echo Created mod_proxy.h

 # End Custom Build

@@ -327,8 +333,9 @@
 InputPath=.\server\mpm\winnt\mpm.h

 ".\include\mpm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\server\mpm\winnt\mpm.h .\include
- echo Created mpm.h
+ set COPYCMD=/y
+ xcopy  .\server\mpm\winnt\mpm.h .\include
+ echo Created mpm.h

 # End Custom Build

@@ -339,8 +346,9 @@
 InputPath=.\server\mpm\winnt\mpm.h

 ".\include\mpm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\server\mpm\winnt\mpm.h .\include
- echo Created mpm.h
+ set COPYCMD=/y
+ xcopy  .\server\mpm\winnt\mpm.h .\include
+ echo Created mpm.h

 # End Custom Build

@@ -358,8 +366,9 @@
 InputPath=.\server\mpm\winnt\mpm_default.h

 ".\include\mpm_default.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\server\mpm\winnt\mpm_default.h .\include
- echo Created mpm_default.h
+ set COPYCMD=/y
+ xcopy  .\server\mpm\winnt\mpm_default.h .\include
+ echo Created mpm_default.h

 # End Custom Build

@@ -370,8 +379,9 @@
 InputPath=.\server\mpm\winnt\mpm_default.h

 ".\include\mpm_default.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\server\mpm\winnt\mpm_default.h .\include
- echo Created mpm_default.h
+ set COPYCMD=/y
+ xcopy  .\server\mpm\winnt\mpm_default.h .\include
+ echo Created mpm_default.h

 # End Custom Build

@@ -389,8 +399,9 @@
 InputPath=.\os\win32\os.h

 ".\include\os.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\os\win32\os.h .\include
- echo Created os.h
+ set COPYCMD=/y
+ xcopy  .\os\win32\os.h .\include
+ echo Created os.h

 # End Custom Build

@@ -401,8 +412,9 @@
 InputPath=.\os\win32\os.h

 ".\include\os.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- xcopy /y .\os\win32\os.h .\include
- echo Created os.h
+ set COPYCMD=/y
+ xcopy  .\os\win32\os.h .\include
+ echo Created os.h

 # End Custom Build





Re: cvs commit: httpd-2.0/server/mpm/worker mpm.h worker.c

2002-05-23 Thread Brian Pane

[EMAIL PROTECTED] wrote:

>trawick 02/05/23 05:58:38
>
>  Modified:.CHANGES
>   include  http_main.h mpm_common.h
>   server   main.c mpm_common.c
>   server/mpm/prefork mpm.h prefork.c
>   server/mpm/worker mpm.h worker.c
>  Log:
>  Add "-k start|startssl|restart|graceful|stop" support to httpd
>  for the Unix MPMs.  These have semantics very similar to the
>  old apachectl commands of the same name.
>

I'll add the same change to leader/follower.  From what you
changed in worker, it looks like the required modifications are:

* #define AP_MPM_WANT_SIGNAL_SERVER in mpm.h
* and add ap_mpm_rewrite args via the pre-parsing hook

Did I miss anything?

Thanks,
--Brian





Re: libhttpd.dsp use of xcopy /y breaks compile on NT 4.0

2002-05-23 Thread Bill Stoddard


> Bill Stoddard wrote:
> > 
> > Here is the commit message for using xcopy:
> > 
> > "Tired of 'foo.h not found' messages in the build.  Checked ms's docs,
> >  seems xcopy's /y arg goes all the way back to Win95.  This shouldn't
> >  introduce any hassles."
> > 
> > I can live with the messages, but not the build break :-)
> > 
> > Bill
> 
> >From what I understand, xcopy automatically acted as if the /Y flag was
> specified in NT until Windows 2000. It was then that MS brought the
> command line for NT into line with that of Win 95/98/Me. So, setting
> COPYCMD=/Y shouldn't affect the behavior of NT 4 because it is not
> recognized and xcopy will act as if it had been specified anyway.
> 
> -- 
> Jerry Baker
> 

I'll try that and see what happens.

Bill




QNX 6.1a mod/peer review

2002-05-23 Thread Davide Berti

Hello all

httpd-2.0.36, QNX 6.1 RTOS

I have made a modification to apache to get it to run
on qnx.  It kept hanging.  I traced it down and made
some changes to get it to run.  I wanted to proof
these changes with the apache community and get some
feedback as to the longterm consequences/ side effects
of these changes.  I am attaching a diff of the
changes that I made.

I also noticed that SSL doesn't seem to work unless
the -X flag is passed to httpd, any ideas.

Thanks
/Davide 

--- httpd-2.0.36/srclib/apr/locks/unix/proc_mutex.c
Mon Apr  8 23:56:56 2002
+++ ../httpd-2.0.36/srclib/apr/locks/unix/proc_mutex.c
Wed May  8 16:04:51 2002
@@ -318,7 +318,9 @@
 if (munmap((caddr_t)mutex->pthread_interproc,
sizeof(pthread_mutex_t))){
 return errno;
 }
-}
+   if(shm_unlink("/datapoints")) // DB
+return errno;
+   }
 return APR_SUCCESS;
 }
 
@@ -329,11 +331,15 @@
 int fd;
 pthread_mutexattr_t mattr;
 
-fd = open("/dev/zero", O_RDWR);
-if (fd < 0) {
-return errno;
-}
+fd=shm_open("/datapoints",O_RDWR|O_CREAT,0777);
//DB
+   if (fd < 0) 
+   return errno;   
 
+   if(ftruncate(fd,sizeof(pthread_mutex_t))==-1)  //DB
+   return errno;   
+
+
+
 new_mutex->pthread_interproc = (pthread_mutex_t
*)mmap(
(caddr_t) 0, 
   
sizeof(pthread_mutex_t), 
@@ -363,10 +369,11 @@
   
PTHREAD_MUTEX_ROBUST_NP))) {
 #ifdef PTHREAD_SETS_ERRNO
 rv = errno;
-#endif
+#endif // DB
 proc_mutex_proc_pthread_cleanup(new_mutex);
 return rv;
 }
+#endif
 if ((rv = pthread_mutexattr_setprotocol(&mattr,
PTHREAD_PRIO_INHERIT))) {
 #ifdef PTHREAD_SETS_ERRNO
 rv = errno;
@@ -374,9 +381,15 @@
 proc_mutex_proc_pthread_cleanup(new_mutex);
 return rv;
 }
+if ((rv =
pthread_mutex_destroy(new_mutex->pthread_interproc)))
{ // DB
+#ifdef PTHREAD_SETS_ERRNO
+rv = errno;
 #endif
+proc_mutex_proc_pthread_cleanup(new_mutex);
+return rv;
+}
 
-if ((rv =
pthread_mutex_init(new_mutex->pthread_interproc,
&mattr))) {
+   if ((rv =
pthread_mutex_init(new_mutex->pthread_interproc,
&mattr))) {
 #ifdef PTHREAD_SETS_ERRNO
 rv = errno;
 #endif

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com



Re: libhttpd.dsp use of xcopy /y breaks compile on NT 4.0

2002-05-23 Thread Jerry Baker

Bill Stoddard wrote:
> 
> Here is the commit message for using xcopy:
> 
> "Tired of 'foo.h not found' messages in the build.  Checked ms's docs,
>  seems xcopy's /y arg goes all the way back to Win95.  This shouldn't
>  introduce any hassles."
> 
> I can live with the messages, but not the build break :-)
> 
> Bill

>From what I understand, xcopy automatically acted as if the /Y flag was
specified in NT until Windows 2000. It was then that MS brought the
command line for NT into line with that of Win 95/98/Me. So, setting
COPYCMD=/Y shouldn't affect the behavior of NT 4 because it is not
recognized and xcopy will act as if it had been specified anyway.

-- 
Jerry Baker



Re: libhttpd.dsp use of xcopy /y breaks compile on NT 4.0

2002-05-23 Thread Bill Stoddard

Here is the commit message for using xcopy:

"Tired of 'foo.h not found' messages in the build.  Checked ms's docs,
 seems xcopy's /y arg goes all the way back to Win95.  This shouldn't
 introduce any hassles."

I can live with the messages, but not the build break :-)

Bill

- Original Message - 
From: "Jerry Baker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 1:05 PM
Subject: Re: libhttpd.dsp use of xcopy /y breaks compile on NT 4.0


> Bill Stoddard wrote:
> > 
> > Heads-up. I am backing out this patch to get compiles on NT 4.0 working again.
> 
> Is there some reason why xcopy is preferred over copy on Win32? If so,
> you can set COPYCMD=/Y. Windows NT should ignore this, but xcopy on
> platforms that support the /Y switch will pick it up.
> 
> -- 
> Jerry Baker
> 




Re: libhttpd.dsp use of xcopy /y breaks compile on NT 4.0

2002-05-23 Thread Jerry Baker

Bill Stoddard wrote:
> 
> Heads-up. I am backing out this patch to get compiles on NT 4.0 working again.

Is there some reason why xcopy is preferred over copy on Win32? If so,
you can set COPYCMD=/Y. Windows NT should ignore this, but xcopy on
platforms that support the /Y switch will pick it up.

-- 
Jerry Baker



RE: win32 changes from 1.3

2002-05-23 Thread Allan Edwards

> > > > I suggest we cwd to the server root on startup.  We can do this
> > > > in the winnt_mpm, or for all platforms in main().  Opinions?
> > >
> > >+1  - at least for Windows
> > 
> > And +1 for the rest, or was that simply +0 to do so in main()?
> 
> why would we want to chdir() for the other platforms?  maybe it
> wouldn't hurt at this stage (we chdir("/") later in processing on
> Unix) 

Well I don't feel comfortable giving the recommendation
for Unix etc, i.e. what the side effects might be so unless
someone else says +1 for main I would go with winnt_mpm.

Allan 



libhttpd.dsp use of xcopy /y breaks compile on NT 4.0

2002-05-23 Thread Bill Stoddard

Heads-up. I am backing out this patch to get compiles on NT 4.0 working again.
Bill 
===
RCS file: /home/cvspublic/httpd-2.0/libhttpd.dsp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- httpd-2.0/libhttpd.dsp  2002/03/15 14:57:55 1.37
+++ httpd-2.0/libhttpd.dsp  2002/04/17 03:02:02 1.38
@@ -234,8 +234,7 @@
 InputPath=.\modules\http\mod_core.h
 
 ".\include\mod_core.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mod_core.h
-   copy .\modules\http\mod_core.h .\include\mod_core.h
+   xcopy /y .\modules\http\mod_core.h .\include
echo Created mod_core.h

 # End Custom Build
@@ -247,8 +246,7 @@
 InputPath=.\modules\http\mod_core.h
 
 ".\include\mod_core.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mod_core.h
-   copy .\modules\http\mod_core.h .\include\mod_core.h
+   xcopy /y .\modules\http\mod_core.h .\include
echo Created mod_core.h

 # End Custom Build
@@ -267,8 +265,7 @@
 InputPath=.\modules\dav\main\mod_dav.h
 
 ".\include\mod_dav.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mod_dav.h
-   copy .\modules\dav\main\mod_dav.h .\include\mod_dav.h
+   xcopy /y .\modules\dav\main\mod_dav.h .\include
echo Created mod_dav.h

 # End Custom Build
@@ -280,8 +277,7 @@
 InputPath=.\modules\dav\main\mod_dav.h
 
 ".\include\mod_dav.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mod_dav.h
-   copy .\modules\dav\main\mod_dav.h .\include\mod_dav.h
+   xcopy /y .\modules\dav\main\mod_dav.h .\include
echo Created mod_dav.h

 # End Custom Build
@@ -300,8 +296,7 @@
 InputPath=.\modules\proxy\mod_proxy.h
 
 ".\include\mod_proxy.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mod_proxy.h
-   copy .\modules\proxy\mod_proxy.h .\include\mod_proxy.h
+   xcopy /y .\modules\proxy\mod_proxy.h .\include
echo Created mod_proxy.h

 # End Custom Build
@@ -313,8 +308,7 @@
 InputPath=.\modules\proxy\mod_proxy.h
 
 ".\include\mod_proxy.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mod_proxy.h
-   copy .\modules\proxy\mod_proxy.h .\include\mod_proxy.h
+   xcopy /y .\modules\proxy\mod_proxy.h .\include
echo Created mod_proxy.h

 # End Custom Build
@@ -333,8 +327,7 @@
 InputPath=.\server\mpm\winnt\mpm.h
 
 ".\include\mpm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mpm.h
-   copy .\server\mpm\winnt\mpm.h .\include\mpm.h
+   xcopy /y .\server\mpm\winnt\mpm.h .\include
echo Created mpm.h

 # End Custom Build
@@ -346,8 +339,7 @@
 InputPath=.\server\mpm\winnt\mpm.h
 
 ".\include\mpm.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mpm.h
-   copy .\server\mpm\winnt\mpm.h .\include\mpm.h
+   xcopy /y .\server\mpm\winnt\mpm.h .\include
echo Created mpm.h

 # End Custom Build
@@ -366,8 +358,7 @@
 InputPath=.\server\mpm\winnt\mpm_default.h
 
 ".\include\mpm_default.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mpm_default.h
-   copy .\server\mpm\winnt\mpm_default.h .\include\mpm_default.h
+   xcopy /y .\server\mpm\winnt\mpm_default.h .\include
echo Created mpm_default.h

 # End Custom Build
@@ -379,8 +370,7 @@
 InputPath=.\server\mpm\winnt\mpm_default.h
 
 ".\include\mpm_default.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\mpm_default.h
-   copy .\server\mpm\winnt\mpm_default.h .\include\mpm_default.h
+   xcopy /y .\server\mpm\winnt\mpm_default.h .\include
echo Created mpm_default.h

 # End Custom Build
@@ -399,8 +389,7 @@
 InputPath=.\os\win32\os.h
 
 ".\include\os.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\os.h
-   copy .\os\win32\os.h .\include\os.h
+   xcopy /y .\os\win32\os.h .\include
echo Created os.h

 # End Custom Build
@@ -412,8 +401,7 @@
 InputPath=.\os\win32\os.h
 
 ".\include\os.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
-   del .\include\os.h
-   copy .\os\win32\os.h .\include\os.h
+   xcopy /y .\os\win32\os.h .\include
echo Created os.h

 # End Custom Build






Re: dist/httpd/

2002-05-23 Thread Paul J. Reder

-build- and -make- (i.e. including the verb) implies action (as in "contains
the results of"). I'd suggest sticking to some flavor of src to avoid
ambiguity. What they do with it is their business.

William A. Rowe, Jr. wrote:

> At 10:46 AM 5/23/2002, Joshua Slive wrote:
> 
>> On Wed, 22 May 2002, William A. Rowe, Jr. wrote:
>> > And Josh and I are suggesting we add -src to the end of every 
>> package name
>> > in the source distro directory.
>>
>> Yes, "src" would be an improvement.  Note that "build" seems very
>> ambiguous to me.  That could mean "stuff you need in order to build", but
>> it could also mean "contains a build of apache".  Admittedly, it is 
>> pretty
>> difficult to comunicate much information in a filename, but I think we 
>> can
>> improve on this.
> 
> 
> So -win32-build-src isn't terribly ambigious, or should we name it
> -win32-make-src, or simply -win32-src?
> 
> Bill
> 
> 
> 


-- 
Paul J. Reder
---
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it.  Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein





Re: dist/httpd/

2002-05-23 Thread Aaron Bannert

On Thu, May 23, 2002 at 10:58:18AM -0500, William A. Rowe, Jr. wrote:
> So -win32-build-src isn't terribly ambigious, or should we name it
> -win32-make-src, or simply -win32-src?

-0 for *-build-src and *-make-src
+0 for -win32-src only
+1 for httpd-x.y.z-win32-src.zip and httpd-x.y.z-src.tar.gz

(In other words, I think we should rename all the source distros with
-src, not just win32.)

-aaron



RE: dist/httpd/

2002-05-23 Thread Sander Striker

> From: William A. Rowe, Jr. [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2002 17:58

> At 10:46 AM 5/23/2002, Joshua Slive wrote:
> >On Wed, 22 May 2002, William A. Rowe, Jr. wrote:
> > > And Josh and I are suggesting we add -src to the end of every package name
> > > in the source distro directory.
> >
> >Yes, "src" would be an improvement.  Note that "build" seems very
> >ambiguous to me.  That could mean "stuff you need in order to build", but
> >it could also mean "contains a build of apache".  Admittedly, it is pretty
> >difficult to comunicate much information in a filename, but I think we can
> >improve on this.
> 
> So -win32-build-src isn't terribly ambigious, or should we name it
> -win32-make-src, or simply -win32-src?

The latter.

Sander




Re: dist/httpd/

2002-05-23 Thread William A. Rowe, Jr.

At 10:46 AM 5/23/2002, Joshua Slive wrote:
>On Wed, 22 May 2002, William A. Rowe, Jr. wrote:
> > And Josh and I are suggesting we add -src to the end of every package name
> > in the source distro directory.
>
>Yes, "src" would be an improvement.  Note that "build" seems very
>ambiguous to me.  That could mean "stuff you need in order to build", but
>it could also mean "contains a build of apache".  Admittedly, it is pretty
>difficult to comunicate much information in a filename, but I think we can
>improve on this.

So -win32-build-src isn't terribly ambigious, or should we name it
-win32-make-src, or simply -win32-src?

Bill





Re: dist/httpd/

2002-05-23 Thread Joshua Slive

On Wed, 22 May 2002, William A. Rowe, Jr. wrote:
> And Josh and I are suggesting we add -src to the end of every package name
> in the source distro directory.

Yes, "src" would be an improvement.  Note that "build" seems very
ambiguous to me.  That could mean "stuff you need in order to build", but
it could also mean "contains a build of apache".  Admittedly, it is pretty
difficult to comunicate much information in a filename, but I think we can
improve on this.

Joshua.




Re: httpd-2.0.36 - mod_cache problems

2002-05-23 Thread Tacio A.G. Santos

Hi,
   Why do we need to set the content type at cache_storage.c at line 
240, i just commented it out and it seems to be working. Sorry about 
my ignorance, but may it cause a side effect?
Thanks,
Tacio

PS:
  diff -u cache_storage.c-orig cache_storage.c
--- cache_storage.c-origThu May 23 17:33:31 2002
+++ cache_storage.c Thu May 23 17:32:59 2002
@@ -237,7 +237,7 @@
  return rv;
  }

-ap_set_content_type(r, apr_pstrdup(r->pool, info->content_type));
+/*ap_set_content_type(r, apr_pstrdup(r->pool, info->content_type));*/
  r->filename = apr_pstrdup(r->pool, info->filename );

  return APR_SUCCESS;





Tacio A.G. Santos wrote:
> Thanks ,
>   It solved the problem with file permission, but there's still a 
> problem with the content type.
> For example getting a index.html file i get in the first request:
> 
> 2 Date: Thu, 23 May 2002 14:14:46 GMT
> 3 Server: Apache/1.3.23 (Unix) mod_perl/1.26
> 4 Content-Location: index.html.en
> 5 Vary: negotiate,accept-language,accept-charset
> 6 TCN: choice
> 7 Last-Modified: Tue, 23 Apr 2002 14:56:35 GMT
> 8 ETag: "6cb4-5b1-3cc57623;3cc57623"
> 9 Accept-Ranges: bytes
> 10 Content-Type: text/html; charset=ISO-8859-1
> 11 Content-Language: en
> 12 Via: 1.0 sitak:8080
> 13 Content-Length: 1457
> 14 Connection: close
> 
> If i try to get it again the following headers are returned:
> 
> 
> 2 Date: Thu, 23 May 2002 14:21:24 GMT
> 3 Server: Apache/1.3.23 (Unix) mod_perl/1.26
> 4 Content-Location: index.html.en
> 5 Vary: negotiate,accept-language,accept-charset
> 6 TCN: choice
> 7 ETag: "6cb4-5b1-3cc57623;3cc57623"
> 8 Accept-Ranges: bytes
> 9 Content-Language: en
> 10 Via: 1.0 sitak:8080
> 11 Last-Modified: Tue, 23 Apr 2002 14:56:35 GMT
> 12 Content-Type: text/plain; charset=ISO-8859-1
> 13 Content-Length: 1457
> 14 Connection: close
> 
> 
> It just changed the Content-Type to text/plain. It also happens with 
> image files. Somehow mod_cache is not taking into account the 
> Content-Type written in the respective cache header file. Does anybody 
> know where is it set?
> 
> Thanks again,
> Tacio
> 
> 
> Jeff Trawick wrote:
> 
>> "Tacio A.G. Santos" <[EMAIL PROTECTED]> writes:
>>
>>
>>> Hi,
>>>   I'm trying to configure mod_cache+mod_proxy, but mod_cache is not
>>> working properly. One thing i found strange is that if you look in the
>>> cache directory we have the following strange file permissions:
>>>
>>> -rw---1 webu webg 2326 May 22 16:41 
>>> wkL1JcPol1pQ.data
>>> --1 webu webg  355 May 22 16:41
>>> wkL1JcPol1pQ.header
>>
>>
>>
>> Perhaps you could try this patch?
>>
>> Index: mod_disk_cache.c
>> ===
>> RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
>> retrieving revision 1.33
>> diff -u -r1.33 mod_disk_cache.c
>> --- mod_disk_cache.c17 May 2002 11:33:09 -1.33
>> +++ mod_disk_cache.c23 May 2002 11:59:03 -
>> @@ -548,7 +548,7 @@
>>  
>>  rv = apr_file_open(&dobj->hfd, dobj->hdrsfile,
>> APR_WRITE | APR_CREATE | APR_EXCL,
>> -   0, r->pool);
>> +   APR_OS_DEFAULT, r->pool);
>>  if (rv != APR_SUCCESS) {
>>  return rv;
>>  }
>>
>> Thanks,
>>
>> Jeff
> 
> 
> 
> 



-- 
Tacio A.G. dos SantosE-mail: [EMAIL PROTECTED]
FhI FOKUS / Global Networking (GloNe)Tel: +49-30-3463-7154
Kaiserin-Augusta-Allee 31Fax: +49-30-3463-8287
D-10589 Berlin, Germany




Re: Is Apache Proxy Half-Duplex?

2002-05-23 Thread Bill Stoddard


> "William A. Rowe, Jr." wrote:
>
> > >Half duplex in the sense that a reply follows a request. ie a reply does
> > >not get sent during a request.
> >
> > Cannot, Should not, or generally Does not?
> >
> > POST accept modules might certainly echo...
> >
> > Headers:...
> >
> > Banners of the the next page
> > Accepting Input ... [long pause]
> > Processing Results ... [long pause]
> >
> > With the caviats that you can't begin a response body if you potentially
> > expect to error out on the results, and there are no promises that this will
> > ever be rendered, but that's not the point.  If you can find in the HTTP spec
> > where this is disallowed, please point me at it!
>
> Ok, then I've misunderstood this.
>
> The bottom line is that we must be able to read a request and read a
> reply simultaneously using filters. Is this possible?

This is a variation of the problem Aaron and I were interested in with CGI scripts (and
directly related to an open PR against 2.0.36).  Unfortunately, I think filters need 
some
more work to make this possible. As Will said, we need to be able to poll/select on 
both
the frontend and backend descriptors and do the right thing. I may be mistaken but I
thought the proxy in 1.3 handled this correctly...
>

> One point where we need this is in the CONNECT proxy, which needs to
> read bytes from both the foreign server and client simultaneously.
>
Yep


Bill




Re: httpd-2.0.36 - mod_cache problems

2002-05-23 Thread Jeff Trawick

"Tacio A.G. Santos" <[EMAIL PROTECTED]> writes:

> Thanks ,
>It solved the problem with file permission, but there's still a
> problem with the content type.

Thanks for the quick feedback on my simple fix.  Hopefully the smart
people can help you with the content type problem.

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...



Re: httpd-2.0.36 - mod_cache problems

2002-05-23 Thread Tacio A.G. Santos

Thanks ,
   It solved the problem with file permission, but there's still a 
problem with the content type.
For example getting a index.html file i get in the first request:

2 Date: Thu, 23 May 2002 14:14:46 GMT
3 Server: Apache/1.3.23 (Unix) mod_perl/1.26
4 Content-Location: index.html.en
5 Vary: negotiate,accept-language,accept-charset
6 TCN: choice
7 Last-Modified: Tue, 23 Apr 2002 14:56:35 GMT
8 ETag: "6cb4-5b1-3cc57623;3cc57623"
9 Accept-Ranges: bytes
10 Content-Type: text/html; charset=ISO-8859-1
11 Content-Language: en
12 Via: 1.0 sitak:8080
13 Content-Length: 1457
14 Connection: close

If i try to get it again the following headers are returned:


2 Date: Thu, 23 May 2002 14:21:24 GMT
3 Server: Apache/1.3.23 (Unix) mod_perl/1.26
4 Content-Location: index.html.en
5 Vary: negotiate,accept-language,accept-charset
6 TCN: choice
7 ETag: "6cb4-5b1-3cc57623;3cc57623"
8 Accept-Ranges: bytes
9 Content-Language: en
10 Via: 1.0 sitak:8080
11 Last-Modified: Tue, 23 Apr 2002 14:56:35 GMT
12 Content-Type: text/plain; charset=ISO-8859-1
13 Content-Length: 1457
14 Connection: close


It just changed the Content-Type to text/plain. It also happens with 
image files. Somehow mod_cache is not taking into account the 
Content-Type written in the respective cache header file. Does anybody 
know where is it set?

Thanks again,
Tacio


Jeff Trawick wrote:
> "Tacio A.G. Santos" <[EMAIL PROTECTED]> writes:
> 
> 
>>Hi,
>>   I'm trying to configure mod_cache+mod_proxy, but mod_cache is not
>>working properly. One thing i found strange is that if you look in the
>>cache directory we have the following strange file permissions:
>>
>>-rw---1 webu webg 2326 May 22 16:41 wkL1JcPol1pQ.data
>>--1 webu webg  355 May 22 16:41
>>wkL1JcPol1pQ.header
> 
> 
> Perhaps you could try this patch?
> 
> Index: mod_disk_cache.c
> ===
> RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
> retrieving revision 1.33
> diff -u -r1.33 mod_disk_cache.c
> --- mod_disk_cache.c  17 May 2002 11:33:09 -  1.33
> +++ mod_disk_cache.c  23 May 2002 11:59:03 -
> @@ -548,7 +548,7 @@
>  
>  rv = apr_file_open(&dobj->hfd, dobj->hdrsfile,
> APR_WRITE | APR_CREATE | APR_EXCL,
> -   0, r->pool);
> +   APR_OS_DEFAULT, r->pool);
>  if (rv != APR_SUCCESS) {
>  return rv;
>  }
> 
> Thanks,
> 
> Jeff





Re: Is Apache Proxy Half-Duplex?

2002-05-23 Thread Graham Leggett

"William A. Rowe, Jr." wrote:

> >Half duplex in the sense that a reply follows a request. ie a reply does
> >not get sent during a request.
> 
> Cannot, Should not, or generally Does not?
> 
> POST accept modules might certainly echo...
> 
> Headers:...
> 
> Banners of the the next page
> Accepting Input ... [long pause]
> Processing Results ... [long pause]
> 
> With the caviats that you can't begin a response body if you potentially
> expect to error out on the results, and there are no promises that this will
> ever be rendered, but that's not the point.  If you can find in the HTTP spec
> where this is disallowed, please point me at it!

Ok, then I've misunderstood this.

The bottom line is that we must be able to read a request and read a
reply simultaneously using filters. Is this possible?

One point where we need this is in the CONNECT proxy, which needs to
read bytes from both the foreign server and client simultaneously.

Regards,
Graham
-- 
-
[EMAIL PROTECTED]"There's a moon
over Bourbon Street
tonight..."


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Is Apache Proxy Half-Duplex?

2002-05-23 Thread William A. Rowe, Jr.

At 09:00 AM 5/23/2002, Graham Leggett wrote:
>Bill Stoddard wrote:
>
> > > HTTP v1.1 is a half duplex protocol - this is 100% correct behavior.
> >
> > Where in the spac does it say that?
>
>Half duplex in the sense that a reply follows a request. ie a reply does
>not get sent during a request.

Cannot, Should not, or generally Does not?

POST accept modules might certainly echo...

Headers:...

Banners of the the next page
Accepting Input ... [long pause]
Processing Results ... [long pause]

With the caviats that you can't begin a response body if you potentially
expect to error out on the results, and there are no promises that this will
ever be rendered, but that's not the point.  If you can find in the HTTP spec
where this is disallowed, please point me at it!

>(The 100-continue handling I understand is an exception to this, but I
>think this can be ignored for this example).

And there your argument falls down on it's face.

Two threads is probably not the way to go... Taking a CGI example, we
probably want to poll on all three sources [client body socket read, stdout
and stderr] and both sinks [server response socket write and stdin].

We probably need several accessor bits in the core filter to actually make
this work, where the module wants the server to cooperate in this manner.
It won't be pretty.

Bill




Re: Is Apache Proxy Half-Duplex?

2002-05-23 Thread Graham Leggett

Bill Stoddard wrote:

> > HTTP v1.1 is a half duplex protocol - this is 100% correct behavior.
> 
> Where in the spac does it say that?

Half duplex in the sense that a reply follows a request. ie a reply does
not get sent during a request.

(The 100-continue handling I understand is an exception to this, but I
think this can be ignored for this example).

Regards,
Graham
-- 
-
[EMAIL PROTECTED]"There's a moon
over Bourbon Street
tonight..."


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Is Apache Proxy Half-Duplex?

2002-05-23 Thread Bill Stoddard


> Zvi Har'El wrote:
> 
> > Experimenting with an Apache Proxy,  I noticed that in version 1.3 (the latest
> > cvs snapshot) it behaves in a half-duplex fashion. That is, it doesn't read the
> > backend server response until it have finished transmitting the client's
> > request body.
> 
> HTTP v1.1 is a half duplex protocol - this is 100% correct behavior.

Where in the spac does it say that?

Bill





Re: Is Apache Proxy Half-Duplex?

2002-05-23 Thread Graham Leggett

Zvi Har'El wrote:

> Experimenting with an Apache Proxy,  I noticed that in version 1.3 (the latest
> cvs snapshot) it behaves in a half-duplex fashion. That is, it doesn't read the
> backend server response until it have finished transmitting the client's
> request body.

HTTP v1.1 is a half duplex protocol - this is 100% correct behavior.

> This is pretty annoying, mainly if the request involves a very
> large post (file upload), and the backend sever response, after the headers,
> says "Please wait patiently...". I wonder: are there any intentions to change
> this?

I doubt it. Would have to change HTTP.

> It seems that full-duplex operation requires two threads per proxy, which
> is not how the Apache proxy server works. Is the situation different, or going
> to be different, in Apache 2? Just for reference, the Squid proxy doesn't
> suffer from this deficiency.

Can you explain better exactly what the proxy is doing that you think is
wrong?

There is no way in the HTTP protocol for the server to start responding
before the request is completely uploaded, for obvious reasons. I don't
understand how Squid could be doing this.

Regards,
Graham
-- 
-
[EMAIL PROTECTED]"There's a moon
over Bourbon Street
tonight..."



Re: httpd-2.0.36 - mod_cache problems

2002-05-23 Thread Jeff Trawick

"Tacio A.G. Santos" <[EMAIL PROTECTED]> writes:

> Hi,
>I'm trying to configure mod_cache+mod_proxy, but mod_cache is not
> working properly. One thing i found strange is that if you look in the
> cache directory we have the following strange file permissions:
> 
> -rw---1 webu webg 2326 May 22 16:41 wkL1JcPol1pQ.data
> --1 webu webg  355 May 22 16:41
> wkL1JcPol1pQ.header

Perhaps you could try this patch?

Index: mod_disk_cache.c
===
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
retrieving revision 1.33
diff -u -r1.33 mod_disk_cache.c
--- mod_disk_cache.c17 May 2002 11:33:09 -  1.33
+++ mod_disk_cache.c23 May 2002 11:59:03 -
@@ -548,7 +548,7 @@
 
 rv = apr_file_open(&dobj->hfd, dobj->hdrsfile,
APR_WRITE | APR_CREATE | APR_EXCL,
-   0, r->pool);
+   APR_OS_DEFAULT, r->pool);
 if (rv != APR_SUCCESS) {
 return rv;
 }

Thanks,

Jeff
-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...



httpd-2.0.36 - mod_cache problems

2002-05-23 Thread Tacio A.G. Santos

Hi,
   I'm trying to configure mod_cache+mod_proxy, but mod_cache is not 
working properly. One thing i found strange is that if you look in the 
cache directory we have the following strange file permissions:

-rw---1 webu webg 2326 May 22 16:41 wkL1JcPol1pQ.data
--1 webu webg  355 May 22 16:41 
wkL1JcPol1pQ.header

If we manually changed it (chmod 600 *) the file is served from disk
(cache) otherwise apache gets it again from the originating server.
Another problem is that even if it gets from the cache it somehow 
changes the Content-Type header to text/plain so the browser shows the 
html source file instead of rendering the page.

This test was also performed using the latest (actually yesterday 
version) httpd2 cvs version.

I've started attaching a debugger and digging into the code but i do 
need some help. Could someone point me where can i get more info about 
mod_cache?
Have i overlooked some simple thing? Does anybody have a suggestion 
what else should i try?

Thanks in advance,

Tacio


PS: I configure it with:
./configure  --prefix=/home2/apps/web/apache2 --enable-proxy=shared \
--enable-proxy-connect=shared  --enable-proxy-ftp=shared \
--enable-proxy-http=shared --enable-cache=shared 
--enable-disk-cache=shared \
--enable-mem-cache=shared  2>&1> log_configure.txt

In my httpd.conf i have:


ProxyRequests On

 Order deny,allow
 Deny from all
 Allow from .fokus.gmd.de sitak localhost localhost.ailab.fokus.gmd.de

ProxyVia On

CacheOn On

CacheRoot /home2/apps/web/apache2/proxy
CacheSize 4096
CacheEnable disk /
CacheDirLevels 1
CacheDirLength 5

   










Re: win32 changes from 1.3

2002-05-23 Thread Jeff Trawick

"William A. Rowe, Jr." <[EMAIL PROTECTED]> writes:

> At 06:37 PM 5/22/2002, you wrote:
> > > If your cwd is on another
> > > volume, that's a problem.  This hurts services, since the cwd will
> > > always be c:\winnt\system32\.
> >
> >Yep, was installed on a non-C: drive
> >
> > > I suggest we cwd to the server root on startup.  We can do this
> > > in the winnt_mpm, or for all platforms in main().  Opinions?
> >
> >+1  - at least for Windows
> 
> And +1 for the rest, or was that simply +0 to do so in main()?

why would we want to chdir() for the other platforms?  maybe it
wouldn't hurt at this stage (we chdir("/") later in processing on
Unix) 

-- 
Jeff Trawick | [EMAIL PROTECTED]
Born in Roswell... married an alien...