]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MAJOR] migrate the connection logic to stream interface
authorWilly Tarreau <w@1wt.eu>
Sun, 26 Oct 2008 19:49:47 +0000 (20:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Nov 2008 09:19:10 +0000 (10:19 +0100)
commitefb453c259e37d255cabc09991f22da8be8b5887
tree0f1d0253b31b8f696cfc195af079de97f5577079
parentd7704b5343b27a116505528a15c1ded08f44cbdb
[MAJOR] migrate the connection logic to stream interface

The connection setup code has been refactored in order to
make it run only on low level (stream interface). Several
complicated functions have been removed from backend.c,
and we now have sess_update_stream_int() to manage
an assigned connection, sess_prepare_conn_req() to assign a
server to a connection request, perform_http_redirect() to
redirect instead of connecting to server, and return_srv_error()
to return connection error status messages.

The stream_interface status changes are checked before adjusting
buffer flags, so that the buffers can be informed about this lower
level update.

A new connection is initiated by changing si->state from SI_ST_INI
to SI_ST_REQ.

The code seems to work but is awfully dirty. Some functions need
to be moved, and the layering is not yet quite clear.

A lot of dead old code has simply been removed.
include/proto/backend.h
include/proto/buffers.h
include/types/stream_interface.h
src/backend.c
src/proto_http.c