You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by pi...@apache.org on 2001/07/13 03:12:50 UTC

cvs commit: jakarta-tomcat-connectors/webapp/apache-1.3 mod_webapp.c

pier        01/07/12 18:12:49

  Modified:    webapp/apache-1.3 mod_webapp.c
  Log:
  Added a generic per-server callback for the WebApp Library to enable
  proper logging.
  Fixed port-number translation (Thanks to Thom Park at Borland for noticing)
  
  Revision  Changes    Path
  1.18      +19 -4     jakarta-tomcat-connectors/webapp/apache-1.3/mod_webapp.c
  
  Index: mod_webapp.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-1.3/mod_webapp.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- mod_webapp.c	2001/07/09 22:00:24	1.17
  +++ mod_webapp.c	2001/07/13 01:12:44	1.18
  @@ -57,7 +57,7 @@
   
   /**
    * @author  Pier Fumagalli <ma...@eng.sun.com>
  - * @version $Id: mod_webapp.c,v 1.17 2001/07/09 22:00:24 pier Exp $
  + * @version $Id: mod_webapp.c,v 1.18 2001/07/13 01:12:44 pier Exp $
    */
   
   #include <httpd.h>
  @@ -79,6 +79,8 @@
   static wa_boolean wam_initialized=FALSE;
   /* The list of configured connections */
   static wa_chain *wam_connections=NULL;
  +/* The main server using for logging error not related to requests */
  +static server_rec *server=NULL;
   
   /* ************************************************************************* */
   /* MODULE AND LIBRARY INITIALIZATION AND DESTRUCTION                         */
  @@ -87,6 +89,7 @@
   /* Startup the module and the WebApp Library */
   static void wam_startup(server_rec *s, pool *p) {
       if (!wam_initialized) return;
  +    server=s;
       wa_startup();
   }
   
  @@ -253,9 +256,21 @@
   };
   
   /* ************************************************************************* */
  -/* CALLBACKS FROM WEB SERVER                                                 */
  +/* CALLBACKS TO WEB SERVER                                                   */
   /* ************************************************************************* */
   
  +/* Log a generic error */
  +void wa_log(const char *f, const int l, const char *fmt, ...) {
  +    va_list ap;
  +    char buf[1024];
  +
  +    va_start(ap,fmt);
  +    apr_vsnprintf(buf,1024,fmt,ap);
  +    va_end(ap);
  +
  +    ap_log_error(f,l,APLOG_NOERRNO|APLOG_ERR,server,"%s",buf);
  +}
  +
   /* Log a message associated with a request */
   void wam_handler_log(wa_request *r, const char *f, const int l, char *msg) {
       request_rec *req=(request_rec *)r->data;
  @@ -424,8 +439,8 @@
       req->clnt->host=apr_pstrdup(req->pool,ctmp);
       req->serv->addr=apr_pstrdup(req->pool,con->local_ip);
       req->clnt->addr=apr_pstrdup(req->pool,con->remote_ip);
  -    req->serv->port=con->local_addr.sin_port;
  -    req->clnt->port=con->remote_addr.sin_port;
  +    req->serv->port=ntohs(con->local_addr.sin_port);
  +    req->clnt->port=ntohs(con->remote_addr.sin_port);
   
       /* Set up all other members of the request structure */
       req->meth=apr_pstrdup(req->pool,(char *)r->method);
  
  
  

Re: What if your message doesn't make to this list...

Posted by Christopher Cain <cc...@mhsoftware.com>.

Jon Stevens wrote:
> 
> on 7/13/01 12:57 PM, "Christopher Cain" <cc...@mhsoftware.com> wrote:
> 
> >
> > "Pier P. Fumagalli" wrote:
> >>
> >> I got pretty upset with a couple of guys whose messages along the lines of
> >> "fix my servlet", and who asked me WHY I rejected those posts...
> > [snip]
> >
> > I have a quick question, more out of idle curiosity than anything else.
> > I assume that only posts from non-subscribers are being moderated, yes?
> 
> Correct.
> 
> If Pier had to moderate every single email to the list, that would be messy.
> :-)
> 
> -jon

In more ways than one. I'm pretty sure that if Pier had to moderate ALL
dev posts, I'd probably be sending flowers to his parents by now. :-)

- Christopher

Re: What if your message doesn't make to this list...

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Jon Stevens at jon@latchkey.com wrote:

> on 7/13/01 12:57 PM, "Christopher Cain" <cc...@mhsoftware.com> wrote:
> 
>> 
>> "Pier P. Fumagalli" wrote:
>>> 
>>> I got pretty upset with a couple of guys whose messages along the lines of
>>> "fix my servlet", and who asked me WHY I rejected those posts...
>> [snip]
>> 
>> I have a quick question, more out of idle curiosity than anything else.
>> I assume that only posts from non-subscribers are being moderated, yes?
> 
> Correct.
> 
> If Pier had to moderate every single email to the list, that would be messy.
> :-)

Nope... Not correct... All posts are moderated until I don't explicitly
define that messages from a specified email address can bypass it...

After I approve a message from someone after 2/3 times, I usually add them
to the "bypass moderation" pile, but it doesn't happen automatically when
you subscribe...

    Pier


Re: What if your message doesn't make to this list...

Posted by Jon Stevens <jo...@latchkey.com>.
on 7/13/01 12:57 PM, "Christopher Cain" <cc...@mhsoftware.com> wrote:

> 
> "Pier P. Fumagalli" wrote:
>> 
>> I got pretty upset with a couple of guys whose messages along the lines of
>> "fix my servlet", and who asked me WHY I rejected those posts...
> [snip]
> 
> I have a quick question, more out of idle curiosity than anything else.
> I assume that only posts from non-subscribers are being moderated, yes?

Correct.

If Pier had to moderate every single email to the list, that would be messy.
:-)

-jon


Re: What if your message doesn't make to this list...

Posted by Christopher Cain <cc...@mhsoftware.com>.
"Pier P. Fumagalli" wrote:
> 
> I got pretty upset with a couple of guys whose messages along the lines of
> "fix my servlet", and who asked me WHY I rejected those posts...
[snip]

I have a quick question, more out of idle curiosity than anything else.
I assume that only posts from non-subscribers are being moderated, yes?
I am basing that assumption on the inevitable monthly posts from the
rocket scientist who cannot unsubscribe him/herself from the list.

Unless, of course, those too are moderated but allowed to pass because
it has become something of a tradition. I would actually miss the
entertainment at this point, as the "Village Idiot of the Month" parade
has been around for as long as I can remember. Plus, I get precious few
opportunities as it is to feel a little better about myself by
witnessing the bumblings of people even more hapless than me! =)

- Christopher

Re: What if your message doesn't make to this list...

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Jon Stevens at jon@latchkey.com wrote:

> on 7/13/01 8:57 AM, "Pier P. Fumagalli" <pi...@betaversion.org> wrote:
> 
>> I got pretty upset with a couple of guys whose messages along the lines of
>> "fix my servlet", and who asked me WHY I rejected those posts...
>> 
>> Now, let me explain... This mailing list is related to the CODE in Tomcat,
>> and its development and I will reject ANY post related to configuration
>> issues/servlet writing hints and so on, as they are OFF-TOPIC here...
>> 
>> If you have a problem related to Tomcat, and you're not absolutely sure that
>> it is, indeed, a bug in Tomcat, use the USERS mailing list.
>> 
>> If you have a problem related to generic servlet composition, help on
>> writing servlets and JSPs, go off to some other mailing list (such as the
>> servlet interest mailing list at java.sun.com).
>> 
>> And complaining doesn't help - at all.
>> 
>>   Pier
> 
> The funny thing is that those boneheads didn't bother to read:
> 
> <http://jakarta.apache.org/site/mail.html>
> 
> Pier, when I get moderation requests for messages, I now just auto include
> the following string (using the applescripts you gave me):
> 
> "Please post from the account that you subscribed with."
> 
> In most cases, I don't see the person re-post. This is because people are
> lazy and don't want to subscribe to a mailing list to ask their question.
> Fuck em.

I'm talking about real boneheads who subscribe and then post things like
"Please, fix my servlet since it doesn't work"... And after few months, I
got pretty tired :)

Fuck em.



Re: What if your message doesn't make to this list...

Posted by Jon Stevens <jo...@latchkey.com>.
on 7/13/01 8:57 AM, "Pier P. Fumagalli" <pi...@betaversion.org> wrote:

> I got pretty upset with a couple of guys whose messages along the lines of
> "fix my servlet", and who asked me WHY I rejected those posts...
> 
> Now, let me explain... This mailing list is related to the CODE in Tomcat,
> and its development and I will reject ANY post related to configuration
> issues/servlet writing hints and so on, as they are OFF-TOPIC here...
> 
> If you have a problem related to Tomcat, and you're not absolutely sure that
> it is, indeed, a bug in Tomcat, use the USERS mailing list.
> 
> If you have a problem related to generic servlet composition, help on
> writing servlets and JSPs, go off to some other mailing list (such as the
> servlet interest mailing list at java.sun.com).
> 
> And complaining doesn't help - at all.
> 
>   Pier

The funny thing is that those boneheads didn't bother to read:

<http://jakarta.apache.org/site/mail.html>

Pier, when I get moderation requests for messages, I now just auto include
the following string (using the applescripts you gave me):

"Please post from the account that you subscribed with."

In most cases, I don't see the person re-post. This is because people are
lazy and don't want to subscribe to a mailing list to ask their question.
Fuck em.

-jon


What if your message doesn't make to this list...

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
I got pretty upset with a couple of guys whose messages along the lines of
"fix my servlet", and who asked me WHY I rejected those posts...

Now, let me explain... This mailing list is related to the CODE in Tomcat,
and its development and I will reject ANY post related to configuration
issues/servlet writing hints and so on, as they are OFF-TOPIC here...

If you have a problem related to Tomcat, and you're not absolutely sure that
it is, indeed, a bug in Tomcat, use the USERS mailing list.

If you have a problem related to generic servlet composition, help on
writing servlets and JSPs, go off to some other mailing list (such as the
servlet interest mailing list at java.sun.com).

And complaining doesn't help - at all.

    Pier


RE: Mailing list delays?

Posted by Tomas Perez Garcia <to...@ua.es>.
No, it is normal

-----Mensaje original-----
De: Rob S. [mailto:rslifka@home.com]
Enviado el: viernes, 13 de julio de 2001 13:56
Para: tomcat-dev@jakarta.apache.org
Asunto: RE: Mailing list delays?


2-3 hours?  Try DAYS! =(

- r

> -----Original Message-----
> From: Pier P. Fumagalli [mailto:pier@betaversion.org]
> Sent: Thursday, July 12, 2001 10:22 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: Mailing list delays?
> 
> 
> Am I the only one receiving messages after 2/3 hours? (Darn!)
> 
>     Pier
> 
> 

Re: Mailing list delays?

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Alex Fernández at afm229@tid.es wrote:

> Hi Pier!
> 
> "Pier P. Fumagalli" wrote:
>> 
>> Rob S. at rslifka@home.com wrote:
>> 
>>> 2-3 hours?  Try DAYS! =(
>> 
>> A delay of DAYS might be because of moderation... I tend to approve/reject
>> messages on a daily basis, but the day before yesterday I forgot... Might
>> have took 2 days for messages in the approval queue to hit the list...
> 
> What moderation? I didn't know this list is moderated, or tomcat-user;
> there's no indication anywhere, no sign, no flashing light. Who are the
> moderators, BTW?

I am...

    Pier


Re: Mailing list delays?

Posted by Alex Fernández <af...@tid.es>.
Hi Pier!

"Pier P. Fumagalli" wrote:
> 
> Rob S. at rslifka@home.com wrote:
> 
> > 2-3 hours?  Try DAYS! =(
> 
> A delay of DAYS might be because of moderation... I tend to approve/reject
> messages on a daily basis, but the day before yesterday I forgot... Might
> have took 2 days for messages in the approval queue to hit the list...

What moderation? I didn't know this list is moderated, or tomcat-user;
there's no indication anywhere, no sign, no flashing light. Who are the
moderators, BTW?

Un saludo,

Alex.

Re: Mailing list delays?

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Rob S. at rslifka@home.com wrote:

> 2-3 hours?  Try DAYS! =(

A delay of DAYS might be because of moderation... I tend to approve/reject
messages on a daily basis, but the day before yesterday I forgot... Might
have took 2 days for messages in the approval queue to hit the list...

    Pier


RE: Mailing list delays?

Posted by "Rob S." <rs...@home.com>.
2-3 hours?  Try DAYS! =(

- r

> -----Original Message-----
> From: Pier P. Fumagalli [mailto:pier@betaversion.org]
> Sent: Thursday, July 12, 2001 10:22 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: Mailing list delays?
> 
> 
> Am I the only one receiving messages after 2/3 hours? (Darn!)
> 
>     Pier
> 
> 

Mailing list delays?

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Am I the only one receiving messages after 2/3 hours? (Darn!)

    Pier