Mailing List Archive

virtual host again
Well, I found a bug in my virtual host fd cacheing and reved B73 accordingly.
Seems there were some funny interaction with log file rotating via
a SIGHUP.

I'm getting more and more frustrated trying to wedge stuff into
a large program that was not well architected. I think
we need to start pondering building our own framework....
The more I look at the code, the more I realize that this
seemed like an experiment in writing a UNIX program, rather than
something real :( It's funny to see how the same thing is done in
different ways (ie error_log is a FILE *, and xfer_log is a fd),
come on...make up your mind :) I also love how the traditional
mode 0666 is not used as the third argument to open. This
means the process umask is not payed enough attention to, agh...
Building the broken mode into a static variable, was well, kinda
different...maybe a little learning about C was going on here
too. :/

It's late, I'm very tired, and I've just had it with this code.
You can add honey to shit, but you just get sweet tasting shit.
No matter what you add to shit, you end up with some form of shit.
I am not proud of the patches I need to do, but there is no clean
easy was of integrating the junk.

Maybe I should not break my rule about waiting 24 hours to
send a flame...nah...I'll probably regret this in the AM.

Good night,

Cliff
Re: virtual host again [ In reply to ]
On Wed, 26 Apr 1995, Andrew Wilson wrote, quoting Cliff:
> Rob M's mentioned a couple of times already that he'd have done it
> all differently, if he'd known then what he knows now. Unfortunately
> a large-scale change to the structure of the basic server can't really
> be done by a simple patch-review approach, it *really* needs a separate
> initiative to design a generalised and useful structure which can
> be made to accept each of the 'modules' Apache implements: logging,
> content-neg, forking, multi-thread etc...

Right. I imagine a large amount of code can be reused.

Simon - need any help with MDMA? :)

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/
Re: virtual host again [ In reply to ]
> I'm getting more and more frustrated trying to wedge stuff into
> a large program that was not well architected. I think
> we need to start pondering building our own framework....
> The more I look at the code, the more I realize that this
> seemed like an experiment in writing a UNIX program, rather than
> something real :( It's funny to see how the same thing is done in
> different ways (ie error_log is a FILE *, and xfer_log is a fd),
> come on...make up your mind :) I also love how the traditional
> mode 0666 is not used as the third argument to open. This
> means the process umask is not payed enough attention to, agh...
> Building the broken mode into a static variable, was well, kinda
> different...maybe a little learning about C was going on here
> too. :/

Not bad for a first try tho eh? ;)

> It's late, I'm very tired, and I've just had it with this code.
> You can add honey to shit, but you just get sweet tasting shit.
> No matter what you add to shit, you end up with some form of shit.
> I am not proud of the patches I need to do, but there is no clean
> easy was of integrating the junk.

Some time soon we'll need to talk a look at redesigning Apache
completely. It's been growing organically and while individual
new components are well designed they *are* bolted on to a
rather mixed up program that could benefit from a comb and cut.

Rob M's mentioned a couple of times already that he'd have done it
all differently, if he'd known then what he knows now. Unfortunately
a large-scale change to the structure of the basic server can't really
be done by a simple patch-review approach, it *really* needs a separate
initiative to design a generalised and useful structure which can
be made to accept each of the 'modules' Apache implements: logging,
content-neg, forking, multi-thread etc...

> Maybe I should not break my rule about waiting 24 hours to
> send a flame...nah...I'll probably regret this in the AM.
>
> Good night,

Sleep well.

> Cliff


Ay.
Re: virtual host again [ In reply to ]
> I'm getting more and more frustrated trying to wedge stuff into
> a large program that was not well architected. I think
> we need to start pondering building our own framework....
> The more I look at the code, the more I realize that this
> seemed like an experiment in writing a UNIX program, rather than
> something real :(

The original was both, in fact.

> It's funny to see how the same thing is done in
> different ways (ie error_log is a FILE *, and xfer_log is a fd),
> come on...make up your mind :)

That particular discrepancy was created by my patch -- I could not
conveniently fix error_log because it is opened and used by too
many different routines that assume a FILE pointer; in contrast,
xfer_log is only used in http_log. Yet another demonstration of
why software engineering concepts are important.

> I also love how the traditional
> mode 0666 is not used as the third argument to open. This
> means the process umask is not payed enough attention to, agh...

On purpose -- 0644 is desired (process umask be damned), and there
is nothing "traditional" about using 0666 as a third argument.
Yeah, sure, the xfer_mode should be a config file parameter,
but I didn't think it was important at the time.

> Building the broken mode into a static variable, was well, kinda
> different...maybe a little learning about C was going on here
> too. :/

A define would have made more sense, yes, but there is no define
in Perl. I was more concerned with the typing anyway.

> It's late, I'm very tired, and I've just had it with this code.
> You can add honey to shit, but you just get sweet tasting shit.
> No matter what you add to shit, you end up with some form of shit.
> I am not proud of the patches I need to do, but there is no clean
> easy was of integrating the junk.

Well, since nothing you mentioned above was in 1.3, you might as
well just eat shit this time.

......Roy
600 down, 1150 to go
Re: virtual host again [ In reply to ]
} > I also love how the traditional
} > mode 0666 is not used as the third argument to open. This
} > means the process umask is not payed enough attention to, agh...
}
} On purpose -- 0644 is desired (process umask be damned), and there
} is nothing "traditional" about using 0666 as a third argument.
} Yeah, sure, the xfer_mode should be a config file parameter,
} but I didn't think it was important at the time.

Sure it is traditional, in fact it is a define in BSD.

/usr/include/sys/stat.h:#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)


Agh, I don't think many will argue the architecture of 1.3. Don't
even bother to try.

Cliff