summaryrefslogtreecommitdiffstats
path: root/include/http_connection.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *) core: adding a new hook and method to the API:Stefan Eissing2022-03-181-0/+25
| | | | | | | | | | | | | | | | | create_secondary_connection and ap_create_secondary_connection() to setup connections related to a "master" one, as used in the HTTP/2 protocol implementation. *) mod_http2: using the new API calls to get rid of knowledge about how the core handles conn_rec specifics. Improvements in pollset stream handling to use less sets. Using atomic read/writes instead of volatiles now. Keeping a reserve of "transit" pools and bucket_allocs for use on secondary connections to avoid repeated setup/teardowns. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899032 13f79535-47bb-0310-9956-ffa450edef68
* In case one of the pre_connection hooks causes the hook run to stop by an errorRuediger Pluem2021-09-211-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | the pre_connection hook of the core module maybe did not run (it is APR_HOOK_REALLY_LAST) and hence we missed to - Put the socket in c->conn_config - Setup core output and input filters - Set socket options and timeouts For calls of ap_run_pre_connection where this matters create a wrapper named ap_pre_connection that ensures that this happens. * include/ap_mmn.h: Bump minor version as we added new ap_pre_connection function. * include/http_connection.h: Declare ap_pre_connection prototype. * server/connection.c: Make use of ap_pre_connection in ap_process_connection. * server/core.c: Implement ap_pre_connection. * server/mpm/event/event.c: Make use of ap_pre_connection. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893497 13f79535-47bb-0310-9956-ffa450edef68
* core: Add ap_create_connection() to create a server or client/proxy connection.Yann Ylavic2021-09-091-0/+22
| | | | | | | | | | | | | | | | | | | | | | c->outgoing shouldn't be set by mod_ssl, ap_create_connection() allows that and this commit also replaces all the calls to ap_run_create_connection() in mod_proxy modules (not in the MPMs which create incoming connections only). * include/http_connection.h, server/connection.c: Declare and implement ap_create_connection(). * modules/proxy/proxy_util.c, modules/proxy/mod_proxy_connect.c, modules/proxy/mod_proxy_ftp.c: Use ap_create_connection() instead of ap_run_create_connection(), and don't provide a connection_id a scoreboard handle for outgoing connection. * server/log.c(do_errorlog_default): Use c->outgoing instead of c->sbh to determine if it's a "client" or "remote" connection. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893184 13f79535-47bb-0310-9956-ffa450edef68
* new hook pre_close_connectionStefan Eissing2016-01-271-0/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1727071 13f79535-47bb-0310-9956-ffa450edef68
* Fix comment.Christophe Jaillet2014-07-191-5/+1
| | | | | | Remove @file and @brief from within the @defgroup to be consistenbt with doxygen comments from other files. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1611919 13f79535-47bb-0310-9956-ffa450edef68
* mpm_event[opt]: Send the SSL close notify alert when the KeepAliveTimeoutYann Ylavic2014-06-081-0/+9
| | | | | | | expires. PR54998. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601185 13f79535-47bb-0310-9956-ffa450edef68
* Fix URL in doxygen comment.Christophe Jaillet2014-06-031-2/+2
| | | | | | Previous link was broken. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599799 13f79535-47bb-0310-9956-ffa450edef68
* More cleanup: Expand tabs and some more indentation fixesStefan Fritsch2011-09-231-1/+1
| | | | | | | No functional change git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup effort in prep for GA push:Jim Jagielski2011-09-231-7/+7
| | | | | | | | Trim trailing whitespace... no func change git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
* Some improvements for handling of many connections for MPM event:Stefan Fritsch2011-06-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Process lingering close asynchronously instead of tying up worker threads (based on patch by Jeff Trawick). - If the number of connections of a process is above threads_per_child + WORKER_OVERCOMMIT * (idle_workers - 1) (WORKER_OVERCOMMIT is fixed at 2, at the moment), or if all workers are busy, don't accept new connections in that process. Such a dynamic connection limit is necessary because we may have both async and non-async (ssl) connections. WORKER_OVERCOMMIT should be a config option. - Don't count idle workers of not-accepting processes against MinSpareThreads, so that the parent will spawn new processes when necessary. - If we receive a keep-alive request while all workers are busy, don't block but close the connection immediately so that the client will re-connect to a different process. Related changes: - Log what is going on at trace loglevels. - Remove the bypass_push poll type flag, this code cannot be hit anymore (if it ever could?). - Add some macro helpers for dealing with timeout queues. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137358 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup... most don't need apr_hooks.h at all...Jim Jagielski2011-05-091-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101067 13f79535-47bb-0310-9956-ffa450edef68
* Remove CORE_PRIVATE.Paul Querna2008-04-071-2/+0
| | | | | | | | | | | This define serves no modern purpose, since every module in the wild, including our own define it, for no purpose. If you have functions which you do not want in the 'public' API, put them in a private header, that is not installed, just like mod_ssl does. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645412 13f79535-47bb-0310-9956-ffa450edef68
* update license header textRoy T. Fielding2006-07-111-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
* Update the copyright year in all .c, .h and .xml filesColm MacCarthaigh2006-04-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
* Doxygen fixup / cleanupIan Holsman2005-08-291-9/+20
| | | | | | | | | submited by: Neale Ranns neale ranns.org reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 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
* Send the 'Close Alert' message to the peer upon closing a SSL session. ThisMadhusudan Mathihalli2004-02-281-0/+28
| | | | | | | | | | | required creating a new EOC (End-Of-Connection) bucket type to notify mod_ssl that the connection is about to be closed. Reviewed by: Joe Orton, Justin Erenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102793 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-071-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102548 13f79535-47bb-0310-9956-ffa450edef68
* apply Apache License, Version 2.0André Malo2004-02-061-49/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 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
* finished that boring job:André Malo2003-02-031-1/+1
| | | | | | | | | update license to 2003. Happy New Year! ;-)) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
* BUCKET FREELISTSCliff Woolley2002-03-291-1/+3
| | | | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.Roy T. Fielding2002-03-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
* Remove the install_transport_filters hook. The same function can beRyan Bloom2002-02-051-16/+10
| | | | | | | | | 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-18/+22
| | | | | | | 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-1/+15
| | | | | | | | | | | | 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-16/+11
| | | | | | | | 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
* Change core code to allow an MPM to set hard thread/serverJeff Trawick2001-12-181-1/+2
| | | | | | | 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-1/+1
| | | | | | | | | | | 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-1/+1
| | | | | | | Submitted by: Greg Stein git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91913 13f79535-47bb-0310-9956-ffa450edef68
* Remove ap_new_connection from the header. I missed this when I removedRyan Bloom2001-11-131-11/+0
| | | | | | | | the function. Submitted by: Brad Nicholes <BNICHOLES@novell.com> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91911 13f79535-47bb-0310-9956-ffa450edef68
* Back out my last patch. The logic to add sockets to pollsets is back inRyan Bloom2001-11-131-2/+0
| | | | | | | the MPM git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91906 13f79535-47bb-0310-9956-ffa450edef68
* This allows modules to add socket descriptors to the pollset. I haveRyan Bloom2001-11-131-0/+2
| | | | | | | | 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
* Add docs for the newest hook.Ryan Bloom2001-11-131-1/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91892 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup some code that was created during the abstration. This basicallyRyan Bloom2001-11-131-9/+1
| | | | | | | | 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-0/+13
| | | | | | | | | | | 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-0/+16
| | | | | | | | | 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-16/+0
| | | | | | | | | | | 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
* Doc formatting fixesWilliam A. Rowe Jr2001-07-271-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89749 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-15/+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
* ap_new_connection() returns NULL if an error occurred (prefork MPMJeff Trawick2001-02-051-0/+1
| | | | | | | | | | | and ap_new_connection() were changed last week) I have skipped putting the change into WinNT MPM and mod_proxy. I left a note in the mod_proxy code; for the NT MPM I think I can talk somebody into doing the right thing for me. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87982 13f79535-47bb-0310-9956-ffa450edef68
* fix minor prototype inconsistencies noticed with C::ScanDoug MacEachern2001-02-041-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87970 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-1/+1
| | | | | | | | 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
* Get rid of ap_new_apr_connection(). ap_new_connection() now hasJeff Trawick2000-12-041-16/+1
| | | | | | | | | | | | | 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
* Fix some incorrect docsRyan Bloom2000-11-281-2/+2
| | | | | | | Submitted by: Jon Travis <jtravis@covalent.net> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87098 13f79535-47bb-0310-9956-ffa450edef68