14 Commits (53337c81d40b90d3f8daab92c8419522d3a1c0fc)

Author SHA1 Message Date
Stefan Bühler b41e02860c [mod_proxy] fall back to waiting for connection close if no message length indicator is found in HTTP/1.1 response
It seems this is actually allowed by the RFCs; although it is intended
as HTTP/1.0 backward compatibility, and HTTP/1.1 servers (backends)
really should do better.

Change-Id: I93265bfe7fae57beb10d70d3a4596c5cae7b51bd
2 years ago
Stefan Bühler a41b92eb8a [core] fix segfault in http response streaming
Change-Id: I61a0167d8a7fdede96075960f5099b33c0a8ab02
4 years ago
Stefan Bühler d8bd405a19 [core] fix crash when HTTP backend "Upgrade"s
Change-Id: If7143f49baa2efa8d1fb3f78c6390969730c678e
4 years ago
Stefan Bühler d167e6e416 [core/mod_proxy] support http backends trying to run keep-alive
Even if they shouldn't (due to HTTP/1.0 or Connection; close) some
backends send HTTP/1.1 without Connection: close, and use Content-Length
to signal end of response (and don't close the connection, as they wait
for another request).

Now Content-Length is used to find the end of the response (chunked
transfer-encoding was already supported).

mod_proxy now signals HTTP/1.1, but also sends "Connection: close": it
doesn't reuse the connection yet.

Change-Id: Ica0c9b3b7da79899412a746f21e7348ccd3d23ee
4 years ago
Stefan Bühler 8643cafa22 [core] fix log level of connection: (backend) response header parsing
Change-Id: Idd8263ccf19bf60df10cf22fa8c7037615171c35
4 years ago
Stefan Bühler 535f6b4afb [streams] improve stream handling, hopefully fixes bug with lingering backend connections
- reset backend_source before backend_drain; first tell the backend we
  are not interested in data anymore, then force closing the outgoing
- as backend_drain might get reopened for a Connection: upgrade, the
  backend cannot rely on backend_drain->out.is_closed, but waits for a
  disconnect (which will also release the last reference).  the same is
  done for backend_source, so a backend can just wait for both reference
  counts to drop to zero before actually closing the backend connection
  (unless it keeps the streams alive itself).

Change-Id: Ibfe7985debd71580dbb78b985abaf946f59e3024
8 years ago
Stefan Bühler 5e4a94b0c6 [core] handle Connection: Upgrade 10 years ago
Stefan Bühler 5e0a58be53 [stream-http-response] support chunk encoded responses 10 years ago
Stefan Bühler 7a01f69b89 fix connection is_closed handling (never close raw_out, never close con->out.source->out) 10 years ago
Stefan Bühler 914f79650a fix connection handling with chunked responses 10 years ago
Stefan Bühler cfd8955008 [common] implement libev wrapper
* need a way to mark a watcher as "don't keep the loop alive"
10 years ago
Stefan Bühler c450fa82a5 [core] implement streams on chunkqueues 10 years ago
Stefan Bühler 6a33c93231 Revert "[core] implement streams on chunkqueues"
- accidental push, patch not finished yet

This reverts commit 74ce55c860.
10 years ago
Stefan Bühler 74ce55c860 [core] implement streams on chunkqueues 10 years ago