Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Member List

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


randy at zyzzyva

Mar 12, 1995, 1:19 PM

Post #1 of 5 (139 views)
Permalink
Member List

I would like to build a member list in the Apache page. Is there
a current list of contributing members? Please edit the following
information and mail to httpd-member [at] zyzzyva I may try to
automate this more as time permits.


<B>Name(s):</B> <A NAME="yourname">yourname</A><BR>
<B>email:</B> your_email_address<BR>
<B>URL:</B> <A HREF="your_home_page_URL"> your_home_page_URL<BR></A>
<B>Company:</B> your_company<BR>
<B>Occupation:</B> your_occupation<BR>
<B>Location:</B> your_location<BR>
<B>Comments:</B> any_comments_you_want_to_add<BR>


rst at ai

Mar 14, 1995, 9:37 AM

Post #2 of 5 (136 views)
Permalink
Re: Member List [In reply to]

Randy --- I looked your form over, and found what may be part of
the problem. The cgi-postin.c code that you're using expects to
be able to get the entire request body out of the socket in one
C-library read call ---

/*
* Create space to hold the raw data and load it in.
*/
if ((buf = (char *)malloc(len+1)) == NULL)
die(0, "cannot allocate space for buffer");
if ((i = read(STDIN_FILENO, buf, len)) < 0)
die(errno, "error reading form data");
if (i != len)
die(0, "error reading form data [expected %d chars, got %d]", le
n, i);

Note that with the NCSA server, this read() always reads the
socket directly, and reads on a socket (or a pipe, for that matter)
are not guaranteed to yield the number of bytes requested, even if
that many bytes will ultimately be made available. Typically, you
only get as many as the kernel has buffered up, which may be less.

It's also *possible* that there's server trouble here --- the errors
you're seeing are consistent with HTTP request body data disappearing
into a buffer. However, if this is a problem with drtr's getline()
code, it's a subtle and system-dependant one --- I tested POST here
with drtr's code before releasing apache-pre, and it worked fine.

rst


rst at ai

Mar 14, 1995, 10:15 AM

Post #3 of 5 (135 views)
Permalink
Re: Member List [In reply to]

FWIW, I rewrote randy's script in Perl. The new version works when I try
it from the shell, but I can't test it for real since hyperreal's www
server seems to be down. (The error_log says it caught a SIGTERM at
4:29 AM, which is the last time anything showed up in the access_log).

Sigh...

rst


rst at ai

Mar 14, 1995, 10:24 AM

Post #4 of 5 (138 views)
Permalink
Re: Member List [In reply to]

(On second thought...) my version is in cgi-bin as add_member_new until
I can try it for real. add_member is still randy's script.

rst


drtr at ast

Mar 14, 1995, 2:54 PM

Post #5 of 5 (132 views)
Permalink
Re: Member List [In reply to]

rst wrote:
>Randy --- I looked your form over, and found what may be part of
>the problem. The cgi-postin.c code that you're using expects to
>be able to get the entire request body out of the socket in one
>C-library read call ---
>...
This is correct. You are only likely to read as much data as you requested
if you are reading from a regular file, otherwise you will only get as much
as is available. In this case, you will probably get the remainder of the
first packet after the headers have been removed.

Moral: use fread(), not read().

David.

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.