httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/main http_connection.c http_core.c http_protocol.c
Date Fri, 06 Oct 2000 13:40:18 GMT
> >   +
> >   +        e->read(e, (const char **)&buff, &length, 0);
> >   +
> >   +        pos = buff + 1;
> >   +        while (pos < buff + length) {
> >   +            if ((*pos == ASCII_LF) && (*(pos - 1) == ASCII_CR)) {
> >   +                *(pos - 1) = ASCII_LF;
> >   +                *pos = '\0';
> 
> euh... this doesn't look right. We shouldn't be modifying a bucket's
> internal contents like this. I understand this is your first draft, but how
> will you be fixing this part?

This fine to do, because this filter will always be just above the core
input filter, and we know that the core used a pool to allocate the
data.  This does work, the only way this won't work, is if we add another
filter between the two, and the solution is to just check the bucket type,
and call setaside if necessary.

> Separate question: I don't understand why we aren't we doing this conversion
> as we read the headers into the headers_in table (??)

We do this, because this is how the core expects the data.  If there is a
\r\n, the core gets very confused, and it stops working.  The problem is
that not all headers are put into the headers_in table, and Unix and
Windows differ in the data they send.

Ryan


Mime
View raw message