summaryrefslogtreecommitdiffstats
path: root/server/connection.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Sander's Stylistic SubmissionIan Holsman2002-03-051-15/+16
| | | | | | | | | | | (de-tab) PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93717 13f79535-47bb-0310-9956-ffa450edef68
* Remove the install_transport_filters hook. The same function can beRyan Bloom2002-02-051-8/+3
| | | | | | | | | acheived with the pre_connection hook. I have added the socket to the pre_connection phase to make this possible. Reviewed by: Bill Stoddard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93259 13f79535-47bb-0310-9956-ffa450edef68
* Reintroduce the create_connection hook. This hook is required to enableBill Stoddard2002-02-011-40/+6
| | | | | | | modules to completely take over all network i/o from the core. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93171 13f79535-47bb-0310-9956-ffa450edef68
* This patch restores most of Ryan's patch (11/12/2001) to remove theBill Stoddard2002-01-291-13/+7
| | | | | | | | | | | | client_socket from the conn_rec. Diffs from Ryan's patch include: - rename the create_connection hook to install_transport_filters - move the point of invocation of the hook till after the call to after ap_update_vhost_given_ip to enable the hook to use vhost config info in its decision making. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93087 13f79535-47bb-0310-9956-ffa450edef68
* Remove the create_connection hook and put the client_socket back into theBill Stoddard2002-01-271-5/+49
| | | | | | | | conn_rec. The create_connection_hook has a design flaw that prevents it from making decisions based on vhost information. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93050 13f79535-47bb-0310-9956-ffa450edef68
* The connection can be aborted in the preconnection hook. If that happens,Bill Stoddard2001-12-231-2/+3
| | | | | | | there is no need to run the process_connection hook. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92580 13f79535-47bb-0310-9956-ffa450edef68
* Change core code to allow an MPM to set hard thread/serverJeff Trawick2001-12-181-3/+3
| | | | | | | limits at startup. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92512 13f79535-47bb-0310-9956-ffa450edef68
* Pull lingering close out of the pool cleanup phase. This was causing tooRyan Bloom2001-11-151-18/+23
| | | | | | | | | | | many bugs. Instead, it is called where it used to be called. I have abstracted some of the logic out of the lingering close so that it gets the socket from the connection using the core's conn_config vector. This is in anticipation of a change to use a hook for the lingering close, which I hope to do soon. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91968 13f79535-47bb-0310-9956-ffa450edef68
* Add the server_rec argument back to the create_connection hook.Ryan Bloom2001-11-131-2/+2
| | | | | | | Submitted by: Greg Stein git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91913 13f79535-47bb-0310-9956-ffa450edef68
* Back out my last patch. The logic to add sockets to pollsets is back inRyan Bloom2001-11-131-4/+0
| | | | | | | the MPM git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91906 13f79535-47bb-0310-9956-ffa450edef68
* Whoops, wrong variable.Ryan Bloom2001-11-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91902 13f79535-47bb-0310-9956-ffa450edef68
* I accidentally removed these lines. Thank to Greg for catching this.Ryan Bloom2001-11-131-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91901 13f79535-47bb-0310-9956-ffa450edef68
* This allows modules to add socket descriptors to the pollset. I haveRyan Bloom2001-11-131-0/+4
| | | | | | | | only added this to the perfork MPM, and the others work without it. Tomorrow I will add it to the other MPMs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91899 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup some code that was created during the abstration. This basicallyRyan Bloom2001-11-131-50/+2
| | | | | | | | takes the old ap_new_connection, and puts into the new core_create_conn function. There is no good reason to have two functions to do this. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91890 13f79535-47bb-0310-9956-ffa450edef68
* Begin to abstract out the underlying transport layer.Ryan Bloom2001-11-131-20/+22
| | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91887 13f79535-47bb-0310-9956-ffa450edef68
* Fix the Windows MPM. Windows doesn't always use the lingering closeRyan Bloom2001-11-101-1/+1
| | | | | | | | | function. If it can re-use the socket, we are better off not calling the function. To fix this, we re-expose the lingering_close function, and we allow the MPM to remove the cleanup. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91839 13f79535-47bb-0310-9956-ffa450edef68
* Remove ap_lingering_close from all of the MPMs. This is now done asRyan Bloom2001-11-101-3/+7
| | | | | | | | | | | a cleanup registered with the connection_pool. I have also turned ap_lingering_close into a static function, because it is only used in connection.c. This is the next step to consolidating all of the socket function calls. ap_lingering_close will only be added if the core is dealing with a standard socket. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91832 13f79535-47bb-0310-9956-ffa450edef68
* The read() in apr_recv() would always be called first and return EAGAIN.Bill Stoddard2001-07-311-0/+1
| | | | | | | | This one change to eliminate the read unless there are really bytes to read is good for a 7 to 9% performance boost on AIX. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89809 13f79535-47bb-0310-9956-ffa450edef68
* scratch an old itch - give lingering close its own state in the scoreboard.Greg Ames2001-07-121-0/+2
| | | | | | | clean up SERVER_ACCEPTING and SERVER_QUEUEING (never set) while I'm at it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89542 13f79535-47bb-0310-9956-ffa450edef68
* Add the AP_DECLARE()/AP_CORE_DECLARE macros on the return types ofChuck Murcko2001-05-111-1/+1
| | | | | | | | | functions used by mod_proxy for export in DLL Submitted by: Ian Holsman <IanH@cnet.com> Reviewed by: Chuck murcko git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89078 13f79535-47bb-0310-9956-ffa450edef68
* Move more code from the http module into the core server. ThisRyan Bloom2001-03-041-42/+0
| | | | | | | | | | | | | | is core code, basically the default handler, the default input and output filters, and all of the core configuration directives. All of this code is required in order for the server to work, with or without HTTP. The server is closer to working without the HTTP module, although there is still more to do. I tried to fix Windows, but somebody should probably make sure I did it correctly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88449 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright to 2001Roy T. Fielding2001-02-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
* Move the call to set the socket timeout outside the loop.Bill Stoddard2001-02-141-1/+1
| | | | | | | ve : git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88168 13f79535-47bb-0310-9956-ffa450edef68
* Fix lingering close (and make it more efficient). We were blocking onBill Stoddard2001-02-141-14/+12
| | | | | | | | | | | | | apr_read() for 30 seconds for each lingering close. What we want to do is block for 2 seconds. If we do not read any bytes from the client in that time, close the connection. If we do read bytes, then wait 2 more seconds to see if more arrive, etc. Repeat for MAX_SECS_TO_LINGER if needed. This should clear the way to get 2.0 running on apache.org! git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88167 13f79535-47bb-0310-9956-ffa450edef68
* Start getting extended status working again.Bill Stoddard2001-02-141-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88151 13f79535-47bb-0310-9956-ffa450edef68
* This is the wrong place to mark the server ready. Servers need to be marked ↵Bill Stoddard2001-02-131-1/+0
| | | | | | | | | | ready in the MPM -after- lingering close processing. This could be playing havoc with perform_idle_server_maintenance. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88125 13f79535-47bb-0310-9956-ffa450edef68
* Begin to move the code that updates the child status out of the MPMs andRyan Bloom2001-02-121-0/+3
| | | | | | | | into the main-line code. This ensures that all MPMs can easily forget about updating their status. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88117 13f79535-47bb-0310-9956-ffa450edef68
* *) continued header revampingGreg Stein2001-02-101-8/+3
| | | | | | | *) torch some headers (and some libs) from the autoconf stuff git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88061 13f79535-47bb-0310-9956-ffa450edef68
* renaming various functions for consistency sakeDoug MacEachern2001-02-081-17/+17
| | | | | | | | | | | see: http://apr.apache.org/~dougm/apr_rename.pl PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
* Bring mod_status for 2.0 back in line with mod_status for 1.3. This isRyan Bloom2001-02-011-5/+6
| | | | | | | | | | | | | | | | basically a straight port of the 1.3 module to 2.0. The MPMs need to be modified a bit to work with mod_status, but prefork, mpmt_pthread, and dexter have already been changed. I will fix perchild tonight. There is a lot of common code that can be abstracted, and there seems to be a small bug with regard to what mpmt_pthread and dexter report as current connections. ExtendedStatus does work again, although until the bug mentioned above is fixed, it isn't as useful on mpmt_pthread and dexter. Next week, I will look at allowing other modules to add data to the STATUS page and possibly to the scoreboard itself. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87949 13f79535-47bb-0310-9956-ffa450edef68
* handle a TCP connection reset between the time we accept the connectionJeff Trawick2001-02-011-2/+16
| | | | | | | | | and when apr_get_sockaddr() does getsockname() or getpeername() this change will be rolled into the other MPMs later git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87947 13f79535-47bb-0310-9956-ffa450edef68
* The fast fix to get FirstBill back out of the gate. It brings up anWilliam A. Rowe Jr2001-01-191-1/+1
| | | | | | | issue I'll address to the list. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87748 13f79535-47bb-0310-9956-ffa450edef68
* By popular reviewWilliam A. Rowe Jr2001-01-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87739 13f79535-47bb-0310-9956-ffa450edef68
* The big change. This is part 3 of the apr-util symbols rename, pleaseWilliam A. Rowe Jr2001-01-191-8/+8
| | | | | | | | see the first commit of srclib/apr-util/include (cvs apr-util/include) for the quick glance at symbols changed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
* Simplify the lingering close logic a bit. Doesn't actually changeRyan Bloom2001-01-021-5/+3
| | | | | | | anything, this just removes a duplicate call to ap_flush_conn. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87567 13f79535-47bb-0310-9956-ffa450edef68
* The local_addr and remote_addr fields in the conn_rec are nowJeff Trawick2000-12-141-7/+4
| | | | | | | | apr_sockaddr_t * instead of sockaddr_in. This is a small step towards IPv6 support. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87342 13f79535-47bb-0310-9956-ffa450edef68
* Get rid of ap_new_apr_connection(). ap_new_connection() now hasJeff Trawick2000-12-041-18/+3
| | | | | | | | | | | | | fewer parameters: the local and remote socket addresses were removed from the parameter list because all required information is available via the APR socket. I haven't tested the most important part -- the WinNT MPM changes -- but it compiles and it looks okay :) If the WinNT MPM works on Win98 these days let me know. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87181 13f79535-47bb-0310-9956-ffa450edef68
* Stop referencing apr_get_socket_inaddr(), apr_get_remote_name(), andJeff Trawick2000-12-011-4/+5
| | | | | | | apr_get_local_name(). They have been removed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87147 13f79535-47bb-0310-9956-ffa450edef68
* updates to changed interfaces to apr_set_port(), apr_get_port(),Jeff Trawick2000-11-211-2/+5
| | | | | | | apr_set_ipaddr(), and apr_get_ipaddr() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87050 13f79535-47bb-0310-9956-ffa450edef68
* Clean up some timeout arg warningsWilliam A. Rowe Jr2000-11-181-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87006 13f79535-47bb-0310-9956-ffa450edef68
* Change the code to reflect the recent API changes...David Reid2000-11-091-2/+2
| | | | | | | | Alter http_vhost.c to use the new apr_get_inaddr fucntion. Old code is still there just in case it breaks. can someone check it who knows this stuff? git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86890 13f79535-47bb-0310-9956-ffa450edef68
* Remove BUFF from the main server. :-) The buff code needs to remain asRyan Bloom2000-11-091-3/+0
| | | | | | | a part of the server until the proxy is purged of BUFF however. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86878 13f79535-47bb-0310-9956-ffa450edef68
* Convert a lot of apr_ssize_t to apr_size_t. We don't ever accept or returnRyan Bloom2000-11-071-1/+1
| | | | | | | | | | signed values in these integers, and we return the error codes directly, so we should always report the number of bytes read/written correctly. If we have an error, that is 0 bytes. If that is true, then using signed values doesn't make any sense. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86857 13f79535-47bb-0310-9956-ffa450edef68
* We don't really want to fool around with socket structures if we don't have to,David Reid2000-11-031-5/+2
| | | | | | | | | and in this case we can get the ip address directly from the socket. This should mean that if we add more protocol support we don't have to worry about this. No doubt this is the first of many such changes... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86817 13f79535-47bb-0310-9956-ffa450edef68
* Fix a buglet in the APR-ization of ap_lingering_close() -- use APR_SO_TIMEOUTJeff Trawick2000-11-011-2/+3
| | | | | | | instead of BO_TIMEOUT. (We were actually setting a different socket option.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86785 13f79535-47bb-0310-9956-ffa450edef68
* Make lingering close access the socket directly, instead of relying onRyan Bloom2000-10-231-9/+19
| | | | | | | | BUFF. This has been tested, but all we can determine is that it doesn't fail, not that it works. This needs to be tested much better. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86709 13f79535-47bb-0310-9956-ffa450edef68
* Get rid of a couple of buff-isms -- setting the B_EOUT flag in a coupleJeff Trawick2000-10-221-3/+2
| | | | | | | of places and doing ap_bread() in ap_lingering_close. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86700 13f79535-47bb-0310-9956-ffa450edef68
* Change some of the BUFF calls to direct calls to the socket.Ryan Bloom2000-10-191-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86666 13f79535-47bb-0310-9956-ffa450edef68
* This begins to remove BUFF from the server. The idea is to go very slowlyRyan Bloom2000-10-181-4/+8
| | | | | | | | | | | with this. To begin with, we store both the socket and the BUFF in the conn_rec. Functions are free to use which ever they want, in the end all of the data goes to the same place. This modifies all of the MPMs except Windows. All of the Unix MPMs are working, but the others need to be tested. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86651 13f79535-47bb-0310-9956-ffa450edef68
* Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbolsWilliam A. Rowe Jr2000-10-161-1/+1
| | | | | | | | | | for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper) and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE. All _VAR_ flavors changes to _DATA to be absolutely clear. Thank you Greg, for the most obvious suggestion. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68