Michael Friedrich
59b95ed1f0
Quality: Replace deprecated get_io_service() with get_executor().context() for Boost ASIO
...
refs #7041
2019-05-29 14:36:10 +02:00
Michael Friedrich
f177d8786d
HttpServerConnection: Log the user agent field for new requests too
...
refs #7041
2019-04-05 15:08:09 +02:00
Alexander A. Klimov
2e5af2922b
/v1/events: terminate on disconnect
2019-04-03 09:59:45 +02:00
Alexander A. Klimov
28d46052b0
HttpServerConnection#StartStreaming(): auto-detect disconnection
2019-04-03 09:50:52 +02:00
Alexander A. Klimov
c284cf0b68
HttpServerConnection: encapsulate streaming start indicator
2019-04-02 17:37:29 +02:00
Alexander A. Klimov
3a6caa2800
Respect Accept:application/json where possible
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
24c9542b5b
HttpServerConnection: fix side effect of HTTP parser's default body limit
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
5b2c1f023d
Rename preventGc to keepAlive
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
e129c561d5
HttpServerConnection: don't disconnect during sending response
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
87b0c452db
HttpServerConnection: re-add automatic disconnect
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
f029fd4884
Re-add HttpServerConnection#Disconnect()
2019-04-01 13:31:16 +02:00
Alexander A. Klimov
493a97f4f3
EnsureAcceptHeader(): fix wrong condition
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
fd239ba3fe
Adjust /v1/events, too
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
9ae1d732af
HttpServerConnection: actually handle requests
2019-04-01 11:40:14 +02:00
Alexander A. Klimov
7fe0431ada
HttpServerConnection: verify requests via Boost ASIO + Beast
2019-04-01 11:40:14 +02:00
Michael Friedrich
d14a88235d
Replace Copyright header with a short version, part I
...
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Alexander A. Klimov
f4ab0737d1
HttpServerConnection#DataAvailableHandler(): reduce log spam
2019-01-07 15:32:19 +01:00
Michael Friedrich
b58ce84b0e
Merge pull request #6817 from Icinga/bugfix/stalled-tls-connections-6816
...
HttpServerConnection#DataAvailableHandler(): be aware of being called multiple times concurrently
2018-12-05 11:35:35 +01:00
Alexander A. Klimov
7e630c7732
HttpServerConnection#DataAvailableHandler(): be aware of being called multiple times concurrently
...
refs #6816
2018-12-03 19:05:41 +01:00
Sven Wegener
a83dbc9de5
Restore 'Connection: close' behaviour in HTTP responses
...
Actually the `corked` functionality caused problems with
not closing connections properly.
Full Analysis: https://github.com/Icinga/icinga2/issues/6799#issuecomment-443710338
Full credits to @swegener :)
fixes #6799
2018-12-03 14:27:37 +01:00
Michael Friedrich
5406ce6540
Ensure that API/JSON-RPC messages in the same session are processed and not stalled
...
This basically drops the "corked" implementation which just stalled the
TLS IO polling after some requests. If you need sort of rate limiting
for these events, use an external TLS proxy which terminates that in front
of Icinga.
fixes #6635
2018-10-29 12:57:24 +01:00
Michael Friedrich
bd8e9f55da
Merge pull request #6662 from Icinga/bugfix/keep-http-connection-open-until-stream-eof
...
Keep the HTTP server connection open until the stream is EOF
2018-10-24 11:31:06 +02:00
Michael Friedrich
dab53448bc
icinga.com: Update *.{h,c}pp
2018-10-18 09:27:04 +02:00
Michael Friedrich
83a428c1ba
Keep the HTTP server connection open until the stream is EOF
...
fixes #4968
2018-10-09 16:01:43 +02:00
Michael Friedrich
e6eb703b36
Merge pull request #6661 from Icinga/bugfix/cache-http-peer-address
...
Cache the peer address in the HTTP server
2018-10-09 16:00:27 +02:00
Michael Friedrich
5c32a5a7dc
Cache the peer address in the HTTP server
...
Later socket calls are expensive and might lead
into a race condition on close when logging it.
refs #6655
2018-10-09 15:40:16 +02:00
Michael Friedrich
58cfc3955d
Merge pull request #6658 from Icinga/bugfix/api-connection-close-req-by-client
...
Ensure that HTTP/1.0 or 'Connection: close' headers are properly disconnecting the client
2018-10-09 13:49:22 +02:00
Michael Friedrich
13239c3172
Ensure that HTTP/1.0 or Connection: close headers are properly disconnecting the client
...
Test results: https://github.com/Icinga/icinga2/issues/6514#issuecomment-428155731
fixes #6514
2018-10-09 13:23:23 +02:00
Michael Friedrich
57081176de
Improve logging for disconnected HTTP clients
...
Previously this was inside the debug log, with the
new socket printers we can enhance checking for proper
connects and disconnects.
refs #6514
2018-10-09 12:22:19 +02:00
Alexander A. Klimov
ac6afadb5a
Make HttpServerConnection#m_DataHandlerMutex a boost::recursive_mutex
...
refs #6428
2018-07-09 14:40:32 +02:00
Michael Friedrich
b11ab95f41
Fix crash without CORS config settings
...
fixes #6173
refs #6098
2018-03-21 20:42:31 +01:00
Michael Friedrich
064fc80cc3
Merge pull request #6098 from Icinga/fix/improve-cors-implementation
...
Clean up CORS implementation
2018-03-19 16:00:36 +01:00
Gunnar Beutner
9cd5298d8b
Ensure that SetCorked() works properly
2018-03-06 09:03:35 +01:00
Noah Hilverling
186cad9872
Clean up CORS implementation
2018-03-01 14:04:56 +01:00
Gunnar Beutner
d23c03bfa5
Merge pull request #6134 from gunnarbeutner/fix/incorrect-content-length-limits
...
Fix incorrect HTTP content length limits
2018-02-28 14:16:15 +01:00
Gunnar Beutner
a3bf8cd26e
Merge pull request #6133 from Icinga/fix/cork-socket
...
Limit the number of HTTP/JSON-RPC requests we read in parallel
2018-02-28 12:48:06 +01:00
Gunnar Beutner
45c2803f3e
Fix incorrect HTTP content length limits
2018-02-28 12:28:02 +01:00
Jean Flach
d0cf7c654e
Use cork in tlsstream and HTTP connection
2018-02-28 11:40:58 +01:00
Gunnar Beutner
a4a73fa67c
Fix null ptr dereference in HttpServerConnection::ProcessMessageAsync
2018-02-28 11:07:19 +01:00
Jean Flach
ef5e7e8510
Fix incorrect size of request limits
...
refs #6103
2018-02-23 14:29:18 +01:00
Jean Flach
85f45d9b94
Minor codestyle and doc changes
2018-02-21 14:52:44 +01:00
Noah Hilverling
2823ebb831
Limit HTTP body size
2018-02-20 13:32:04 +01:00
Noah Hilverling
817415f6a5
Fix requests not being closed correctly
2018-02-20 13:32:04 +01:00
Jean Flach
8ffa4f04a7
Add timeout for TLS handshakes
2018-02-20 13:32:04 +01:00
Jean Flach
ee5954726d
Authenticate API user before parsing body
2018-02-20 13:32:04 +01:00
Jean Flach
73b85bcccb
Only read body from authenticated connections
...
This means we are not allowing unauthenticated requests anymore
2018-02-20 13:32:04 +01:00
Jean Flach
81c4004894
Fix nullptr deref
2018-02-20 13:32:04 +01:00
Gunnar Beutner
c2fb9fe226
Use initializer lists for arrays and dictionaries
2018-01-16 12:27:44 +01:00
Michael Friedrich
d073a807b0
API: Add 'pretty' parameter for beautified JSON response bodies
...
fixes #5877
2018-01-08 20:55:36 +01:00
Gunnar Beutner
ac155d1dda
Apply clang-tidy fix 'modernize-redundant-void-arg'
2018-01-04 12:24:57 +01:00