56 Commits

Author SHA1 Message Date
12e26d0018 hotfix (#186)
## Pull Request template
Please, go through these steps before clicking submit on this PR.

1. Give a descriptive title to your PR.
2. Provide a description of your changes.
3. Make sure you have some relevant tests.
4. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if applicable).

**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**

Co-authored-by: Gorbunov Kirill Andreevich <kgorbunov@mtsbank.ru>
Reviewed-on: #186
Co-authored-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
Co-committed-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
2024-03-26 14:53:14 +03:00
4c3d26c39b fixup headers
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-03-11 23:37:54 +03:00
2e8462a0f1 fix logmessages 2024-03-08 18:03:50 +03:00
7e850f75e0 update for latest micro changes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-08-12 13:53:04 +03:00
090b5e3c07 fix query param struct filling
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-05-29 12:29:04 +03:00
69dcf71d3f add scheme to metadata
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-05-19 23:24:53 +03:00
76fe748e4a move down path handler after specific handler
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-05-19 23:02:42 +03:00
99af727138 cleanup message stuf from server
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-05-09 18:38:49 +03:00
316f644090 allow to expose some method via http.HandlerFunc
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-05-08 22:23:34 +03:00
7f971ee6c3 move to micro v4
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-04-28 21:59:31 +03:00
724ffb8c3a return method not allowed error
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-03-09 08:42:04 +03:00
02f9d6d8f7 dont mangle header names
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-02-13 00:09:54 +03:00
82beddb09b
add http header option (#142)
* add http header option
2023-02-11 01:18:16 +03:00
b5148e90cb return after errorHandler
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-02-05 11:29:51 +03:00
5ba7742619 fix endpoint
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-01-17 23:40:24 +03:00
05625d2df4 util/http: trie support method not allowed
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-12-27 23:59:02 +03:00
4ce1ef631b server: remove unparsed body from request and message
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-03-21 15:29:40 +03:00
416d494e50 lazy codec init
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-02-01 11:22:18 +03:00
e9a396d424 fixup old rpc http server
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-01-30 20:43:27 +03:00
31e996fc2e combine native and micro http handlers
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-01-23 02:00:15 +03:00
6714e48f4f
internal rewrite to be more performant (#85)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-01-22 01:10:24 +03:00
505c59ba75 fill request with header and cookie data
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-10-26 22:36:04 +03:00
7a39d86018 remove debug print
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-10-21 14:28:32 +03:00
06a0a2f336 update for latest micro, drop rutil usage
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-09-30 03:01:11 +03:00
3e1ffcb989 add all http request metadata
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-08-11 12:47:44 +03:00
c1e0ce26b5 add ability to register RPC endpoint
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-07-14 13:43:45 +03:00
28d23f388f fixup new codec detection
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-05-14 14:17:33 +03:00
d3d67eca97 allow to response with different content-type
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-05-13 15:46:47 +03:00
f71ae35f12 fix content-type override
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-05-05 13:32:12 +03:00
ba283695dd fix rsp code for wrappers
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-05-01 01:24:09 +03:00
b18465083b fill metadata early
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-30 00:40:15 +03:00
6c661c9d72
lint (#57)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-26 00:43:06 +03:00
a215521821 fieldalignment
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-25 12:09:09 +03:00
30609135a4 use DefaultContentType on application/x-www-form-urlencoded
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-18 15:50:41 +03:00
84167d359e extract application/x-www-form-urlencoded handling to codec
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-17 13:54:32 +03:00
145a0f4aa6 minor content-type fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-16 17:14:27 +03:00
bb763c71b5 add content type handlers
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-13 23:42:33 +03:00
622a79bd06 add path handler option
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-13 11:33:03 +03:00
676634850e allow to set default content type with charset
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-10 12:41:55 +03:00
0d442683ee properly detect content-type
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-10 12:38:17 +03:00
7e35316cf2 rewrite x-www-form-urlencoded
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-04-10 01:24:34 +03:00
48620e6297 handle x-form-urlencoded content-type
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-03-31 00:50:02 +03:00
360b15a3b6 remove Warn on missing rsp code
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-03-24 23:58:35 +03:00
39e6d9f586 fixes with ErrorHandler and passed *http.Server
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-03-09 23:54:46 +03:00
a46c9d395a fix for multiple server registration
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-03-09 14:20:08 +03:00
e88f524042 fix handler context metadata passing
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-03-01 13:02:35 +03:00
45670661d0 write all passed header in response
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-03-01 11:35:27 +03:00
0a59653c70 allow to set any message as error
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-25 14:17:20 +03:00
5adaa78c36 move renovate.json
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-10 13:16:28 +03:00
1e4d56d059 fix body parsing
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2021-02-06 18:53:25 +03:00