/[Apache-SVN]/httpd/httpd/branches/2.2.x/server/protocol.c
ViewVC logotype

Log of /httpd/httpd/branches/2.2.x/server/protocol.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 733759 - (view) (annotate) - [select for diffs]
Modified Mon Jan 12 14:03:38 2009 UTC (10 months, 1 week ago) by jim
File length: 56590 byte(s)
Diff to previous 603732 (colored)
Merge r732832, r733134, r733218 from trunk:

Translate locally generated "100-Continue" message to
ASCII on EBCDIC systems.


EBCDIC fix for ap_send_interim_response()



simplifications per niq's review comments

Submitted by: covener
Reviewed/backported by: jim

Revision 603732 - (view) (annotate) - [select for diffs]
Modified Wed Dec 12 20:43:04 2007 UTC (23 months, 2 weeks ago) by niq
File length: 56445 byte(s)
Diff to previous 602536 (colored)
Backport r602735 and r602735

Revision 602536 - (view) (annotate) - [select for diffs]
Modified Sat Dec 8 19:33:47 2007 UTC (23 months, 2 weeks ago) by jim
File length: 56490 byte(s)
Diff to previous 602468 (colored)
Merge r589461, r602491 from trunk:

Prevent 1-byte overflow on 8192 boundary (see PR 43310)


Alternate fix... profiling indicates that the string
termination is completely unneeded and superflous. In
which case, the original allocation size is sufficient
since nothing external worries about a NULL nor
looks for it.

Reviewed by: jim

Revision 602468 - (view) (annotate) - [select for diffs]
Modified Sat Dec 8 14:01:47 2007 UTC (23 months, 2 weeks ago) by jim
File length: 56576 byte(s)
Diff to previous 421103 (colored)
  * mod_proxy_http: Correctly forward unexpected interim (HTTP 1xx) responses
      incorporating ap_send_interim_response core API
          PR 16518


Revision 421103 - (view) (annotate) - [select for diffs]
Modified Wed Jul 12 03:38:44 2006 UTC (3 years, 4 months ago) by fielding
File length: 55478 byte(s)
Diff to previous 396056 (colored)
update license header text

Revision 396056 - (view) (annotate) - [select for diffs]
Modified Sat Apr 22 01:53:06 2006 UTC (3 years, 7 months ago) by pquerna
File length: 55331 byte(s)
Diff to previous 395985 (colored)
Revert r395231 from the 2.2.x branch.  This gets us back to the old place with regard to the copyright statements.

Revision 395985 - (view) (annotate) - [select for diffs]
Modified Fri Apr 21 18:43:36 2006 UTC (3 years, 7 months ago) by niq
File length: 55331 byte(s)
Diff to previous 395231 (colored)
Backport fix to PR#39282

Revision 395231 - (view) (annotate) - [select for diffs]
Modified Wed Apr 19 12:33:16 2006 UTC (3 years, 7 months ago) by colm
File length: 55089 byte(s)
Diff to previous 390503 (colored)
Update the last year of copyright for the 2.2.x branch

Revision 390503 - (view) (annotate) - [select for diffs]
Modified Fri Mar 31 21:27:18 2006 UTC (3 years, 7 months ago) by rpluem
File length: 55089 byte(s)
Diff to previous 356764 (colored)
Merge r370172, r371132 from trunk:

* Insert the HTTP_IN filter uncondionally before we call
  ap_send_error_response or ap_die. This ensures that
  ap_discard_request_body called by ap_die and by ap_send_error_response works
  correctly on status codes that do not cause the connection to be dropped and
  in situations where the connection should be kept alive.

PR: 38123
Reviewed by: rpluem, niq, jerenkrantz

Revision 356764 - (view) (annotate) - [select for diffs]
Modified Wed Dec 14 10:05:48 2005 UTC (3 years, 11 months ago) by niq
File length: 54915 byte(s)
Diff to previous 354800 (colored)
Trival backports having 3 * +1

Revision 354800 - (view) (annotate) - [select for diffs]
Modified Wed Dec 7 16:58:01 2005 UTC (3 years, 11 months ago) by jorton
File length: 54791 byte(s)
Diff to previous 332309 (colored)
Merge r327008 from trunk:

keep the proxied Content-Length header for a HEAD response. 

PR: 18757
Submitted by: gregames
Reviewed by: jorton, jerenkrantz, niq, wrowe

Revision 332309 - (view) (annotate) - [select for diffs]
Modified Thu Nov 10 15:20:05 2005 UTC (4 years ago) by jim
File length: 54128 byte(s)
Diff to previous 307031 (colored)
No functional change: remove trailing whitespace. This also means
that "blank" lines, which had consisted of just spaces
and/or tabs are now truly blank lines

Revision 307031 - (view) (annotate) - [select for diffs]
Modified Fri Oct 7 06:41:23 2005 UTC (4 years, 1 month ago) by wrowe
File length: 54540 byte(s)
Diff to previous 306782 (colored)
Backport Revision: 306495

  NET_TIME, as a standalone feature, was a horrid idea, so eliminate it.

  The core filter will NOT operate correctly across platforms 
  (even between Linux/Solaris) without setting up the conn->timeout,
  so always apply the timeout when establishing the core filter.

  The keep-alive-timeout is entirely an HTTP-ism, and needs to
  move to the http protocol handler.  This isn't triggered in the 
  event mpm, but the event mpm introspects s->keep_alive_timeout
  directly adding it to the pollset, so this is a non-sequitor.

  Finally, once the headers are read, the named virtual host may
  have a different (more/less permissive) timeout for the remainder
  of the request body.  This http-centric patch picks up that subtle
  detail and can switch to a named-vhost timeout.


Revision 306782 - (view) (annotate) - [select for diffs]
Modified Thu Oct 6 15:53:58 2005 UTC (4 years, 1 month ago) by wrowe
File length: 53747 byte(s)
Diff to previous 234103 (colored)
Backport 295141

  Pay close attention to core_create_req() ... and note
  that not one other member of the r->vars is initialized
  herein.  Move this initialization elsewhere.

  (If this is the 'default' - it really aught to be the
  zero value, for that matter).



Revision 234103 - (view) (annotate) - [select for diffs]
Modified Sat Aug 20 18:21:45 2005 UTC (4 years, 3 months ago) by pquerna
File length: 53552 byte(s)
Diff to previous 193122 (colored)
Recreate 2.2.x branch from trunk.

Revision 193122 - (view) (annotate) - [select for diffs]
Modified Thu Jun 23 09:36:16 2005 UTC (4 years, 5 months ago) by jorton
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 53552 byte(s)
Diff to previous 191175 (colored)
* server/protocol.c (ap_read_request): Remove the Content-Length
header if any Transfer-Encoding header is present, regardless of
value.

Reviewed by: Paul Querna, Jeff Trawick

Revision 191175 - (view) (annotate) - [select for diffs]
Modified Fri Jun 17 16:47:43 2005 UTC (4 years, 5 months ago) by jfclere
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 53669 byte(s)
Diff to previous 191005 (colored)
if Transfer-Encoding is not "identity" ignore Content-Length.
otherwise ajp-proxy hangs when Transfer-Encoding is "chunked".

Revision 191005 - (view) (annotate) - [select for diffs]
Modified Thu Jun 16 21:34:08 2005 UTC (4 years, 5 months ago) by pquerna
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 53665 byte(s)
Diff to previous 170433 (colored)
If a request contains both a T-E and C-L, remove the C-L, stopping some HTTP Request Smuggling attacks exploited when using HTTPD as a forward or reverse proxy.

Revision 170433 - (view) (annotate) - [select for diffs]
Modified Mon May 16 19:36:04 2005 UTC (4 years, 6 months ago) by jorton
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 53124 byte(s)
Diff to previous 170354 (colored)
* server/protocol.c (read_request_line): Revert addition of error
message which triggers every time dummy_connection() is used to wake
up a child.

Revision 170354 - (view) (annotate) - [select for diffs]
Modified Mon May 16 10:41:42 2005 UTC (4 years, 6 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 53369 byte(s)
Diff to previous 160573 (colored)
Support the suppress-error-charset setting, as with Apache 1.3.x.

With Apache 1.3.x, it is a bit simpler as the request does
not go through ap_make_content_type().

Modules can set custom error responses but not be able to
set the charset, so they have to code the charset in the
html.  Thus, it is useful to preserve 1.3.x behavior exactly.

PR: 26467

Revision 160573 - (view) (annotate) - [select for diffs]
Modified Fri Apr 8 18:07:33 2005 UTC (4 years, 7 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 53178 byte(s)
Diff to previous 159410 (colored)
use a more general but slightly slower test for a body.

Revision 159410 - (view) (annotate) - [select for diffs]
Modified Tue Mar 29 18:24:46 2005 UTC (4 years, 7 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 53085 byte(s)
Diff to previous 158798 (colored)
clone_headers_no_body: remove all entity headers in addition to the 
Transfer-Encoding header when creating a GET subrequest


Revision 158798 - (view) (annotate) - [select for diffs]
Modified Wed Mar 23 16:36:45 2005 UTC (4 years, 8 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52751 byte(s)
Diff to previous 151408 (colored)
don't propagate input headers describing a body to a subrequest.  this can cause a
back end server to hang in a read for a body which no longer exists.

Revision 151408 - (view) (annotate) - [select for diffs]
Modified Fri Feb 4 20:28:49 2005 UTC (4 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51800 byte(s)
Diff to previous 124283 (colored)
Update copyright year to 2005 and standardize on current copyright owner line.

Revision 124283 - (view) (annotate) - [select for diffs]
Modified Wed Jan 5 22:21:56 2005 UTC (4 years, 10 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51764 byte(s)
Diff to previous 123882 (colored)
  limit_req_fieldsize is signed, correct a signedness error using
  a cast since it's not possible to have a negative limit.

Revision 123882 - (view) (annotate) - [select for diffs]
Modified Sun Jan 2 05:33:44 2005 UTC (4 years, 10 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51753 byte(s)
Diff to previous 110141 (colored)
  FINALLY Correct ap_http_method()!  It is NOT a method, it's a SCHEME!

  Bumped mmn, and ap module cookie, for this function rename.

  It's not a deprecation, as ap_http_method would be a lovely function
  name sometime in the future: to determine what the function name implies.

Revision 110141 - (view) (annotate) - [select for diffs]
Modified Tue Dec 7 19:04:22 2004 UTC (4 years, 11 months ago) by bnicholes
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51753 byte(s)
Diff to previous 106103 (colored)
Revert patch r104923.  This patch doesn't actually fix bug 18757 and
breaks TLS upgrade functionality.  Also, removing the content length for
HEAD requests is being handled in ap_http_header_filter().

Revision 106103 - (view) (annotate) - [select for diffs]
Modified Sun Nov 21 18:50:36 2004 UTC (5 years ago) by nd
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51907 byte(s)
Diff to previous 105680 (colored)
general property cleanup

Revision 105680 - (view) (annotate) - [select for diffs]
Modified Thu Nov 4 14:50:31 2004 UTC (5 years ago) by jorton
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51907 byte(s)
Diff to previous 105593 (colored)
Fix for memory consumption DoS, CVE CAN-2004-0942:

* server/protocol.c (ap_rgetline_core): Don't trim trailing whitespace
from the buffer here.
(ap_get_mime_headers_core): Trim trailing whitespace here, after
reading a complete field including continuation lines.  Also simplify
code to remove whitespace between field-name and colon.

Reviewed by: Andr�� Malo, Bill Stoddard

Revision 105593 - (view) (annotate) - [select for diffs]
Modified Mon Oct 25 15:59:43 2004 UTC (5 years, 1 month ago) by pquerna
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52917 byte(s)
Diff to previous 105586 (colored)
Use a more descriptive error message, and make it an INFO insteead of NOTICE.

Revision 105586 - (view) (annotate) - [select for diffs]
Modified Mon Oct 25 10:24:17 2004 UTC (5 years, 1 month ago) by niq
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52878 byte(s)
Diff to previous 105583 (colored)
PR: 31875
Fix URI parsing bug in case of a leading double-slash

Revision 105583 - (view) (annotate) - [select for diffs]
Modified Mon Oct 25 06:40:08 2004 UTC (5 years, 1 month ago) by pquerna
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52469 byte(s)
Diff to previous 105572 (colored)
This will put some messages in the error log when some people try a lame
DoS by just opening a socket, and never sending any data.

Ivan suggested such a change about a month ago, to match the 1.3 behavoir.

Today I helped OSU's Admins figure out that someone was trying this 'attack'
against their mirror server.  The server status just showed hundreds of
Apache Children stuck in Reading.  This will at least hint to the admins
where the problem is by telling them about it in the error log.

Inspired by: Rici Lake, Ivan Ristic <ivanr webkreator.com>

Revision 105572 - (view) (annotate) - [select for diffs]
Modified Sat Oct 23 22:39:53 2004 UTC (5 years, 1 month ago) by fielding
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52264 byte(s)
Diff to previous 105545 (colored)
veto and revert win64 patch: 64bit changes must percolate from the
bottom (APR/system) up -- we can't give the client a 64bit API and
then cast it to 32bits internally without introducing security holes
on other platforms.

Revision 105545 - (view) (annotate) - [select for diffs]
Modified Fri Oct 22 15:22:05 2004 UTC (5 years, 1 month ago) by ake
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52312 byte(s)
Diff to previous 105231 (colored)
WIN64: API changes to clean up Windows 64bit compile warnings

Revision 105231 - (view) (annotate) - [select for diffs]
Modified Tue Sep 21 21:07:23 2004 UTC (5 years, 2 months ago) by jorton
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52264 byte(s)
Diff to previous 105113 (colored)
* server/protocol.c (ap_rgetline_core): Never NUL terminate at
(*s)[-1] for caller-supplied *s.

Submitted by: Rici Lake <ricilake speedy.com.pe>

Revision 105113 - (view) (annotate) - [select for diffs]
Modified Mon Sep 13 15:34:59 2004 UTC (5 years, 2 months ago) by jorton
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52262 byte(s)
Diff to previous 104923 (colored)
* server/protocol.c (ap_rgetline_core): Fix off-by-one.

Revision 104923 - (view) (annotate) - [select for diffs]
Modified Wed Sep 1 12:24:48 2004 UTC (5 years, 2 months ago) by niq
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52260 byte(s)
Diff to previous 104639 (colored)
Fix for Bug 18757 (sending bogus content-length of zero in no-body requests)

Revision 104639 - (view) (annotate) - [select for diffs]
Modified Thu Aug 12 17:48:35 2004 UTC (5 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52106 byte(s)
Diff to previous 104059 (colored)
  Fix signedness emit.

Revision 104059 - (view) (annotate) - [select for diffs]
Modified Mon Jun 28 23:53:52 2004 UTC (5 years, 4 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52108 byte(s)
Diff to previous 103482 (colored)
CAN-2004-0493 - memory exhaustion denial of service

Reviewed by:	jerenkrantz

Revision 103482 - (view) (annotate) - [select for diffs]
Modified Thu Apr 22 22:38:03 2004 UTC (5 years, 7 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51217 byte(s)
Diff to previous 103474 (colored)
ap_rgetline_core: insure that the output string is null terminated
when exiting with APR_ENOSPC

Submitted by: Tsurutani Naoki <turutani scphys.kyoto-u.ac.jp>

Revision 103474 - (view) (annotate) - [select for diffs]
Modified Wed Apr 21 21:57:19 2004 UTC (5 years, 7 months ago) by nd
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50807 byte(s)
Diff to previous 102840 (colored)
ap_set_sub_req_protocol and ap_finalize_sub_req_protocol are now
exported on Win32 as well

PR: 28523
Submitted by: Edward Rudd <eddie omegaware.com>

Revision 102840 - (view) (annotate) - [select for diffs]
Modified Mon Mar 1 21:40:44 2004 UTC (5 years, 8 months ago) by rederpj
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50742 byte(s)
Diff to previous 102619 (colored)

 *) Remove compile-time length limit on request strings. Length is
    now enforced solely with the LimitRequestLine config directive.
    [Paul J. Reder]

Revision 102619 - (view) (annotate) - [select for diffs]
Modified Mon Feb 9 20:40:53 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50729 byte(s)
Diff to previous 102589 (colored)
fix name of The Apache Software Foundation

Revision 102589 - (view) (annotate) - [select for diffs]
Modified Sun Feb 8 13:58:22 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50725 byte(s)
Diff to previous 102525 (colored)
fix copyright dates according to the first check in

Revision 102525 - (view) (annotate) - [select for diffs]
Modified Fri Feb 6 22:58:42 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50725 byte(s)
Diff to previous 102414 (colored)
apply Apache License, Version 2.0

Revision 102414 - (view) (annotate) - [select for diffs]
Modified Mon Jan 26 21:09:12 2004 UTC (5 years, 10 months ago) by jorton
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52944 byte(s)
Diff to previous 102413 (colored)
* server/protocol.c (ap_rgetline_core): Fix folding if header is
continued over more than two lines.

PR: 19405 (affects proxy only)

Revision 102413 - (view) (annotate) - [select for diffs]
Modified Mon Jan 26 20:58:12 2004 UTC (5 years, 10 months ago) by jorton
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52901 byte(s)
Diff to previous 102135 (colored)
* server/protocol.c (ap_rgetline_core): Re-indent function after being
skewed by CAN-2003-0132 fix: no functional change.

Revision 102135 - (view) (annotate) - [select for diffs]
Modified Thu Jan 1 13:26:26 2004 UTC (5 years, 10 months ago) by nd
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52042 byte(s)
Diff to previous 101788 (colored)
update license to 2004.

Revision 101788 - (view) (annotate) - [select for diffs]
Modified Sun Nov 16 02:09:14 2003 UTC (6 years ago) by jwoolley
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52042 byte(s)
Diff to previous 101517 (colored)
get rid of _FOREACH

Revision 101517 - (view) (annotate) - [select for diffs]
Modified Wed Oct 22 16:45:53 2003 UTC (6 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51960 byte(s)
Diff to previous 101441 (colored)
Set the scoreboard state to indicate logging prior to running
logging hooks so that server-status will show 'L' for hung loggers
instead of 'W'.

Revision 101441 - (view) (annotate) - [select for diffs]
Modified Mon Oct 13 23:43:00 2003 UTC (6 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51542 byte(s)
Diff to previous 101211 (colored)
tag the pools created for requests and subrequests

Revision 101211 - (view) (annotate) - [select for diffs]
Modified Wed Sep 10 12:12:18 2003 UTC (6 years, 2 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51510 byte(s)
Diff to previous 100562 (colored)
zap an incorrect comment that remained from 1.3 days

Submitted by:	Aryeh Katz
Reviewed by:	Jeff Trawick

Revision 100562 - (view) (annotate) - [select for diffs]
Modified Sat Jul 12 13:03:39 2003 UTC (6 years, 4 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51722 byte(s)
Diff to previous 100550 (colored)
minor style changes

Revision 100550 - (view) (annotate) - [select for diffs]
Modified Fri Jul 11 11:00:38 2003 UTC (6 years, 4 months ago) by jorton
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51664 byte(s)
Diff to previous 100492 (colored)
Update comment after removal of tmp_headers in r1.132.

Revision 100492 - (view) (annotate) - [select for diffs]
Modified Tue Jul 8 21:21:13 2003 UTC (6 years, 4 months ago) by rederpj
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51662 byte(s)
Diff to previous 100334 (colored)

Update the header token parsing code to allow LWS between the token word
and the ':' seperator.  [PR 16520]
[submitted: Kris Verbeeck <kris.verbeeck@advalvas.be> and
            Nicel KM <mnicel@yahoo.com>]
[Reviewed: <coad@measurement-factory.com> and
           Paul J. Reder]

Revision 100334 - (view) (annotate) - [select for diffs]
Modified Sun Jun 22 22:08:53 2003 UTC (6 years, 5 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50822 byte(s)
Diff to previous 99374 (colored)
Eliminate creation of a temporary table in ap_get_mime_headers_core()
Submitted by:	Joe Schaefer <joe+gmane@sunstarsys.com>
Reviewed by:	Brian Pane

Revision 99374 - (view) (annotate) - [select for diffs]
Modified Tue Apr 15 22:47:58 2003 UTC (6 years, 7 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50989 byte(s)
Diff to previous 99109 (colored)
fix some discrepancies between format strings and arguments,
resolving some warnings on 64-bit systems

Revision 99109 - (view) (annotate) - [select for diffs]
Modified Sat Mar 29 16:32:22 2003 UTC (6 years, 8 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50968 byte(s)
Diff to previous 99079 (colored)
Simplify and shorten the code path for scanning request headers
Reviewed by:	Greg Ames, Bill Rowe

Revision 99079 - (view) (annotate) - [select for diffs]
Modified Thu Mar 27 20:34:56 2003 UTC (6 years, 8 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52744 byte(s)
Diff to previous 99057 (colored)
ap_rgetline_core: set the number of bytes read & copied into the caller's
buffer when returning APR_ENOSPC.  This prevents seg faults in
ap_get_mime_headers_core in an error path which handles headers that are too
long.

Submitted by:	Jeff Trawick

Revision 99057 - (view) (annotate) - [select for diffs]
Modified Mon Mar 24 16:39:25 2003 UTC (6 years, 8 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52659 byte(s)
Diff to previous 98573 (colored)
ap_get_mime_headers_core: allocate space for the trailing null when there
are folded headers. PR 18170 [Peter Mayne <PeterMayne@SPAM_SUX.ap.spherion.com>]

Revision 98573 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 17:53:28 2003 UTC (6 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52599 byte(s)
Diff to previous 97879 (colored)
finished that boring job:
update license to 2003.

Happy New Year! ;-))

Revision 97879 - (view) (annotate) - [select for diffs]
Modified Wed Dec 11 22:30:37 2002 UTC (6 years, 11 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52599 byte(s)
Diff to previous 97875 (colored)
ap_get_mime_headers: combine some error paths to remove a conditional
branch from the mainline path.

It might be worthwhile to move all the getline error handling into a
separate function and be a little more i-cache friendly.

Revision 97875 - (view) (annotate) - [select for diffs]
Modified Wed Dec 11 22:09:40 2002 UTC (6 years, 11 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52601 byte(s)
Diff to previous 97863 (colored)
ap_get_mime_headers:  whoops - need to insure that we use a configured
field size limit if there is one

Revision 97863 - (view) (annotate) - [select for diffs]
Modified Wed Dec 11 21:03:58 2002 UTC (6 years, 11 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52602 byte(s)
Diff to previous 97832 (colored)
ap_get_mime_headers: tighten up the null termination of header line which is
too long.  getline can return a smaller length that what it actually read in
that case.

The check for len > limit_fieldsize isn't needed, but we do need to insure
that getline actually allocated a buffer (and set len) in the case where
the first socket input buffer is already bigger than the limit.

Revision 97832 - (view) (annotate) - [select for diffs]
Modified Tue Dec 10 02:56:26 2002 UTC (6 years, 11 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52788 byte(s)
Diff to previous 97765 (colored)
prevent a potential seg fault in ap_escape_html if a header field is too
long.

Revision 97765 - (view) (annotate) - [select for diffs]
Modified Tue Dec 3 08:38:45 2002 UTC (6 years, 11 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52665 byte(s)
Diff to previous 97569 (colored)
Move the check of the Expect request header field after the hook
for ap_post_read_request, since that is the only opportunity for
modules to handle Expect extensions.

Obtained from: apache-1.3

Revision 97569 - (view) (annotate) - [select for diffs]
Modified Tue Nov 19 19:32:38 2002 UTC (7 years ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52665 byte(s)
Diff to previous 97363 (colored)
bucket length parameter is apr_size_t, which isn't always signed,
so be careful when comparing with the special value -1

Submitted by:	Allan Edwards <ake@us.ibm.com>
Reviewed by:	Jeff Trawick

Revision 97363 - (view) (annotate) - [select for diffs]
Modified Thu Oct 31 11:39:36 2002 UTC (7 years ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52653 byte(s)
Diff to previous 97054 (colored)
when the connection drops, c->aborted is set but generally
ap_pass_brigade returns APR_SUCCESS

content-length needs to be alert to c->aborted so that it
doesn't keep trying to pass brigades down (otherwise, you get
errors writing to the network over and over and over and ...)

Revision 97054 - (view) (annotate) - [select for diffs]
Modified Wed Oct 2 13:41:45 2002 UTC (7 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52636 byte(s)
Diff to previous 96971 (colored)
Ensure that output already available is flushed to the network
when the content-length filter realizes that no new output will
be available for a while.  This helps some streaming CGIs as
well as some other dynamically-generated content.

Revision 96971 - (view) (annotate) - [select for diffs]
Modified Wed Sep 25 01:51:13 2002 UTC (7 years, 2 months ago) by gstein
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52486 byte(s)
Diff to previous 96857 (colored)
Minor simplification... The can_send_content_length variable is
redundant with ctx->data_sent.

Revision 96857 - (view) (annotate) - [select for diffs]
Modified Tue Sep 17 01:14:57 2002 UTC (7 years, 2 months ago) by jim
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52719 byte(s)
Diff to previous 96557 (colored)
The protocol version (eg: HTTP/1.1) in the request line parsing
is now case insensitive. Before, 'http/1.1' would silently be forced
to HTTP/1.0


PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 96557 - (view) (annotate) - [select for diffs]
Modified Wed Aug 28 18:37:48 2002 UTC (7 years, 3 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52645 byte(s)
Diff to previous 96364 (colored)
Changed the content-length filter to allow streaming delivery
of content to clients

With this new code, the C-L filter will compute a content-length
if there's an EOS in the first brigade passed to it.  For normal
static file requests, the response header will still include a C-L.
If there's no EOS in the first brigade passed to the C-L filter,
the filter will give up on setting the C-L header, in favor of
passing the data on to the next filter in a timely manner.

Revision 96364 - (view) (annotate) - [select for diffs]
Modified Tue Aug 13 14:27:39 2002 UTC (7 years, 3 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 54318 byte(s)
Diff to previous 96094 (colored)
fix weird things that happen with canned error messages due to using two
different request_recs after an ErrorDocument internal redirect failure.
examples: wrong Content-Type, garbled output from ebcdic servers due to
double charset translation

Revision 96094 - (view) (annotate) - [select for diffs]
Modified Wed Jul 17 13:50:26 2002 UTC (7 years, 4 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 54368 byte(s)
Diff to previous 95975 (colored)
add notes about a portability problem -- formatting apr_time_t
in hex

Revision 95975 - (view) (annotate) - [select for diffs]
Modified Mon Jul 8 17:36:41 2002 UTC (7 years, 4 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 54319 byte(s)
Diff to previous 95971 (colored)
fix folding when the continuation charater is a blank
Reported by:	one of Jeff T's regression test cases

Revision 95971 - (view) (annotate) - [select for diffs]
Modified Mon Jul 8 12:58:16 2002 UTC (7 years, 4 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 54300 byte(s)
Diff to previous 95964 (colored)
silence an unhelpful gcc warning

Revision 95964 - (view) (annotate) - [select for diffs]
Modified Sat Jul 6 01:53:37 2002 UTC (7 years, 4 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 54296 byte(s)
Diff to previous 95956 (colored)
Eliminated the use of AP_MODE_SPECULATIVE brigade reads to check
for request header continuation lines.  Instead, ap_get_mime_headers_core()
now sets aside each line of input until it sees the next line.  If the
next line starts with a tab, it is appended to the previous one; otherwise,
the previous line is added to the request headers table.

This reduces the number of temporary buckets that must be created
and destroyed to read in a request.

Revision 95956 - (view) (annotate) - [select for diffs]
Modified Thu Jul 4 17:05:25 2002 UTC (7 years, 4 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52208 byte(s)
Diff to previous 95946 (colored)
Re-use the same temp brigade to read all lines of a request header,
to avoid the overhead of brigade creation and deletion.  (This produced
a 5% reduction in the total CPU usage of a minimalist httpd configuration:
<JHEPKCEMGPKFFDHHDDKDMELFEKAA.bill@wstoddard.com>)

Revision 95946 - (view) (annotate) - [select for diffs]
Modified Tue Jul 2 23:51:21 2002 UTC (7 years, 4 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51937 byte(s)
Diff to previous 95920 (colored)
Fix C-L filter non-blocking-mode brokenness.  It was failing to ever
read from pipe/socket buckets again if it got APR_EAGAIN from them
due to its use of APR_BRIGADE_FOREACH.

Submitted by: the gang on IRC

Revision 95920 - (view) (annotate) - [select for diffs]
Modified Mon Jul 1 05:05:51 2002 UTC (7 years, 4 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51803 byte(s)
Diff to previous 95891 (colored)
Optimization for ap_rgetline_core(): When "folding" mode is enabled,
clear and re-use the temporary brigade rather than destroying it
and creating a new one

Revision 95891 - (view) (annotate) - [select for diffs]
Modified Wed Jun 26 19:45:07 2002 UTC (7 years, 5 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51782 byte(s)
Diff to previous 95595 (colored)
Change conn_rec->keepalive to an enumerated value of

AP_CONN_UNKNOWN
AP_CONN_CLOSE
AP_CONN_KEEPALIVE

This also fixes a problem where ap_discard_request_body would not discard
the body when keepalive was 0.  This actually meant the keepalive status
was unknown *not* closed, but no one ever remembered that.

This problem was seen with mod_dav sending error responses (as reported by
Karl Fogel).

Suggested by:	Greg "this isn't the '80s" Stein
Reviewed by:	Greg Ames

Revision 95595 - (view) (annotate) - [select for diffs]
Modified Mon Jun 10 18:51:38 2002 UTC (7 years, 5 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51758 byte(s)
Diff to previous 95576 (colored)
ap_finalize_sub_req_protocol() shouldn't send an EOS bucket if
one was already sent.

mod_ext_filter performs some one-time processing when it sees EOS.
When it saw EOS more than once and a subsequent attempt to close a
file failed, it issued the log message described in PR 9644.

PR:      9644

Revision 95576 - (view) (annotate) - [select for diffs]
Modified Fri Jun 7 22:31:34 2002 UTC (7 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51658 byte(s)
Diff to previous 95149 (colored)
Call ap_discard_request_body from ap_finalize_request.  Remove the call
from all other modules that do not use it to determine the response for
the request.

Revision 95149 - (view) (annotate) - [select for diffs]
Modified Fri May 17 11:11:39 2002 UTC (7 years, 6 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51665 byte(s)
Diff to previous 95053 (colored)
stop using APLOG_NOERRNO in calls to ap_log_?error()

Revision 95053 - (view) (annotate) - [select for diffs]
Modified Mon May 13 06:45:07 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51777 byte(s)
Diff to previous 95052 (colored)
Start with a larger buffer size in ap_rgetline_core() to avoid
having to grow the buffer so often

Revision 95052 - (view) (annotate) - [select for diffs]
Modified Mon May 13 06:16:31 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51555 byte(s)
Diff to previous 95047 (colored)
Optimization: modified the power-of-two allocator in ap_rgetline_core()
so that it converges on the new buffer size in a single iteration.

Revision 95047 - (view) (annotate) - [select for diffs]
Modified Sun May 12 16:55:41 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51544 byte(s)
Diff to previous 95041 (colored)
Fixed missing null-termination of ap_make_content_type() patterns list

Revision 95041 - (view) (annotate) - [select for diffs]
Modified Sun May 12 00:57:33 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51511 byte(s)
Diff to previous 95026 (colored)
Optimization: Replaced apr_strcat() with apr_strcatv() in
ap_make_content_type()

Revision 95026 - (view) (annotate) - [select for diffs]
Modified Fri May 10 06:47:13 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51173 byte(s)
Diff to previous 94952 (colored)
Performance fix: replaced the strcasecmp calls in ap_make_content_type()
with apr_strmatch()

Revision 94952 - (view) (annotate) - [select for diffs]
Modified Mon May 6 09:11:50 2002 UTC (7 years, 6 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50451 byte(s)
Diff to previous 94831 (colored)
cleanup old-school backward uses of APR_BRIGADE_CONCAT to use
APR_BRIGADE_PREPEND instead, plus optimize away a bunch of repetitive
brigade destructions/creations by hanging onto ctx->saved even after
we empty it out.

Revision 94831 - (view) (annotate) - [select for diffs]
Modified Sun Apr 28 06:24:53 2002 UTC (7 years, 7 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50656 byte(s)
Diff to previous 94667 (colored)
Simplify this little chunk of code since r is set to f->r earlier.

Revision 94667 - (view) (annotate) - [select for diffs]
Modified Tue Apr 16 05:43:09 2002 UTC (7 years, 7 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50667 byte(s)
Diff to previous 94468 (colored)
Adds support for reading trailers on input by exporting get_mime_headers
to ap_get_mime_headers and calling it in the appropriate place in
ap_http_filter.

showstoppers--;

Revision 94468 - (view) (annotate) - [select for diffs]
Modified Fri Apr 5 20:55:00 2002 UTC (7 years, 7 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50668 byte(s)
Diff to previous 94304 (colored)
  Correct partitioning of filter handles between core and http, and
  export the handle pointers on Win32.

Revision 94304 - (view) (annotate) - [select for diffs]
Modified Fri Mar 29 08:17:26 2002 UTC (7 years, 8 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50646 byte(s)
Diff to previous 93987 (colored)
BUCKET FREELISTS

Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.

Revision 93987 - (view) (annotate) - [select for diffs]
Modified Sun Mar 17 23:18:10 2002 UTC (7 years, 8 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50240 byte(s)
Diff to previous 93918 (colored)
  Seems like this is the end of the compiler emits on Win32, once again.

Revision 93918 - (view) (annotate) - [select for diffs]
Modified Wed Mar 13 20:48:07 2002 UTC (7 years, 8 months ago) by fielding
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50072 byte(s)
Diff to previous 93842 (colored)
Update our copyright for this year.

Revision 93842 - (view) (annotate) - [select for diffs]
Modified Mon Mar 11 13:57:25 2002 UTC (7 years, 8 months ago) by striker
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50072 byte(s)
Diff to previous 93804 (colored)
Style Police comming through...

Revision 93804 - (view) (annotate) - [select for diffs]
Modified Fri Mar 8 20:24:07 2002 UTC (7 years, 8 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 48876 byte(s)
Diff to previous 93776 (colored)
ap_rgetline_core: fix a bug with folding observed while testing ebcdic.
Garbage characters sometimes appeared after a legitimate folded header.
We weren't allocating an extra byte for the trailing null, or copying it,
when called from get_mime_headers (folding is in use, and ap_rgetline is
responsible for allocating memory).  No need to worry about a trailing
LF - it's already been nuked.

I checked the partial line code to see if it had a similar bug.  It looked
like it did, and that the code which trims the back end of the line would
run multiple times and whack innocent bytes.  However, gdb showed that this
section of code appears to be dead due to input filter chain changes.

also, removed an assignment to a dead variable.

Revision 93776 - (view) (annotate) - [select for diffs]
Modified Thu Mar 7 22:08:46 2002 UTC (7 years, 8 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 48468 byte(s)
Diff to previous 93745 (colored)
ap_rgetline: fix folding and partial line handling on ebcdic boxes.  The
normal case worked OK, but due to the recursion and multiple exit points,
input bytes could go thru charset translation multiple times or not at all.

Suggested by: Justin Erenkrantz

Revision 93745 - (view) (annotate) - [select for diffs]
Modified Thu Mar 7 02:09:30 2002 UTC (7 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47762 byte(s)
Diff to previous 93686 (colored)
Remove the prev pointer from the filter chain.  This removes
the complexity of trying to set the filter chain correctly, with the
side-effect of forcing us to walk the entire chain whenever we add
a filter.  Since the filter chains are small, the decrease in
complexity is worth it.
Reviewed by:	Allan Edwards

Revision 93686 - (view) (annotate) - [select for diffs]
Modified Sun Mar 3 22:04:03 2002 UTC (7 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47840 byte(s)
Diff to previous 93682 (colored)
This fixes most of the header bug that was committed last night.  The server
is seg faulting on pipelined requests currently, but I want to get people
back to a running server.

Revision 93682 - (view) (annotate) - [select for diffs]
Modified Sun Mar 3 02:15:52 2002 UTC (7 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47761 byte(s)
Diff to previous 93610 (colored)
Fix the mod_dir/mod_negotiation bug, where redirects and sub requests
were not getting the correct filters.  This is done by creating a location
in the request rec that holds protocol level filters.  Protocol level
filters survive for one request, from the time the request is received
from the user to the time the response is sent.  r->output_filters now
stores the request level filters, which are only valid for the lifetime
of one request_rec.

This patch works, but it is not complete.  The second half of the problem
is that add_any_filter doesn't check where it puts the filters that it
adds, so it is possible for filters to be put on this wrong list, and
for filters to be lost completely during request processing.  That half
of the fix will be coming in the next day or so.

Submitted by:	Will Rowe, Justin Erenkrantz, Ryan Bloom

Revision 93610 - (view) (annotate) - [select for diffs]
Modified Wed Feb 27 21:16:19 2002 UTC (7 years, 8 months ago) by ake
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47653 byte(s)
Diff to previous 93422 (colored)
ownership of the brigade is passed in the ap_pass_brigade call
so make sure that it doesn't get left lying around. This tickled
a bug with mod_deflate and resulted in a bucket being compressed
more than once.

Revision 93422 - (view) (annotate) - [select for diffs]
Modified Fri Feb 15 01:17:53 2002 UTC (7 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47612 byte(s)
Diff to previous 93334 (colored)
Just toss these debug messages since so many people use httpd with
LogLevel 'debug' and complain if they see anything that says "error"
in it.  This case isn't even interesting unless you are hard-core.

Revision 93334 - (view) (annotate) - [select for diffs]
Modified Fri Feb 8 14:47:10 2002 UTC (7 years, 9 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47789 byte(s)
Diff to previous 93332 (colored)
update CHANGES for an input side seg fault fix.

also, get rid of a mainframe term that somehow leaked into a comment which
might confuse people.

Revision 93332 - (view) (annotate) - [select for diffs]
Modified Fri Feb 8 02:25:42 2002 UTC (7 years, 9 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47790 byte(s)
Diff to previous 93295 (colored)
ensure that ap_rgetline allocates storage for the request line each time it is
called.

This fixes a number of segfaults on daedalus where the first line is
empty (i.e. \r\n followed by a bunch of garbage)

Revision 93295 - (view) (annotate) - [select for diffs]
Modified Wed Feb 6 16:56:52 2002 UTC (7 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47639 byte(s)
Diff to previous 93294 (colored)
We totally disregard the fact that notice is level 5 and always print
that.  Yuck.  Make these error message DEBUG level then.

Revision 93294 - (view) (annotate) - [select for diffs]
Modified Wed Feb 6 16:19:03 2002 UTC (7 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47641 byte(s)
Diff to previous 93271 (colored)
don't try to place a header field in error-notes if ap_rgetline()
returned something like APR_EOF, since len is not set in this
case and we can go off the end of storage

make sure we set r->status to something when we bail out due
to an error; otherwise, the request goes forward with meaningless
headers

Revision 93271 - (view) (annotate) - [select for diffs]
Modified Wed Feb 6 02:29:54 2002 UTC (7 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47564 byte(s)
Diff to previous 93269 (colored)
Tone down the logging levels for these two messages from ERROR to NOTICE.
It's something to note, but it isn't an error worthy of logging by default.
(Also always log any status values in read_request_line() - incl. timeouts.)

Revision 93269 - (view) (annotate) - [select for diffs]
Modified Wed Feb 6 02:20:13 2002 UTC (7 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47855 byte(s)
Diff to previous 93094 (colored)
If the MIME-continuation line returns nothing, then we should return not
segfault.

(A minor change to Jeff's patch is that we ignore the EBCDIC code path.)

Submitted by:	Jeff Trawick
Reviewed by:	Justin Erenkrantz

Revision 93094 - (view) (annotate) - [select for diffs]
Modified Wed Jan 30 04:37:29 2002 UTC (7 years, 9 months ago) by ianh
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47703 byte(s)
Diff to previous 93092 (colored)
make it compile on win32

Revision 93092 - (view) (annotate) - [select for diffs]
Modified Wed Jan 30 02:06:09 2002 UTC (7 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47709 byte(s)
Diff to previous 93052 (colored)
Simplify the exit paths of ap_rgetline by creating a second brigade for
use when we do AP_MODE_SPECULATIVE.  This allows us to delete the
brigades earlier.

(In practice, it really doesn't matter if we delete the brigade or not
since it will be destroyed when it's pool is destroyed, but we'll try
to be nice.)

Revision 93052 - (view) (annotate) - [select for diffs]
Modified Sun Jan 27 19:24:20 2002 UTC (7 years, 10 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47370 byte(s)
Diff to previous 93044 (colored)
optimized away one more filter name lookup during request processing

Revision 93044 - (view) (annotate) - [select for diffs]
Modified Sun Jan 27 07:30:02 2002 UTC (7 years, 10 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47314 byte(s)
Diff to previous 93037 (colored)
Fixed a read from a deleted brigade in the new version of
ap_rgetline()...

In the "folding" case, there was an ap_get_brigade() call after
the brigade had been destroyed.  I noticed this while debugging
a memory leak that showed up while testing the httpd with ab.

Revision 93037 - (view) (annotate) - [select for diffs]
Modified Sat Jan 26 23:01:31 2002 UTC (7 years, 10 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 47025 byte(s)
Diff to previous 93023 (colored)
ap_rgetline(): completely ignore an empty bucket...  previously the logic
               generally worked but with a memory debug build it could
               crash since some memory debuggers don't like an alloc of
               zero bytes

Revision 93023 - (view) (annotate) - [select for diffs]
Modified Fri Jan 25 05:39:21 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 46771 byte(s)
Diff to previous 93021 (colored)
Eliminate needless variable that wasn't initialized anyway.

Revision 93021 - (view) (annotate) - [select for diffs]
Modified Fri Jan 25 02:38:52 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 46839 byte(s)
Diff to previous 93019 (colored)
Add another status code to ignore in the error_log.
(I'm really tempted to ditch this log line altogether.)

Revision 93019 - (view) (annotate) - [select for diffs]
Modified Fri Jan 25 02:15:09 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 46770 byte(s)
Diff to previous 93016 (colored)
Turn the log verbosity WAY down by not logging TIMEUP and EOF errors in
read_request_line as these are very common place with HTTP keepalive
timeouts.

Revision 93016 - (view) (annotate) - [select for diffs]
Modified Fri Jan 25 01:20:00 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 46591 byte(s)
Diff to previous 93014 (colored)
Somehow, I lost this condition when I changed to account for ap_rgetline.

Revision 93014 - (view) (annotate) - [select for diffs]
Modified Fri Jan 25 01:11:47 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 46551 byte(s)
Diff to previous 93011 (colored)
Change ap_get_brigade prototype to remove *readbytes in favor of readbytes.
If you need the length, you should be using apr_brigade_length.  This is
much more consistent.  Of all the places that call ap_get_brigade, only
one (ap_http_filter) needs the length.  This makes it now possible to
pass constants down without assigning them to a temporary variable first.

Also:
- Change proxy_ftp to use EXHAUSTIVE mode (didn't catch its -1 before)
- Fix buglet in mod_ssl that would cause it to return too much data in
  some circumstances

Revision 93011 - (view) (annotate) - [select for diffs]
Modified Thu Jan 24 23:59:51 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 46553 byte(s)
Diff to previous 92928 (colored)
Rewrite ap_rgetline to remove the need to have an "internal" brigade stored
in the core_module structure by using the AP_MODE_SPECULATIVE filter mode
to determine if MIME-continuation should occur.

Notes:
- ap_rgetline has a new prototype.
- ap_rgetline returns APR_ENOSPC when we are out of buffer space.

All direct callers of ap_rgetline are now adjusted to handle this new API.
ap_getline will mimic the old API for now.

Reviewed by:	Ryan Morgan

Revision 92928 - (view) (annotate) - [select for diffs]
Modified Sat Jan 19 07:45:18 2002 UTC (7 years, 10 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 42469 byte(s)
Diff to previous 92843 (colored)
Input filtering prototype change: Socket blocking type should be
separate from the input filter mode type.

We also no longer look at readbytes to determine the method of
filter operation.  This makes the use of filters more obvious and
allows a wider range of options for input filters modes.

To start with, the new input filter modes are:

AP_MODE_READBYTES (no more than *readbytes returned)
AP_MODE_GETLINE (old *readbytes == 0 case)
AP_MODE_EATCRLF (old AP_MODE_PEEK)
AP_MODE_SPECULATIVE (will be used in a future ap_getline rewrite)
AP_MODE_EXHAUSTIVE (old *readbytes == -1 case)
AP_MODE_INIT (special case for NNTP over SSL)

The block parameter is an apr_read_type_e: APR_BLOCK_READ, APR_NONBLOCK_READ

This also allows cleanup of mod_ssl's handling in the getline case.

Reviewed by:	Ryan Bloom (concept), Greg Stein (concept)

Revision 92843 - (view) (annotate) - [select for diffs]
Modified Sun Jan 13 21:30:14 2002 UTC (7 years, 10 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 42428 byte(s)
Diff to previous 92711 (colored)
A modification to reduce the memory usage of the server:
Reduced the initial size of the r->headers_in and r->subprocess_env
tables...this saves us 600 bytes per request, which (based on tests
I just ran) helps keep r->pool from overflowing its initial 8KB
allocation and having to alloc another 8KB block.

Revision 92711 - (view) (annotate) - [select for diffs]
Modified Wed Jan 2 23:27:57 2002 UTC (7 years, 10 months ago) by bnicholes
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 42428 byte(s)
Diff to previous 92558 (colored)
Making sure that the global variables have been initialized to avoid linker
problems at least on NetWare
Submitted by: Pavel Novy

Revision 92558 - (view) (annotate) - [select for diffs]
Modified Fri Dec 21 04:21:15 2001 UTC (7 years, 11 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 42421 byte(s)
Diff to previous 92523 (colored)
Fixed a bug in ap_rgetline()
When an input line required more than one read, each subsequent
block of data was copied on top of the previous one.  So if a
request line got split into multiple packets, the data would be
corrupted.  The new code uses a power-of-two allocator to expand
the buffer and properly append the next block of data at the end
of the previous one.

Revision 92523 - (view) (annotate) - [select for diffs]
Modified Tue Dec 18 23:57:36 2001 UTC (7 years, 11 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41754 byte(s)
Diff to previous 92450 (colored)
Skip the setting of Last-Modified in the response header on
requests or subrequests for which no response header will be
generated (a performance improvement for mod_include)

Revision 92450 - (view) (annotate) - [select for diffs]
Modified Thu Dec 13 16:41:43 2001 UTC (7 years, 11 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41704 byte(s)
Diff to previous 92324 (colored)
  Address a signedness warning.  No cleaner solutions here.

Revision 92324 - (view) (annotate) - [select for diffs]
Modified Wed Dec 5 01:34:00 2001 UTC (7 years, 11 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41699 byte(s)
Diff to previous 92295 (colored)
Fixed check for buffer overrun in ap_rgetline()

Revision 92295 - (view) (annotate) - [select for diffs]
Modified Mon Dec 3 12:12:31 2001 UTC (7 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41691 byte(s)
Diff to previous 92291 (colored)
get rid of an unused variable

Revision 92291 - (view) (annotate) - [select for diffs]
Modified Sun Dec 2 23:15:54 2001 UTC (7 years, 11 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41707 byte(s)
Diff to previous 92289 (colored)
[No code changes here, just adding the cvs comment that I messed up in
the previous commit]
Added a version of ap_getline() that allocs a buffer from
the request's pool, rather than copying into a caller-supplied
buffer.  (This lets us eliminate one copy operation on the
request headers.)

Revision 92289 - (view) (annotate) - [select for diffs]
Modified Sun Dec 2 23:11:12 2001 UTC (7 years, 11 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41707 byte(s)
Diff to previous 92282 (colored)
include/http_protocol.h

Revision 92282 - (view) (annotate) - [select for diffs]
Modified Sun Dec 2 09:51:19 2001 UTC (7 years, 11 months ago) by brianp
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41505 byte(s)
Diff to previous 92208 (colored)
Optimization: changed some apr_pstrndup calls to apr_pstrmemdup

Revision 92208 - (view) (annotate) - [select for diffs]
Modified Wed Nov 28 02:09:46 2001 UTC (8 years ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41503 byte(s)
Diff to previous 92073 (colored)
  Yea, sure a message is always good.  Note we can't log the exception.
  Submitted by John Sterling <sterling@covalent.net>

Revision 92073 - (view) (annotate) - [select for diffs]
Modified Wed Nov 21 03:46:22 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41455 byte(s)
Diff to previous 92072 (colored)
Fix the timeout logic that I broke last week.  This adds a request
level filter that sets the timeout on the socket that is connected
to the client.

Thanks Greg Stein for seeing this bug.

Revision 92072 - (view) (annotate) - [select for diffs]
Modified Wed Nov 21 03:19:13 2001 UTC (8 years ago) by dougm
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41484 byte(s)
Diff to previous 91887 (colored)
Prevent segv in ap_note_basic_auth_failure() when no AuthName is configured
PR:
Obtained from:
Submitted by:	John Sterling <sterling@covalent.net>
Reviewed by:	dougm

Revision 91887 - (view) (annotate) - [select for diffs]
Modified Mon Nov 12 23:49:08 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41150 byte(s)
Diff to previous 91778 (colored)
Begin to abstract out the underlying transport layer.
The first step is to remove the socket from the conn_rec,
the server now lives in a context that is passed to the
core's input and output filters. This forces us to be very
careful when adding calls that use the socket directly,
because the socket isn't available in most locations.

Revision 91778 - (view) (annotate) - [select for diffs]
Modified Wed Nov 7 05:41:22 2001 UTC (8 years ago) by dougm
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41631 byte(s)
Diff to previous 91714 (colored)
ap_getline() is useful to modules outside of the core..
change declaration from AP_CORE_DECLARE to AP_DECLARE so it can be used
used outside the core
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 91714 - (view) (annotate) - [select for diffs]
Modified Wed Oct 31 21:14:23 2001 UTC (8 years ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41636 byte(s)
Diff to previous 91649 (colored)
change ap_getline to return the size of the buffer when there's no apparent end
to an input line.  This is more like the 1.3 behavior which should help the
callers recognize this condition.

Revision 91649 - (view) (annotate) - [select for diffs]
Modified Tue Oct 23 20:43:57 2001 UTC (8 years, 1 month ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41556 byte(s)
Diff to previous 91311 (colored)
don't lose the return code from ap_fwrite() when called from buffer_output()

Revision 91311 - (view) (annotate) - [select for diffs]
Modified Fri Oct 5 08:51:43 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41574 byte(s)
Diff to previous 91192 (colored)
I believe it is a kosher for a filter to return EOS, but return APR_SUCCESS
via ap_get_brigade.  So, we should treat this as end-of-input.

Revision 91192 - (view) (annotate) - [select for diffs]
Modified Sat Sep 29 08:48:59 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41469 byte(s)
Diff to previous 91189 (colored)
Remove the lameo create_req hack and delay the addition of the HTTP_IN
filter until after we have read the headers.  This eliminates the status
hack that was in http_protocol.c and makes it all around better.

server/protocol.c now directly adds HTTP_IN filter - should we create a
specific hook for this?  (Could we do this as a post_read_request hook?)
I'm not terribly sure, but let's move it down to the lowest possible
place in ap_read_request.  We can change this detail later as we see fit.

Revision 91189 - (view) (annotate) - [select for diffs]
Modified Sat Sep 29 08:17:11 2001 UTC (8 years, 1 month ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41408 byte(s)
Diff to previous 91076 (colored)
Input filtering rewrite.  Consolidate how we handle HTTP input parsing by
rearranging and rethinking some things.  The net result is that the HTTP
filter is now a request filter and is now only responsible for HTTP things.
The core input filter is now responsible for handling all of the dirty work.

Highlights:
- Removes the dechunk filter and merges it with ap_http_filter (aka HTTP_IN).
  The dechunk filter was incorrectly handling certain cases (trailers).
- Moves ap_http_filter from a connection filter to a request filter
  to support the consolidation above (it needs header info).
- Change support code to allow the http_filter to be a
  request filter (how the request is setup initially).
- Move most of the logic from HTTP_IN to CORE_IN (core_input_filter).
  HTTP_IN is now only concerned about HTTP things.  The core filter
  is now responsible for returning data.  It is impossible to
  consolidate dechunk and http without this because HTTP_IN previously
  buffered data.  As Greg has suggested, it may make sense to write
  some brigade functions that handle input (getline).  It should be
  fairly trivial to add these.  Some of the calls in ap_http_filter
  could be switched as well.

This is the original patch as submitted to dev@httpd on Monday, Sep.
24th.  Additional comments and some minor tweaks done after that
submission are coming up next.  This should allow people who reviewed
the original patch to see what has changed and review them piecemeal.

This test passes all current tests in httpd-test.  Please perform
chicken sacrifices to verify that this hasn't blown up your favorite
input.

Reviewed by:	Greg Stein, Ryan Bloom, and Cliff Woolley (buckets)

Revision 91076 - (view) (annotate) - [select for diffs]
Modified Tue Sep 18 22:13:59 2001 UTC (8 years, 2 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41385 byte(s)
Diff to previous 91006 (colored)
Switch back to SIGUSR1 for graceful restarts on all platforms that
support it.  This defines a symbol called AP_SIG_GRACEFUL in
ap_config_auto.h which will have the appropriate signal value.  All
direct references to SIGWINCH have been replaced with AP_SIG_GRACEFUL.

On Linux 2.0, use SIGWINCH instead since SIGUSR1 is used by glibc
2.0's user-space threading library to control threads.  All later
versions of Linux/glibc don't have this problem.  (Not to mention the
security holes in older Linux versions which make it unsuitable for
use as a web server.)  If your platform doesn't have SIGUSR1, use the
appropriate mojo in configure to define what your graceful restart
signal should be.

In theory, a configure switch could be added to allow the admin to
specify the appropriate signal that should be used.  This is left
as an exercise to the reader for now.

The docs need to be updated.  Since the signal is now configurable,
just saying SIGUSR1 for graceful restart isn't completely true.  Also,
the apachectl functionality needs to be moved into httpd - this is
what Win32 does and it makes us consistent across platforms.

Roy issued a veto against use of SIGWINCH by default, so this should
resolve that veto.

Revision 91006 - (view) (annotate) - [select for diffs]
Modified Tue Sep 11 18:38:21 2001 UTC (8 years, 2 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41783 byte(s)
Diff to previous 90890 (colored)
A very small optimization to the OLD_WRITE logic.  This just makes us store
a pointer to the OLD_WRITE frec, and instead of using strcmp or strcasecmp,
we can just do a simple pointer comparison.  This optimization is also
available to other modules.

Revision 90890 - (view) (annotate) - [select for diffs]
Modified Tue Sep 4 07:59:55 2001 UTC (8 years, 2 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41745 byte(s)
Diff to previous 90394 (colored)
Fix breakage from Brian Pane's util_filter switch to hash tables.

There were some places that were expecting what you put into frec
would be what frec->name would be.  Not true anymore.

There are enough other places that were already doing the strcasecmp
that it makes more sense to just make it all strcasecmp across the
board rather than changing the UPPERCASE to lowercase.

(None of these with the exception of old_filter look to be in the
critical path anyway...)

Revision 90394 - (view) (annotate) - [select for diffs]
Modified Mon Aug 20 10:56:44 2001 UTC (8 years, 3 months ago) by bjh
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41741 byte(s)
Diff to previous 90361 (colored)
Make test for EAGAIN portable in content length filter. This fixes some
failures in CGIs on OS/2.

Revision 90361 - (view) (annotate) - [select for diffs]
Modified Sun Aug 19 16:01:05 2001 UTC (8 years, 3 months ago) by dougm
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41733 byte(s)
Diff to previous 90214 (colored)
adjust to apr_uri_ rename

Revision 90214 - (view) (annotate) - [select for diffs]
Modified Thu Aug 16 14:05:00 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41755 byte(s)
Diff to previous 90189 (colored)
We can't use a static buffer for this patch, because that wouldn't
be thread safe.
Submitted by:	Greg Marr <gregm@alum.wpi.edu>

Revision 90189 - (view) (annotate) - [select for diffs]
Modified Thu Aug 16 05:04:39 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41762 byte(s)
Diff to previous 89990 (colored)
Fix ap_rvprintf to support more than 4K of data.
Submitted by:	Cody Sherr <csherr@covalent.net>

Revision 89990 - (view) (annotate) - [select for diffs]
Modified Tue Aug 7 16:40:25 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 40583 byte(s)
Diff to previous 89987 (colored)
Back out a patch that wasn't ready for inclusion.  Thanks to OtherBill
for pointing out that this was committed when it shouldn't have been.

Revision 89987 - (view) (annotate) - [select for diffs]
Modified Tue Aug 7 16:19:03 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41001 byte(s)
Diff to previous 89869 (colored)
Remove all warnings from the input filtering stack.

Revision 89869 - (view) (annotate) - [select for diffs]
Modified Thu Aug 2 04:25:20 2001 UTC (8 years, 3 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 41002 byte(s)
Diff to previous 89780 (colored)
Add the ability to extend the methods that Apache understands
and have those methods <limit>able in the httpd.conf. It uses
the same bit mask/shifted offset as the original HTTP methods
such as M_GET or M_POST, but expands the total bits from an int to
an ap_int64_t to handle more bits for new request methods than
an int provides.
Submitted by:	Cody Sherr <csherr@covalent.net>

Revision 89780 - (view) (annotate) - [select for diffs]
Modified Mon Jul 30 04:38:02 2001 UTC (8 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 40583 byte(s)
Diff to previous 89750 (colored)
  Coexist within the XHTML changes to http_protocol.c

Revision 89750 - (view) (annotate) - [select for diffs]
Modified Sat Jul 28 00:46:49 2001 UTC (8 years, 4 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 40582 byte(s)
Diff to previous 89686 (colored)
  More obsessive changes to meet HTML 3.2, HTML 4.01 Transitional and
  XHTML 1.0 Transitional

Revision 89686 - (view) (annotate) - [select for diffs]
Modified Tue Jul 24 22:55:29 2001 UTC (8 years, 4 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 40582 byte(s)
Diff to previous 89684 (colored)
Reduce CPU consumption in conv_10 function, used to format "%d" by apr_*printf

This includes two changes to APR:
  * new functions apr_itoa, apr_ltoa, and apr_off_t_toa
    that provide itoa-type functionality based on pools
  * Inline code in inet_ntop4 to replace sprintf for converting
    binary IP addresses into dotted-decimal format

and two changes to Apache:
  * use the apr_itoa functions in setting the content length,
    in place of apr_psprintf
  * use the apr_itoa functions to replace frequent uses of
    'sprintf("%d",...)' in mod_log_config.

Submitted by: Brian Pane
Reviewed by:  Dean Gaudet, Greg Ames

Revision 89684 - (view) (annotate) - [select for diffs]
Modified Tue Jul 24 21:33:44 2001 UTC (8 years, 4 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 40614 byte(s)
Diff to previous 89508 (colored)
A couple of optimizations to the content_length filter.

Revision 89508 - (view) (annotate) - [select for diffs]
Modified Fri Jul 6 19:49:47 2001 UTC (8 years, 4 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 40669 byte(s)
Diff to previous 89503 (colored)
Grrr.. Cliff warned me about this.  APR should return APR_SUCCESS with
zero bytes read rather than APR_EOF. Will work on APR later...

Revision 89503 - (view) (annotate) - [select for diffs]
Modified Fri Jul 6 00:28:41 2001 UTC (8 years, 4 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 40664 byte(s)
Diff to previous 89501 (colored)
Reimplement content length filter to fix problem where all output from
CGI scripts was being buffered in the brigade before any of it was
written to the network. cl filter now honors flush and implements a
buffer threshold.

Revision 89501 - (view) (annotate) - [select for diffs]
Modified Thu Jul 5 14:58:03 2001 UTC (8 years, 4 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 39334 byte(s)
Diff to previous 89438 (colored)
Do non-blocking reads from pipes in the content-length filter.

Revision 89438 - (view) (annotate) - [select for diffs]
Modified Wed Jun 27 20:18:09 2001 UTC (8 years, 5 months ago) by jwoolley
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38426 byte(s)
Diff to previous 89370 (colored)
*) Account for the new pool parameter to apr_bucket_file_create()
   and apr_bucket_file_make().

*) Simplify mod_file_cache's sendfile_handler by taking advantage
   the new ability of file buckets to handle files opened in XTHREAD
   mode.  [Also inlined some of the brigade construction stuff in
   mod_file_cache's handlers to save a palloc() or two.]

Revision 89370 - (view) (annotate) - [select for diffs]
Modified Thu Jun 14 22:56:12 2001 UTC (8 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38417 byte(s)
Diff to previous 89362 (colored)
Back out the change to allocate files out of the main request pool, and
implement pool-based setaside for FILE and MMAP buckets.

Revision 89362 - (view) (annotate) - [select for diffs]
Modified Wed Jun 13 13:44:40 2001 UTC (8 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38389 byte(s)
Diff to previous 89277 (colored)
Add a pool to the ap_save_brigade prototype.  This removes a todo from
the comments that is really necessary before the setaside stuff will
work properly.

Revision 89277 - (view) (annotate) - [select for diffs]
Modified Wed Jun 6 19:30:54 2001 UTC (8 years, 5 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38371 byte(s)
Diff to previous 89252 (colored)
use apr-util's apr_date_parse_http() instead of the to-be-removed
ap_parseHTTPdate()

(proxy needs to make similar changes)

build changes forthcoming...

Submitted by:	Justin Erenkrantz

Revision 89252 - (view) (annotate) - [select for diffs]
Modified Fri Jun 1 17:26:19 2001 UTC (8 years, 5 months ago) by minfrin
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38440 byte(s)
Diff to previous 89239 (colored)
Move the addition of default AP_HTTP_HTTP_HEADER filters to the
insert_filter phase so that other filters are not bypassed by default.
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 89239 - (view) (annotate) - [select for diffs]
Modified Wed May 30 05:18:33 2001 UTC (8 years, 5 months ago) by dougm
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38654 byte(s)
Diff to previous 89198 (colored)
back out filter change that is preventing headers to be sent
PR:
Obtained from:
Submitted by: john sterling
Reviewed by:	dougm

Revision 89198 - (view) (annotate) - [select for diffs]
Modified Tue May 22 01:31:12 2001 UTC (8 years, 6 months ago) by fielding
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38440 byte(s)
Diff to previous 89196 (colored)
Moved util_uri to apr-util/uri/apr_uri, which means adding the apr_
prefix to all of the uri functions (yuck), changing some includes,
and using APR error codes instead of HTTP-specific error codes.

Other notes to test this patch:
- You need to delete the util_uri.h file - exports picks up on this.
- I'd like to remove the apr_uri.h from httpd.h, but that might
  increase the complexity of this patch even further.  Once this patch
  is accepted (in some form), then I can focus on removing apr_uri.h
  from httpd.h entirely.  I need baby steps (heh) right now.
- I imagine that this might break a bunch of stuff in Win32 or other OS
  builds with foreign dependency files.  Any help here is appreciated.

This is a start...  -- justin

Submitted by:	Justin Erenkrantz
Reviewed by:	Roy Fielding

Revision 89196 - (view) (annotate) - [select for diffs]
Modified Mon May 21 23:47:21 2001 UTC (8 years, 6 months ago) by minfrin
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38429 byte(s)
Diff to previous 89045 (colored)
Move the addition of default AP_HTTP_HTTP_HEADER filters to the insert_filter
phase so that other filters are not bypassed by default.
PR:
Obtained from:
Reviewed by:

Revision 89045 - (view) (annotate) - [select for diffs]
Modified Mon May 7 10:01:31 2001 UTC (8 years, 6 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38626 byte(s)
Diff to previous 89041 (colored)
fix the type of a parameter to ap_get_brigade()

Revision 89041 - (view) (annotate) - [select for diffs]
Modified Sun May 6 23:27:14 2001 UTC (8 years, 6 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38619 byte(s)
Diff to previous 89008 (colored)
Back out the recent change to ap_get_brigade, to make it use indirection
again.  The problem is that the amount of data read from the network,
is not necessarily the amount of data returned from the filters.  It is
possible for input filters to add bytes to the data read from the network.

To fix the original bug, I just removed the line from ap_get_client_block
that decremented r->remaining, we allow the http_filter to do that for
us.

I have also removed an incorrect comment.

Revision 89008 - (view) (annotate) - [select for diffs]
Modified Sat May 5 11:18:01 2001 UTC (8 years, 6 months ago) by gstein
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38589 byte(s)
Diff to previous 88938 (colored)
Fix a bug in the input handling. ap_http_filter() was modifying *readbytes
which corresponded to r->remaining (in ap_get_client_block). However,
ap_get_client_block was *also* adjusting r->remaining. Net result was that
PUT (and probably POST) was broken. (at least on large inputs)

To fix it, I simply removed the indirection on "readbytes" for input
filters. There is no reason for them to return data (the brigade length is
the return length). This also simplifies a number of calls where people
needed to do &zero just to pass zero.

I also added a number of comments about operations and where things could be
improved, or are (semi) broken.

Revision 88938 - (view) (annotate) - [select for diffs]
Modified Thu Apr 26 00:33:14 2001 UTC (8 years, 7 months ago) by fielding
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38521 byte(s)
Diff to previous 88912 (colored)
Removed the keptalive boolean from conn_rec because it is now only
used by a single routine and can be replaced by a local variable.

Submitted by:	Greg Stein, Ryan Bloom, Roy Fielding

Revision 88912 - (view) (annotate) - [select for diffs]
Modified Sun Apr 22 22:19:32 2001 UTC (8 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38605 byte(s)
Diff to previous 88908 (colored)
At the hack-athon we decided to change the way that input filters
determine how much data is returned to the previous filter.  Prior to this
change, we used a field in the conn_rec to determine how much to return.
After this change, we use an argument to ap_get_brigade.  This makes it
much more obvious how things work at all levels, so that module authors
can easily determine how much data is supposed to be returned to them.

Revision 88908 - (view) (annotate) - [select for diffs]
Modified Sat Apr 21 12:23:37 2001 UTC (8 years, 7 months ago) by fielding
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38614 byte(s)
Diff to previous 88885 (colored)
Revert the change that moved keepalives out of conn_rec.  That variable
controls the number of requests per connection, regardless of the protocol
used by the request.

Revision 88885 - (view) (annotate) - [select for diffs]
Modified Wed Apr 18 20:46:46 2001 UTC (8 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 33691 byte(s)
Diff to previous 88881 (colored)
Don't overwrite r->the_request.  This was causing us to never get the
request in the access_log

Revision 88881 - (view) (annotate) - [select for diffs]
Modified Wed Apr 18 03:53:34 2001 UTC (8 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 33722 byte(s)
Diff to previous 88815 (colored)
Move the keepalives field out of the conn_rec and into an HTTP specific
connection record.  This also moves some HTTP specific back out of the
core and into the HTTP module.

Revision 88815 - (view) (annotate) - [select for diffs]
Modified Wed Apr 11 23:37:16 2001 UTC (8 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 38614 byte(s)
Diff to previous 88580 (colored)
When I initially pulled the BYTERANGE filter into the core, Greg Stein
told me I was wrong.  I was wrong, and Greg was right.  This commit
just moves the byterange filter and its related functions out of the core,
and puts them back in the HTTP specific module.
Submitted by:	Greg Stein

Revision 88580 - (view) (annotate) - [select for diffs]
Modified Sun Mar 25 20:42:47 2001 UTC (8 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 51004 byte(s)
Diff to previous 88553 (colored)
Move ap_set_last_modified to the core.  This is a potentially
controversial change, because this is kind of HTTP specific.  However
many protocols should be able to take advantage of this kind of
information.  I expect that headers will need one more layer of
indirection for multi-protocol work, but this is a small step in
the right direction.

Revision 88553 - (view) (annotate) - [select for diffs]
Modified Wed Mar 21 02:20:00 2001 UTC (8 years, 8 months ago) by gregames
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50538 byte(s)
Diff to previous 88552 (colored)
back out the logging of read errors in getline.  daedalus was logging
boatloads of "(54)Connection reset by peer: ap_get_brigade() failed" errors.

Revision 88552 - (view) (annotate) - [select for diffs]
Modified Tue Mar 20 21:40:50 2001 UTC (8 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50717 byte(s)
Diff to previous 88540 (colored)
Empty out the brigade shared by ap_getline()/ap_get_client_block()
on error exit from ap_getline().  Some other code got upset because
the wrong data was in the brigade.

Revision 88540 - (view) (annotate) - [select for diffs]
Modified Mon Mar 19 21:54:57 2001 UTC (8 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50275 byte(s)
Diff to previous 88532 (colored)
Handle ap_discard_request_body() being called more than once.

Add a debug assertion to verify that c->remain is zero when a new
request starts.  ap_http_filter() does the wrong thing otherwise.

Revision 88532 - (view) (annotate) - [select for diffs]
Modified Sun Mar 18 02:33:23 2001 UTC (8 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50234 byte(s)
Diff to previous 88527 (colored)
Add a hook, create_request.  This hook allows modules to modify
a request while it is being created.  This hook is called for all
request_rec's, main request, sub request, and internal redirect.
When this hook is called, the the r->main, r->prev, r->next
pointers have been set, so modules can determine what kind of
request this is.

Currently, this is only used by the core module, but protocol modules
are going to need to have the ability to affect the request while it is
being read.

Revision 88527 - (view) (annotate) - [select for diffs]
Modified Fri Mar 16 07:28:08 2001 UTC (8 years, 8 months ago) by chuck
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50439 byte(s)
Diff to previous 88523 (colored)
This is a fix that went into v1.3 quite a while back, but not into v2.0.
It sorts out the problem when a password protected reverse proxy URL
sends a Proxy-Authenticate to a browser instead of a WWW-Authenticate.

This patch covers the changes to the httpd-2.0 tree.

Submitted by:	Graham Leggett
Reviewed by:	Chuck Murcko

Revision 88523 - (view) (annotate) - [select for diffs]
Modified Fri Mar 16 04:17:38 2001 UTC (8 years, 8 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50379 byte(s)
Diff to previous 88464 (colored)
Avoid using sscanf to determine the HTTP protocol number in
the common case because sscanf is a performance hog. From
Mike Abbot's Accelerating Apache patch number 6.

Submitted by: Mike Abbot <mja@trudge.engr.sgi.com>
Reviewed by: Bill Stoddard

Revision 88464 - (view) (annotate) - [select for diffs]
Modified Wed Mar 7 17:01:28 2001 UTC (8 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50082 byte(s)
Diff to previous 88454 (colored)
Fix content-length computation.  We ONLY compute a content-length if
We are not in a 1.1 request and we cannot chunk, and this is a keepalive
or we already have all the data.

Revision 88454 - (view) (annotate) - [select for diffs]
Modified Mon Mar 5 06:16:28 2001 UTC (8 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 50153 byte(s)
Diff to previous 88389 (colored)
Make the old_write filter use the ap_f* functions for buffering the data.
This has been tested with a couple of directory listings, but it could
probably use a bit more testing before being declared stable.

Revision 88389 - (view) (annotate) - [select for diffs]
Modified Wed Feb 28 15:13:30 2001 UTC (8 years, 8 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52175 byte(s)
Diff to previous 88341 (colored)
  Another missing AP_DECLARE mismatch

Revision 88341 - (view) (annotate) - [select for diffs]
Added Mon Feb 26 04:38:22 2001 UTC (8 years, 9 months ago) by rbb
Original Path: httpd/httpd/trunk/server/protocol.c
File length: 52163 byte(s)
Begin to move functions from the http module to the core.  The goal is to
have only functions that are HTTP specific in the http directory.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2