summaryrefslogtreecommitdiff
path: root/server/protocol.c
Commit message (Collapse)AuthorAgeFilesLines
* Refactoring of ap_read_request() to store partial request stateBrian Pane2005-12-311-267/+280
| | | | | | | | | in the request rec. The point of this is to allow asynchronous MPMs do do nonblocking reads of requests. (Backported from the async-read-dev branch) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@360461 13f79535-47bb-0310-9956-ffa450edef68
* * server/protocol.c (ap_old_write_filter): Use NULL for the NULLJoe Orton2005-12-161-1/+1
| | | | | | | pointer not 0. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357170 13f79535-47bb-0310-9956-ffa450edef68
* Fix for Bug 37790 (hangs on error return from post_read_request)Nick Kew2005-12-051-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354085 13f79535-47bb-0310-9956-ffa450edef68
* No functional Change: Removing trailing whitespace. This alsoJim Jagielski2005-11-101-37/+37
| | | | | | | | means that "blank" lines consisting of just spaces or tabs are now really blank lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
* keep the proxied Content-Length header for a HEAD response. PR 18757Greg Ames2005-10-201-1/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327008 13f79535-47bb-0310-9956-ffa450edef68
* NET_TIME, as a standalone feature, was a horrid idea.William A. Rowe Jr2005-10-061-0/+21
| | | | | | | | | | | | | | | | | | | 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. Note #1; 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@306495 13f79535-47bb-0310-9956-ffa450edef68
* Pay close attention to core_create_req() ... and noteWilliam A. Rowe Jr2005-10-051-0/+5
| | | | | | | | | | | | 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). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@295141 13f79535-47bb-0310-9956-ffa450edef68
* * server/protocol.c (ap_read_request): Remove the Content-LengthJoe Orton2005-06-231-10/+7
| | | | | | | | | | header if any Transfer-Encoding header is present, regardless of value. Reviewed by: Paul Querna, Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@193122 13f79535-47bb-0310-9956-ffa450edef68
* if Transfer-Encoding is not "identity" ignore Content-Length.Jean-Frederic Clere2005-06-171-1/+1
| | | | | | | otherwise ajp-proxy hangs when Transfer-Encoding is "chunked". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@191175 13f79535-47bb-0310-9956-ffa450edef68
* If a request contains both a T-E and C-L, remove the C-L, stopping some HTTP ↵Paul Querna2005-06-161-0/+12
| | | | | | Request Smuggling attacks exploited when using HTTPD as a forward or reverse proxy. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@191005 13f79535-47bb-0310-9956-ffa450edef68
* * server/protocol.c (read_request_line): Revert addition of errorJoe Orton2005-05-161-4/+0
| | | | | | | | message which triggers every time dummy_connection() is used to wake up a child. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170433 13f79535-47bb-0310-9956-ffa450edef68
* Support the suppress-error-charset setting, as with Apache 1.3.x.Jeff Trawick2005-05-161-0/+7
| | | | | | | | | | | | | | 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170354 13f79535-47bb-0310-9956-ffa450edef68
* use a more general but slightly slower test for a body.Greg Ames2005-04-081-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160573 13f79535-47bb-0310-9956-ffa450edef68
* clone_headers_no_body: remove all entity headers in addition to the Greg Ames2005-03-291-2/+8
| | | | | | | | Transfer-Encoding header when creating a GET subrequest git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@159410 13f79535-47bb-0310-9956-ffa450edef68
* don't propagate input headers describing a body to a subrequest. this can ↵Greg Ames2005-03-231-1/+24
| | | | | | | | | cause a back end server to hang in a read for a body which no longer exists. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@158798 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
* limit_req_fieldsize is signed, correct a signedness error usingWilliam A. Rowe Jr2005-01-051-1/+1
| | | | | | | a cast since it's not possible to have a negative limit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124283 13f79535-47bb-0310-9956-ffa450edef68
* FINALLY Correct ap_http_method()! It is NOT a method, it's a SCHEME!William A. Rowe Jr2005-01-021-3/+3
| | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@123882 13f79535-47bb-0310-9956-ffa450edef68
* Revert patch r104923. This patch doesn't actually fix bug 18757 andBradley Nicholes2004-12-071-4/+1
| | | | | | | | breaks TLS upgrade functionality. Also, removing the content length for HEAD requests is being handled in ap_http_header_filter(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@110141 13f79535-47bb-0310-9956-ffa450edef68
* Fix for memory consumption DoS, CVE CAN-2004-0942:Joe Orton2004-11-041-47/+22
| | | | | | | | | | | | | * 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105680 13f79535-47bb-0310-9956-ffa450edef68
* Use a more descriptive error message, and make it an INFO insteead of NOTICE.Paul Querna2004-10-251-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105593 13f79535-47bb-0310-9956-ffa450edef68
* PR: 31875Nick Kew2004-10-251-0/+10
| | | | | | | Fix URI parsing bug in case of a leading double-slash git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105586 13f79535-47bb-0310-9956-ffa450edef68
* This will put some messages in the error log when some people try a lamePaul Querna2004-10-251-1/+4
| | | | | | | | | | | | | | | | 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> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105583 13f79535-47bb-0310-9956-ffa450edef68
* veto and revert win64 patch: 64bit changes must percolate from theRoy T. Fielding2004-10-231-7/+7
| | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105572 13f79535-47bb-0310-9956-ffa450edef68
* WIN64: API changes to clean up Windows 64bit compile warningsAllan K. Edwards2004-10-221-7/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105545 13f79535-47bb-0310-9956-ffa450edef68
* * server/protocol.c (ap_rgetline_core): Never NUL terminate atJoe Orton2004-09-211-3/+3
| | | | | | | | | (*s)[-1] for caller-supplied *s. Submitted by: Rici Lake <ricilake speedy.com.pe> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105231 13f79535-47bb-0310-9956-ffa450edef68
* * server/protocol.c (ap_rgetline_core): Fix off-by-one.Joe Orton2004-09-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105113 13f79535-47bb-0310-9956-ffa450edef68
* Fix for Bug 18757 (sending bogus content-length of zero in no-body requests)Nick Kew2004-09-011-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104923 13f79535-47bb-0310-9956-ffa450edef68
* Fix signedness emit.William A. Rowe Jr2004-08-121-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104639 13f79535-47bb-0310-9956-ffa450edef68
* CAN-2004-0493 - memory exhaustion denial of serviceJeff Trawick2004-06-281-0/+17
| | | | | | | Reviewed by: jerenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104059 13f79535-47bb-0310-9956-ffa450edef68
* ap_rgetline_core: insure that the output string is null terminatedGreg Ames2004-04-221-0/+11
| | | | | | | | | when exiting with APR_ENOSPC Submitted by: Tsurutani Naoki <turutani scphys.kyoto-u.ac.jp> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103482 13f79535-47bb-0310-9956-ffa450edef68
* ap_set_sub_req_protocol and ap_finalize_sub_req_protocol are nowAndré Malo2004-04-211-2/+3
| | | | | | | | | | exported on Win32 as well PR: 28523 Submitted by: Edward Rudd <eddie omegaware.com> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103474 13f79535-47bb-0310-9956-ffa450edef68
* *) Remove compile-time length limit on request strings. Length isPaul J. Reder2004-03-011-14/+13
| | | | | | | | now enforced solely with the LimitRequestLine config directive. [Paul J. Reder] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102840 13f79535-47bb-0310-9956-ffa450edef68
* fix name of The Apache Software FoundationAndré Malo2004-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
* fix copyright dates according to the first check inAndré Malo2004-02-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102589 13f79535-47bb-0310-9956-ffa450edef68
* apply Apache License, Version 2.0André Malo2004-02-061-53/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
* * server/protocol.c (ap_rgetline_core): Fix folding if header isJoe Orton2004-01-261-0/+1
| | | | | | | | | continued over more than two lines. PR: 19405 (affects proxy only) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102414 13f79535-47bb-0310-9956-ffa450edef68
* * server/protocol.c (ap_rgetline_core): Re-indent function after beingJoe Orton2004-01-261-148/+143
| | | | | | | skewed by CAN-2003-0132 fix: no functional change. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102413 13f79535-47bb-0310-9956-ffa450edef68
* update license to 2004.André Malo2004-01-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
* get rid of _FOREACHCliff Woolley2003-11-161-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101788 13f79535-47bb-0310-9956-ffa450edef68
* Set the scoreboard state to indicate logging prior to runningJeff Trawick2003-10-221-0/+7
| | | | | | | | logging hooks so that server-status will show 'L' for hung loggers instead of 'W'. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101517 13f79535-47bb-0310-9956-ffa450edef68
* tag the pools created for requests and subrequestsJeff Trawick2003-10-131-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101441 13f79535-47bb-0310-9956-ffa450edef68
* zap an incorrect comment that remained from 1.3 daysJeff Trawick2003-09-101-4/+0
| | | | | | | | Submitted by: Aryeh Katz Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101211 13f79535-47bb-0310-9956-ffa450edef68
* minor style changesJeff Trawick2003-07-121-7/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100562 13f79535-47bb-0310-9956-ffa450edef68
* Update comment after removal of tmp_headers in r1.132.Joe Orton2003-07-111-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100550 13f79535-47bb-0310-9956-ffa450edef68
* Update the header token parsing code to allow LWS between the token wordPaul J. Reder2003-07-081-1/+18
| | | | | | | | | | | 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] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100492 13f79535-47bb-0310-9956-ffa450edef68
* Eliminate creation of a temporary table in ap_get_mime_headers_core()Brian Pane2003-06-221-6/+2
| | | | | | | | Submitted by: Joe Schaefer <joe+gmane@sunstarsys.com> Reviewed by: Brian Pane git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100334 13f79535-47bb-0310-9956-ffa450edef68
* fix some discrepancies between format strings and arguments,Jeff Trawick2003-04-151-3/+3
| | | | | | | resolving some warnings on 64-bit systems git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99374 13f79535-47bb-0310-9956-ffa450edef68
* Simplify and shorten the code path for scanning request headersBrian Pane2003-03-291-81/+31
| | | | | | | Reviewed by: Greg Ames, Bill Rowe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99109 13f79535-47bb-0310-9956-ffa450edef68
* ap_rgetline_core: set the number of bytes read & copied into the caller'sGreg Ames2003-03-271-0/+3
| | | | | | | | | | | 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99079 13f79535-47bb-0310-9956-ffa450edef68