[AOLSERVER] Question about extending AOLserver in C

2001-08-29 Thread Michael Roberts

So I'm studying set.c and tclset.c, because the ns_set is probably the extension
I use the most and I figure it's Done Right -- but I can't for the life of me
see how the connection-local interpreter knows to call Ns_TclFreeSet.  Where is
the proper cleanup function assigned to the interpreter?  I'm so confused

Michael



Re: [AOLSERVER] AOLSERVER Digest - 22 Aug 2001 to 23 Aug 2001 (#2001-215)

2001-08-29 Thread JamesRidge

In a message dated 8/24/01 12:01:16 AM Eastern Daylight Time,
[EMAIL PROTECTED] writes:


 Fw: AOLserver 3.0 AOLserver 3.0 vulnerability

The 3.0 vulnerability refers to a buffer overflow error that can be the focus
of a DOS attack. The error occurs while parsing the authorization header; the
buffer is created on the stack in ParseAuth() and is potentially overflowed
in Ns_HtuuDecode(). This was reported and patched (thanks to Adam Zell!) for
the 3.4pre1 release.

Jay Ridgeway
AOL Local Technologies



[AOLSERVER] How to know the language from a user?

2001-08-29 Thread Toni Vila

Hi all,

Some knows how to know the language from a user, when this user go to your
main page http://www.?.com for first time?. Without any cookie or
user_id.

I guess there are to possibilities, from the user_IP and then nslookup, or
from the browser_language. I guess is better the second option. Does one
tcl function exist to execute from a index.tcl file to get this kind of
information?

I'm running aolserver3.1+ad8+nsvhr, with ACS 3.4 on suse Linux.

Thank you in advance and best regards,

Antoni Vila



[AOLSERVER] SOAP

2001-08-29 Thread Wojciech Kocjan

Hello.

Some time ago, someone (yes, I have a bd memory :) mentioned about
porting tclsoap to AOLserver. Where can I read about it, join the
project or something?

I don't want to double the code/efforts, but I'd like to use
client-server architecture for managing users/articles/that stuff on the
server. It's a bit of a mess to do it via the browser, but a lot easier
with client-server.

Thanks for your help :)

--
WK



[AOLSERVER] Logging: reverse dns lookups and file access permissions

2001-08-29 Thread Jerry Asher

I have a patch at http://www.theashergroup.
com/download, ns_log_modes, that modifies nsd/log.c to examine a
new config.tcl parameter

  ns_section ns/parameters
  ns_param   serverlogmode 0664

nsd/log.c will open the server log and then change its mode to
serverlogmode.  Serverlogmode defaults to 0644.

Also, the access log has a similar change:

  ns_section ns/server/yourserver/module/nslog
  ns_param accessmode  0664
  ns_param iplookups   true

nslog/nslog.c will open the access log and then change its mode to
accessmode.  Accessmode also defaults to 0644.

I find that opening logs to different modes is useful for ISPs or
corporate installations of AOLserver, in which different users, at
different times, may need to start/stop AOLserver, and/or delete the
log files.

I also added a new parameter, iplookups that defaults to off.  If set
to on, then the access log will perform Reverse DNS Lookups for you.
The usual caveat applies, that this can slow down overall AOLserver
performance.

=
Jerry Asher   [EMAIL PROTECTED]
1678 Shattuck Avenue Suite 161Tel: (510) 549-2980
Berkeley, CA 94709Fax: (877) 311-8688



[AOLSERVER] member site charging

2001-08-29 Thread Patrick Spence

Those of you who were interested in my experiences with setting up ccBill
to handle credit card charging for a member based site with Aolserver
please email be offlist at [EMAIL PROTECTED] as I am in the process of
writing up my description of what I did, and collecting all the resources
in one location.. this way I can give those interested a full description
of what I did and how I got it to work...


Enjoy...

Patrick



[AOLSERVER] patch for html 4.0, use semicolons and not ampersands in uris

2001-08-29 Thread Jerry Asher

I have created a patch, semicolons.in.uris for AOLserver at
http://www.theashergroup.com/download (it's also available from sourceforge)
to support HTML4.0 specification Appendix B.2.2, regarding
special characters in URL attribute values, specifically using a
semicolon, ';', in a URI instead of an ampersand, ''.


With this patch, AOLserver will take a URI that uses semicolons and
not ampersands and correctly parse the URI into form variables and
their values.

http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.2.2

quote

B.2.2 Ampersands in URI attribute values

The URI that is constructed when a form is submitted may be used as an
anchor-style link (e.g., the href attribute for the A
element). Unfortunately, the use of the  character to separate form
fields interacts with its use in SGML attribute values to delimit
character entity references. For example, to use the URI
http://host/?x=1y=2; as a linking URI, it must be written A
href=http://host/?x=1#38;y=2; or A
href=http://host/?x=1amp;y=2;.

We recommend that HTTP server implementors, and in particular, CGI
implementors support the use of ; in place of  to save authors
the trouble of escaping  characters in this manner.

/quote

This patch adds a config.tcl parameter

 ns_section ns/server/yourserver
 ns_param semicolonqueryseparator yes



The default value is no, or not examining URI's for semicolons.

nsd/nsconf.c - read ns_param semicolonseparator for ns_querytoset

nsd/nsconf.h - define CONN_SEMICOLON_SEP_BOOL for ns_querytoset
nsd/nsd.h - added semicolonseparator to struct conn in struct _nsconf
for ns_querytoset
nsd/conn.c - NS_QueryToSet - modified to examine semicolons inside of
a request


=
Jerry Asher   [EMAIL PROTECTED]
1678 Shattuck Avenue Suite 161Tel: (510) 549-2980
Berkeley, CA 94709Fax: (877) 311-8688



[AOLSERVER] patch to dump arbitary hex/ascii to server log

2001-08-29 Thread Jerry Asher

I have a patch, ns_logdump, at http://www.theashergroup.com/download/, that
adds a Tcl and C API to AOLserver to dump arbitrary hex/ascii strings into
the log file.  It's also available at sourceforge.

Dump a string in hex and ascii to the log.  Available from C or Tcl.
Useful in debugging new protocols

Add a C API and Tcl API for dumping HEX to the log.

void Ns_LogDumpString(Ns_LogSeverity severity, char *s,  int len)

   and

ns_logdump severity string

Severity is a standard ns_log severity constant, Notice, Warning,
Error, Debug, or Dev.

The output in the log file looks like:

: 4164 6420 6120 4320 4150 4920 616e 6420  Add a C API and
0010: 5463 6c20 4150 4920 666f 7220 6475 6d70  Tcl API for dump
0020: 696e 6720 4845 5820 746f 2074 6865 206c  ing HEX to the l
0030: 6f67 2e0a 0a76 6f69 6420 4e73 5f4c 6f67  og...void Ns_Log
0040: 4475 6d70 5374 7269 6e67 284e 735f 4c6f  DumpString(Ns_Lo

The length of a line is controlled by a tcl config parameter,
dumpbytesperline, that defaults to 32.

   ns_section  ns/parameters
   ns_paramdumpbytesperline   32

This patch modifies: nsd/log.c, nsd/nsconf.c, nsd/nsconf.h, nsd/nsd.h,
nsd/tclcmds.c.

I have found this useful in hooking the ACS up to new services
(Tellme, Voxeo, SOAP), or when trying to determine how to ns_httpget
binaries.

=
Jerry Asher   [EMAIL PROTECTED]
1678 Shattuck Avenue Suite 161Tel: (510) 549-2980
Berkeley, CA 94709Fax: (877) 311-8688



[AOLSERVER] Question about form handling on POSTS

2001-08-29 Thread Rusty Brooks


Hello,

I recently noticed that ns_conn form will return the query args from a
POST or the URL args on a GET, but in the case of a POST, will not return
both.

For example, if my action=test_form.adp?arg1=val1 arg1 will not be present
in [ns_conn form].

I have made a page which illustrates this and describes it in further
depth.  Could someone take a look and see what they think?  Does the HTTP
spec have anything to say about this? (i.e. is it not kosher to put query
args in a form's action?)

I've attached the .adp if you'd like to look it over.

Or, for minimal fuss, you can check it out at:
http://www.rustybrooks.org/test/test_form.adp

to view the ADP source, look at
http://www.rustybrooks.org/source/test/test_form.adp

--
Rusty Brooks : http://www.rustybrooks.org/
Spewing wisdom from every orifice
--



This ADP page shows a possible deficit in AOLServer's form handling.  Most notably,
ns_conn form returns the query args on the URL line (in the case of a GET) iOR/i
the query args that were posted, in the case of a POST.  To me, it seems like in the
case of a POST, you'd want to gather query args from both places, in cases like this 
one,
where you are posting to a URL while passing query args.  This is especially valuable 
in
cases like this one, where the user might pass in a form initially via the URL, and 
wish
for it to keep propagating when he presses submit.  In this case, I think both arg1 
and arg2
should have values when posted.  It's not entirely clear what should happen when a 
variable exists
in both the posted values and the command line, but this should probably not be 
treated any
differently than when two variables of the same name are posted (as in the case of 
multiple-select
boxes)

pPlease forward any comments to a 
href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a or leave a 
comment at the bottom of this page.

p
Values returned by ns_conn form
pre
%
set r [ns_conn form]
for { set a 0 } { $a  [ns_set size $r] } { incr a } {
ns_puts [ns_set key $r $a] == [ns_set value $r $a]br
}
%
/pre

form method=post action=test_form.adp?arg1=val1

Value for arg1: input name=arg2 type=text value=val2 size=10
p
input value=Go Here to test POST type=submit
p
a href=test_form.adp?arg1=val1Go here to test GET/a
/form




[AOLSERVER] TEST --- IGNORE

2001-08-29 Thread Mike Wren

Test



[AOLSERVER] It's working AOLSERVER-LIST ?

2001-08-29 Thread Ariel E. CarnĂ¡

...because I don't receive any message since Ago.23.

Ariel.



[AOLSERVER] [ aolserver-Bugs-455156 ] segfault in nsperm

2001-08-29 Thread Ms. Source Forge

Bugs item #455156, was opened at 2001-08-24 17:26
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=455156group_id=3152

Category: Modules: nsperm (Permissions)
Group: aolserver3_4
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Rogers (dvrsn)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in nsperm

Initial Comment:
If the configuration parameter SkipLocks is on (the
default) then calling ns_perm checkpass user pass
with a user that exists (regardless of whether the
password is correct or not) will segfault the server.

The reason is quite simple: the mutex in the users
TclHashTable is not initialized if skiplocks is set,
but UserAuthProc does not check if skiplocks is set
before attempting to lock the mutex.  Checking
skiplocks before attempting to manipulate the mutex (as
its done nearly everywhere else in the code) fixes the
segfault.

SetPassCmd is similarly broken, but it should probably
not be allowed at all if skiplocks is set.

Also, Ns_MutexLock and Ns_LockMutex are both used
(similarly for Unlock); it seems that the first should
be preferres as LockMutex is from the 2.x compatability
code.

These reasons are likely partly behind the complete
rewrite of nsperm for 4.x, but that has not yet been
released and people running 3.4 or earlier may want to
know about this problem.


--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=455156group_id=3152



[AOLSERVER] [ aolserver-Bugs-455657 ] ns_db verbose works on handle not pool

2001-08-29 Thread Ms. Source Forge

Bugs item #455657, was opened at 2001-08-26 20:38
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=455657group_id=3152

Category: Architecture: Server (nsd)
Group: aolserver3_3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_db verbose works on handle not pool

Initial Comment:
The ns_db verbose command operates on a db handle.  It
doesn't operate on the db pool as the documentation
describes.  It would be good to have a command that
did operate on a db pool in its entirety.

--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=455657group_id=3152



[AOLSERVER] [ aolserver-Bugs-455777 ] ns_server urlstats is not documented

2001-08-29 Thread Ms. Source Forge

Bugs item #455777, was opened at 2001-08-27 07:34
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=455777group_id=3152

Category: Other: Documentation
Group: aolserver3_4
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_server urlstats is not documented

Initial Comment:
http://www.aolserver.com/docs/tcldev/tapi-
119.htm#193657 doesn't mention ns_server urlstats.

--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=455777group_id=3152



[AOLSERVER] [ aolserver-Bugs-449744 ] conn driver freeproc never called

2001-08-29 Thread Ms. Source Forge

Bugs item #449744, was opened at 2001-08-10 02:02
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=449744group_id=3152

Category: Architecture: Server (nsd)
Group: None
Status: Open
Resolution: None
Priority: 7
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: conn driver freeproc never called

Initial Comment:
Communications drivers can have an Ns_ConnFreeProc.

Although it is not quite clear what this procedure
does, the legacy nsunix code choose to use it to free
various buffers, specifically, the conn input buffer.

But no one ever calls these freeing procedures.

My suggestion: define a routine similar to
conn.c/Ns_ConnClose (called Ns_ConnFree...) that calls
connPtr-drvPtr-freeProc (if it's not null).

Where to call it though?  I am not certain.

I chose to call it in in serv.c/ConnRun, as the second
to last statement, right after NsRunCleanups and right
before the dstring is freed.

Is this the right place?

--

Comment By: Jerry Asher (jerryasher)
Date: 2001-08-27 08:20

Message:
Logged In: YES
user_id=20647

This patch contains fixes for four bugs:

1.  Memory leak by any communication driver that implements
a driver
free proc: the bug is that this freeproc is never
called within
AOLserver.

Create conn.c/Ns_ConnFree to provide a connection a way
to call
the driver free proc (supported in registration of a
driver, but
never called within AOLserver.)

Call Ns_ConnFree in serv.c/ConnRun at end of
connection.  Also
call Ns_ConnFree within drv.c whenever there is a
problem queueing
connection.

Declare Ns_ConnFree within ns.h

2.  in nsd/drv.c/RunDriver, there are three bugs present in
which well
defined functions are called with the wrong
structures.  (Or
called before the structures have been initialized.)
Call it the
curse of casting, right?  No compiler warnings as the
*wrong*
structures are correctly cast into the right types.

To see this, the best way is to compare how similar
routines are
called or defined by the nssock driver.

Claim 1: In the excerpt
dPtr = arg;
dData = dPtr-drvData;
if (dPtr-locationProc != NULL) {
loc = (*dPtr-locationProc)(dData);
 . . .
while ((status = ((*dPtr-acceptProc)(dData, cData)))
== NS_OK) {

A locationProc is supposed to take a connection structure,
if so, then
locationProc is being called before the accept, and so the
connection
data (presumably dData) has not yet been initialized.
(I'll make the
claim that dData is not necessarily the connection
structure that
locationproc needs, but regardless of whether it is or
isn't, it's not
fair to ask locationproc to crawl down the connection
structure before
the connection has been accepted.)

Here is how ns.h defines the locationProc:
typedef char   *(Ns_ConnLocationProc) (void *pConnCtx);

And for comparison, here is how nssock.cpp implements it's
location
proc (this is comparison only, note that drv.c doesn't
actually call
into nssock/SockLocation since nssock supplies it's own
thread).

static char *
SockLocation(void *arg)
{
Conn   *connPtr = arg;

This affects drivers that use the drv.c/RunDriver, which
nssock
doesn't (and nsunix does.)  (Near as I can tell, nsunix is
the only
user of this routine in what used to be core AOLserver,
does anyone
else use drv.c/RunDriver?)

The fix for this is to not call locationProc at this
moment -- it's use is
only to generate a log message.


Claim 2.  In the excerpt:

while ((status = ((*dPtr-acceptProc)(dData, cData)))
== NS_OK) {
if (Ns_QueueConn(dData, cData) != NS_OK) {
   (*dPtr-closeProc)(dData);
}
}

Ns_QueueConn has been called with the wrong parameters.  It
should be called as:
if (Ns_QueueConn(dPtr, cData) != NS_OK) {

in nsd/serv.c we can see how Ns_QueueConn is defined:

int
Ns_QueueConn(void *drvPtr, void *drvData)

The first argument is a pointer to a driver, the second
argument is a
handle to a driver specific data structure (each driver
family sticks
different things in there.)

Claim 3.  In the same excerpt, closeProc should be called
with cData
and not dData.



--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=449744group_id=3152



[AOLSERVER] [ aolserver-Patches-456225 ] ns_logdump command

2001-08-29 Thread Ms. Source Forge

Patches item #456225, was opened at 2001-08-28 11:08
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=303152aid=456225group_id=3152

Category: aolserver3_3
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_logdump command

Initial Comment:
Dump a string in hex and ascii to the log. Available
from C or Tcl. Useful in debugging new protocols


Add a C API and Tcl API for dumping HEX to the log.

void Ns_LogDumpString(Ns_LogSeverity severity, char
*s,  int len)

and
ns_logdump severity string

Severity is a standard ns_log severity constant,
Notice, Warning, Error, Debug, or Dev.

The output in the log file looks like:

: 4164 6420 6120 4320 4150 4920 616e 6420  Add a C
API and
0010: 5463 6c20 4150 4920 666f 7220 6475 6d70  Tcl API
for dump
0020: 696e 6720 4845 5820 746f 2074 6865 206c  ing HEX
to the l
0030: 6f67 2e0a 0a76 6f69 6420 4e73 5f4c 6f67
og...void Ns_Log
0040: 4475 6d70 5374 7269 6e67 284e 735f 4c6f
DumpString(Ns_Lo

The length of a line is controlled by a tcl config
parameter, dumpbytesperline, that defaults to 32.
  ns_section  ns/parameters
  ns_paramdumpbytesperline   32

This patch modifies: nsd/log.c, nsd/nsconf.c,
nsd/nsconf.h, nsd/nsd.h, nsd/tclcmds.c.

--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=303152aid=456225group_id=3152



[AOLSERVER] [ aolserver-Patches-456225 ] ns_logdump command

2001-08-29 Thread Ms. Source Forge

Patches item #456225, was opened at 2001-08-28 11:08
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=303152aid=456225group_id=3152

Category: aolserver3_3
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_logdump command

Initial Comment:
Dump a string in hex and ascii to the log. Available
from C or Tcl. Useful in debugging new protocols


Add a C API and Tcl API for dumping HEX to the log.

void Ns_LogDumpString(Ns_LogSeverity severity, char
*s,  int len)

and
ns_logdump severity string

Severity is a standard ns_log severity constant,
Notice, Warning, Error, Debug, or Dev.

The output in the log file looks like:

: 4164 6420 6120 4320 4150 4920 616e 6420  Add a C
API and
0010: 5463 6c20 4150 4920 666f 7220 6475 6d70  Tcl API
for dump
0020: 696e 6720 4845 5820 746f 2074 6865 206c  ing HEX
to the l
0030: 6f67 2e0a 0a76 6f69 6420 4e73 5f4c 6f67
og...void Ns_Log
0040: 4475 6d70 5374 7269 6e67 284e 735f 4c6f
DumpString(Ns_Lo

The length of a line is controlled by a tcl config
parameter, dumpbytesperline, that defaults to 32.
  ns_section  ns/parameters
  ns_paramdumpbytesperline   32

This patch modifies: nsd/log.c, nsd/nsconf.c,
nsd/nsconf.h, nsd/nsd.h, nsd/tclcmds.c.

--

Comment By: Jerry Asher (jerryasher)
Date: 2001-08-28 11:09

Message:
Logged In: YES
user_id=20647

Uh, the actual format looks a lot better than what
sourceforge did to my prior comment.  Looks good actually!

--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=303152aid=456225group_id=3152



[AOLSERVER] [ aolserver-Bugs-455657 ] ns_db verbose works on handle not pool

2001-08-29 Thread Ms. Source Forge

Bugs item #455657, was opened at 2001-08-26 20:38
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=455657group_id=3152

Category: Architecture: Server (nsd)
Group: aolserver3_3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_db verbose works on handle not pool

Initial Comment:
The ns_db verbose command operates on a db handle.  It
doesn't operate on the db pool as the documentation
describes.  It would be good to have a command that
did operate on a db pool in its entirety.

--

Comment By: Jerry Asher (jerryasher)
Date: 2001-08-27 01:31

Message:
Logged In: YES
user_id=20647

I've attached a patch that creates an ns_poolverbosity
command.

ns_poolverbosity ?poolname ?on | ?off

It also modifiles nsd/dbinit.c/LogSql to check on the pool
fverbose when deciding whether or not to log the sql.

--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=455657group_id=3152



[AOLSERVER] [ aolserver-Patches-456225 ] ns_logdump command

2001-08-29 Thread Ms. Source Forge

Patches item #456225, was opened at 2001-08-28 11:08
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=303152aid=456225group_id=3152

Category: aolserver3_3
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_logdump command

Initial Comment:
Dump a string in hex and ascii to the log. Available
from C or Tcl. Useful in debugging new protocols


Add a C API and Tcl API for dumping HEX to the log.

void Ns_LogDumpString(Ns_LogSeverity severity, char
*s,  int len)

and
ns_logdump severity string

Severity is a standard ns_log severity constant,
Notice, Warning, Error, Debug, or Dev.

The output in the log file looks like:

: 4164 6420 6120 4320 4150 4920 616e 6420  Add a C
API and
0010: 5463 6c20 4150 4920 666f 7220 6475 6d70  Tcl API
for dump
0020: 696e 6720 4845 5820 746f 2074 6865 206c  ing HEX
to the l
0030: 6f67 2e0a 0a76 6f69 6420 4e73 5f4c 6f67
og...void Ns_Log
0040: 4475 6d70 5374 7269 6e67 284e 735f 4c6f
DumpString(Ns_Lo

The length of a line is controlled by a tcl config
parameter, dumpbytesperline, that defaults to 32.
  ns_section  ns/parameters
  ns_paramdumpbytesperline   32

This patch modifies: nsd/log.c, nsd/nsconf.c,
nsd/nsconf.h, nsd/nsd.h, nsd/tclcmds.c.

--

Comment By: Jerry Asher (jerryasher)
Date: 2001-08-28 12:39

Message:
Logged In: YES
user_id=20647

Use the second patch, not the first.  The first patch
doesn't declare Ns_LogDumpString within include/ns.h.  (Nb:
I tried deleting the patch, but sourceforge would not let
me.)

--

Comment By: Jerry Asher (jerryasher)
Date: 2001-08-28 11:09

Message:
Logged In: YES
user_id=20647

Uh, the actual format looks a lot better than what
sourceforge did to my prior comment.  Looks good actually!

--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=303152aid=456225group_id=3152



[AOLSERVER] [ aolserver-Bugs-449744 ] conn driver freeproc never called

2001-08-29 Thread Ms. Source Forge

Bugs item #449744, was opened at 2001-08-10 02:02
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=449744group_id=3152

Category: Architecture: Server (nsd)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: conn driver freeproc never called

Initial Comment:
Communications drivers can have an Ns_ConnFreeProc.

Although it is not quite clear what this procedure
does, the legacy nsunix code choose to use it to free
various buffers, specifically, the conn input buffer.

But no one ever calls these freeing procedures.

My suggestion: define a routine similar to
conn.c/Ns_ConnClose (called Ns_ConnFree...) that calls
connPtr-drvPtr-freeProc (if it's not null).

Where to call it though?  I am not certain.

I chose to call it in in serv.c/ConnRun, as the second
to last statement, right after NsRunCleanups and right
before the dstring is freed.

Is this the right place?

--

Comment By: Jerry Asher (jerryasher)
Date: 2001-08-27 08:20

Message:
Logged In: YES
user_id=20647

This patch contains fixes for four bugs:

1.  Memory leak by any communication driver that implements
a driver
free proc: the bug is that this freeproc is never
called within
AOLserver.

Create conn.c/Ns_ConnFree to provide a connection a way
to call
the driver free proc (supported in registration of a
driver, but
never called within AOLserver.)

Call Ns_ConnFree in serv.c/ConnRun at end of
connection.  Also
call Ns_ConnFree within drv.c whenever there is a
problem queueing
connection.

Declare Ns_ConnFree within ns.h

2.  in nsd/drv.c/RunDriver, there are three bugs present in
which well
defined functions are called with the wrong
structures.  (Or
called before the structures have been initialized.)
Call it the
curse of casting, right?  No compiler warnings as the
*wrong*
structures are correctly cast into the right types.

To see this, the best way is to compare how similar
routines are
called or defined by the nssock driver.

Claim 1: In the excerpt
dPtr = arg;
dData = dPtr-drvData;
if (dPtr-locationProc != NULL) {
loc = (*dPtr-locationProc)(dData);
 . . .
while ((status = ((*dPtr-acceptProc)(dData, cData)))
== NS_OK) {

A locationProc is supposed to take a connection structure,
if so, then
locationProc is being called before the accept, and so the
connection
data (presumably dData) has not yet been initialized.
(I'll make the
claim that dData is not necessarily the connection
structure that
locationproc needs, but regardless of whether it is or
isn't, it's not
fair to ask locationproc to crawl down the connection
structure before
the connection has been accepted.)

Here is how ns.h defines the locationProc:
typedef char   *(Ns_ConnLocationProc) (void *pConnCtx);

And for comparison, here is how nssock.cpp implements it's
location
proc (this is comparison only, note that drv.c doesn't
actually call
into nssock/SockLocation since nssock supplies it's own
thread).

static char *
SockLocation(void *arg)
{
Conn   *connPtr = arg;

This affects drivers that use the drv.c/RunDriver, which
nssock
doesn't (and nsunix does.)  (Near as I can tell, nsunix is
the only
user of this routine in what used to be core AOLserver,
does anyone
else use drv.c/RunDriver?)

The fix for this is to not call locationProc at this
moment -- it's use is
only to generate a log message.


Claim 2.  In the excerpt:

while ((status = ((*dPtr-acceptProc)(dData, cData)))
== NS_OK) {
if (Ns_QueueConn(dData, cData) != NS_OK) {
   (*dPtr-closeProc)(dData);
}
}

Ns_QueueConn has been called with the wrong parameters.  It
should be called as:
if (Ns_QueueConn(dPtr, cData) != NS_OK) {

in nsd/serv.c we can see how Ns_QueueConn is defined:

int
Ns_QueueConn(void *drvPtr, void *drvData)

The first argument is a pointer to a driver, the second
argument is a
handle to a driver specific data structure (each driver
family sticks
different things in there.)

Claim 3.  In the same excerpt, closeProc should be called
with cData
and not dData.



--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=103152aid=449744group_id=3152



[AOLSERVER] [ aolserver-Patches-456052 ] support html4 b.2.2, semicolons in uris

2001-08-29 Thread Ms. Source Forge

Patches item #456052, was opened at 2001-08-28 00:56
You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=303152aid=456052group_id=3152

Category: aolserver3_3
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: support html4 b.2.2, semicolons in uris

Initial Comment:
Patch to support HTML4.0 specification Appendix B.2.2,
regarding special characters in URL attribute values,
specifically using a semicolon, ';', in a URI instead
of an ampersand, ''.

With this patch, AOLserver will take a URI that uses
semicolons and not ampersands and correctly parse the
URI into form variables and their values.

quote
http://www.w3.org/TR/REC-html40/appendix/notes.html#h-
B.2.2

B.2.2 Ampersands in URI attribute values

The URI that is constructed when a form is submitted
may be used as an anchor-style link (e.g., the href
attribute for the A element). Unfortunately, the use
of the  character to separate form fields interacts
with its use in SGML attribute values to delimit
character entity references. For example, to use the
URI http://host/?x=1y=2; as a linking URI, it must
be written A href=http://host/?x=1#38;y=2; or A
href=http://host/?x=1amp;y=2;.

We recommend that HTTP server implementors, and in
particular, CGI implementors support the use of ; in
place of  to save authors the trouble of
escaping  characters in this manner.
/quote


This patch adds a config.tcl parameter
ns_section ns/server/yourserver
ns_param semicolonqueryseparator yes

The default value is no, or not examining URI's for
semicolons.

nsd/nsconf.c - read ns_param semicolonseparator for
ns_querytoset

nsd/nsconf.h - define CONN_SEMICOLON_SEP_BOOL for
ns_querytoset

nsd/nsd.h - added semicolonseparator to struct conn in
struct _nsconf for ns_querytoset

nsd/conn.c - NS_QueryToSet - modified to examine
semicolons inside of a request


--

You can respond by visiting:
http://sourceforge.net/tracker/?func=detailatid=303152aid=456052group_id=3152



Re: [AOLSERVER] /NS/Admin forms for 3.x

2001-08-29 Thread Patrick Spence

Daniel Stasinski did a package..  you can find it at www.scriptkitties.com

Its well worth the moments it takes to download and install

--
  Patrick Spence [EMAIL PROTECTED]
  Want weather reports delevered to your desktop?
http://ww2.weatherbug.com/aff/default.asp?ZCode=z3345
- Original Message -
From: James Ranson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 24, 2001 3:39 PM
Subject: [AOLSERVER] /NS/Admin forms for 3.x


 We recently had a new Web Server setup and the Webhost installed AOLServer
 3.2, which does not include the NS/Admin forms (I'm a die-hard 2.3.3
user). I
 recall reading somewhere that a third-party had developed a utility that
 could accomplish much of what the NS/Admin forms did. Anyone know where I
 could get a copy of this?



[AOLSERVER] AOLserver mailing list suspended and now freed

2001-08-29 Thread Kriston Rehberg

The AOLserver mailing list was suspended for a few days due to excessive
postings--the threshold of 50 messages per day was reached.  I have freed
the list.  Thanks to Jerry Asher for pinging me about this.

Kris



Re: [AOLSERVER] member site charging

2001-08-29 Thread Mike Hoegeman

Patrick Spence wrote:

 Those of you who were interested in my experiences with setting up ccBill
 to handle credit card charging for a member based site with Aolserver
 please email be offlist at [EMAIL PROTECTED] as I am in the process of
 writing up my description of what I did, and collecting all the resources
 in one location.. this way I can give those interested a full description
 of what I did and how I got it to work...

 Enjoy...

 Patrick

i'd be interested in your experiences. please send me whatever
info you distribute. thanks..

-mike hoegeman, [EMAIL PROTECTED]



Re: [AOLSERVER] Question about extending AOLserver in C

2001-08-29 Thread Rob Mayoff

+-- On Aug 23, Michael Roberts said:
 So I'm studying set.c and tclset.c, because the ns_set is probably the
 extension I use the most and I figure it's Done Right -- but I can't
 for the life of me see how the connection-local interpreter knows to
 call Ns_TclFreeSet. Where is the proper cleanup function assigned to
 the interpreter? I'm so confused

If you execute ns_set free $setid, then NsTclSetCmd will call
Ns_TclFreeSet.

Sets that you don't delete this way will be deleted at interpreter
cleanup time by FreeSets.