omserv 0.0.0.dev24__py3-none-any.whl → 0.0.0.dev25__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
omserv/__about__.py CHANGED
@@ -26,3 +26,16 @@ class Setuptools(SetuptoolsBase):
26
26
  'include': [Project.name, f'{Project.name}.*'],
27
27
  'exclude': [*SetuptoolsBase.find_packages['exclude']],
28
28
  }
29
+
30
+ package_data = {
31
+ **SetuptoolsBase.package_data,
32
+
33
+ '*': [
34
+ *SetuptoolsBase.package_data['*'],
35
+
36
+ '*.ico',
37
+ '*.j2',
38
+
39
+ '*.patch',
40
+ ],
41
+ }
omserv/_manifests.json ADDED
@@ -0,0 +1 @@
1
+ []
@@ -0,0 +1,109 @@
1
+ diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
2
+ index ef525d9..46ca5ee 100644
3
+ --- a/src/event/ngx_event.c
4
+ +++ b/src/event/ngx_event.c
5
+ @@ -75,6 +75,13 @@ ngx_atomic_t *ngx_stat_writing = &ngx_stat_writing0;
6
+ static ngx_atomic_t ngx_stat_waiting0;
7
+ ngx_atomic_t *ngx_stat_waiting = &ngx_stat_waiting0;
8
+
9
+ +static ngx_atomic_t ngx_stat_2xx0;
10
+ +ngx_atomic_t *ngx_stat_2xx = &ngx_stat_2xx0;
11
+ +static ngx_atomic_t ngx_stat_4xx0;
12
+ +ngx_atomic_t *ngx_stat_4xx = &ngx_stat_4xx0;
13
+ +static ngx_atomic_t ngx_stat_5xx0;
14
+ +ngx_atomic_t *ngx_stat_5xx = &ngx_stat_5xx0;
15
+ +
16
+ #endif
17
+
18
+
19
+ @@ -563,7 +570,10 @@ ngx_event_module_init(ngx_cycle_t *cycle)
20
+ + cl /* ngx_stat_active */
21
+ + cl /* ngx_stat_reading */
22
+ + cl /* ngx_stat_writing */
23
+ - + cl; /* ngx_stat_waiting */
24
+ + + cl /* ngx_stat_waiting */
25
+ + + cl /* ngx_stat_2xx */
26
+ + + cl /* ngx_stat_4xx */
27
+ + + cl; /* ngx_stat_5xx */
28
+
29
+ #endif
30
+
31
+ @@ -610,6 +620,9 @@ ngx_event_module_init(ngx_cycle_t *cycle)
32
+ ngx_stat_reading = (ngx_atomic_t *) (shared + 7 * cl);
33
+ ngx_stat_writing = (ngx_atomic_t *) (shared + 8 * cl);
34
+ ngx_stat_waiting = (ngx_atomic_t *) (shared + 9 * cl);
35
+ + ngx_stat_2xx = (ngx_atomic_t *) (shared + 10 * cl);
36
+ + ngx_stat_4xx = (ngx_atomic_t *) (shared + 11 * cl);
37
+ + ngx_stat_5xx = (ngx_atomic_t *) (shared + 12 * cl);
38
+
39
+ #endif
40
+
41
+ diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h
42
+ index deac04e..48b7622 100644
43
+ --- a/src/event/ngx_event.h
44
+ +++ b/src/event/ngx_event.h
45
+ @@ -475,6 +475,10 @@ extern ngx_atomic_t *ngx_stat_reading;
46
+ extern ngx_atomic_t *ngx_stat_writing;
47
+ extern ngx_atomic_t *ngx_stat_waiting;
48
+
49
+ +extern ngx_atomic_t *ngx_stat_2xx;
50
+ +extern ngx_atomic_t *ngx_stat_4xx;
51
+ +extern ngx_atomic_t *ngx_stat_5xx;
52
+ +
53
+ #endif
54
+
55
+
56
+ diff --git a/src/http/modules/ngx_http_stub_status_module.c b/src/http/modules/ngx_http_stub_status_module.c
57
+ index db68b76..631427d 100644
58
+ --- a/src/http/modules/ngx_http_stub_status_module.c
59
+ +++ b/src/http/modules/ngx_http_stub_status_module.c
60
+ @@ -87,7 +87,7 @@ ngx_http_stub_status_handler(ngx_http_request_t *r)
61
+ ngx_int_t rc;
62
+ ngx_buf_t *b;
63
+ ngx_chain_t out;
64
+ - ngx_atomic_int_t ap, hn, ac, rq, rd, wr, wa;
65
+ + ngx_atomic_int_t ap, hn, ac, rq, rd, wr, wa, st2xx, st4xx, st5xx;
66
+
67
+ if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD))) {
68
+ return NGX_HTTP_NOT_ALLOWED;
69
+ @@ -124,12 +124,16 @@ ngx_http_stub_status_handler(ngx_http_request_t *r)
70
+ wr = *ngx_stat_writing;
71
+ wa = *ngx_stat_waiting;
72
+
73
+ + st2xx = *ngx_stat_2xx;
74
+ + st4xx = *ngx_stat_4xx;
75
+ + st5xx = *ngx_stat_5xx;
76
+ +
77
+ b->last = ngx_sprintf(b->last, "Active connections: %uA \n", ac);
78
+
79
+ - b->last = ngx_cpymem(b->last, "server accepts handled requests\n",
80
+ - sizeof("server accepts handled requests\n") - 1);
81
+ + b->last = ngx_cpymem(b->last, "server accepts handled requests 2xx 4xx 5xx\n",
82
+ + sizeof("server accepts handled requests 2xx 4xx 5xx\n") - 1);
83
+
84
+ - b->last = ngx_sprintf(b->last, " %uA %uA %uA \n", ap, hn, rq);
85
+ + b->last = ngx_sprintf(b->last, " %uA %uA %uA %uA %uA %uA \n", ap, hn, rq, st2xx, st4xx, st5xx);
86
+
87
+ b->last = ngx_sprintf(b->last, "Reading: %uA Writing: %uA Waiting: %uA \n",
88
+ rd, wr, wa);
89
+ diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
90
+ index 3cca57c..46ff1fe 100644
91
+ --- a/src/http/ngx_http_request.c
92
+ +++ b/src/http/ngx_http_request.c
93
+ @@ -3797,6 +3797,16 @@ ngx_http_log_request(ngx_http_request_t *r)
94
+ ngx_http_handler_pt *log_handler;
95
+ ngx_http_core_main_conf_t *cmcf;
96
+
97
+ +#if (NGX_STAT_STUB)
98
+ + if (r->headers_out.status >= 200 && r->headers_out.status < 300) {
99
+ + (void) ngx_atomic_fetch_add(ngx_stat_2xx, 1);
100
+ + } else if (r->headers_out.status >= 400 && r->headers_out.status < 500) {
101
+ + (void) ngx_atomic_fetch_add(ngx_stat_4xx, 1);
102
+ + } else if (r->headers_out.status >= 500 && r->headers_out.status < 600) {
103
+ + (void) ngx_atomic_fetch_add(ngx_stat_5xx, 1);
104
+ + }
105
+ +#endif
106
+ +
107
+ cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
108
+
109
+ log_handler = cmcf->phases[NGX_HTTP_LOG_PHASE].handlers.elts;
omserv/server/LICENSE ADDED
@@ -0,0 +1,14 @@
1
+ Copyright P G Jones 2018.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
5
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
6
+ persons to whom the Software is furnished to do so, subject to the following conditions:
7
+
8
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
9
+ Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
13
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omserv
3
- Version: 0.0.0.dev24
3
+ Version: 0.0.0.dev25
4
4
  Summary: omserv
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
12
12
  Classifier: Operating System :: POSIX
13
13
  Requires-Python: ~=3.12
14
14
  License-File: LICENSE
15
- Requires-Dist: omlish ==0.0.0.dev24
15
+ Requires-Dist: omlish ==0.0.0.dev25
16
16
  Provides-Extra: all
17
17
  Requires-Dist: h11 ~=0.14 ; extra == 'all'
18
18
  Requires-Dist: h2 ~=4.1 ; extra == 'all'
@@ -1,5 +1,6 @@
1
- omserv/__about__.py,sha256=IwJ97UdJUqmuXGftkoUyB4PLm1kL_q7bZozQLMSrceI,631
1
+ omserv/__about__.py,sha256=l9yTdHqbdd7L6tobi6BTiEO9huwg_6ndnmVNnQxL8f8,838
2
2
  omserv/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ omserv/_manifests.json,sha256=N1F-Xz3GaBn2H1p7uKzhkhKCQV8QVR0t76XD6wmFtXA,3
3
4
  omserv/dbs.py,sha256=RLXwNmENmM9MLsjFqDho_R8ibMjOKAxWUn4zhzTlP9Y,756
4
5
  omserv/secrets.py,sha256=ja0VsCB01MHxYwn5OHjFeXV9cRah9AQl-0uJzZELpic,256
5
6
  omserv/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -14,10 +15,12 @@ omserv/nginx/build.py,sha256=mCvX7f1LGguLNPVQEwxlWO6OQpad43JbLu96gbIlNy4,3141
14
15
  omserv/nginx/configs.py,sha256=4oQDcKJKIatRG621qiZCYTayJI3-vv63TtRCiUxEVWI,2008
15
16
  omserv/nginx/stubstatus.py,sha256=_VnXZdXxSA7jIelYSwJLf9mOnt_UOvpWghAPWtlWSLw,1857
16
17
  omserv/nginx/patches/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ omserv/nginx/patches/nginx-1.27.0_http_status.patch,sha256=bEDSczpBLcdjcBp_X1m73oxvt8KPeons7v_sUxqBSXM,4335
17
19
  omserv/node/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
20
  omserv/node/models.py,sha256=XsfAI-LjlRkRfK0_ofh-gai5IUq_g357UfThK9dZ0UM,1258
19
21
  omserv/node/registry.py,sha256=0hodmyQn3POOZJBG8zTr9ojR80-ZNmIwJpQbchJg8EM,3459
20
22
  omserv/node/sql.py,sha256=vy7RP50JiH3jQHMVa7Hxk0pFJK3QcbGeTvyNppB1W4I,2826
23
+ omserv/server/LICENSE,sha256=VKPNmbyrS9wcwcx20hBlVtLP01brb2dByHrWHeNLPag,1050
21
24
  omserv/server/__init__.py,sha256=K8l4nfv9c_5o8dph-SyadW_19CdTC2FGlikyHMU5lAU,375
22
25
  omserv/server/config.py,sha256=oGWL1kuk45bJ6sVr8n3ow5Q-1nz9EqByjoykU2iOHIY,1189
23
26
  omserv/server/debug.py,sha256=N7RI0Jj-ttmys3DJD0RREmGG5XZpTCp6y9Yu0x98Agg,299
@@ -38,12 +41,13 @@ omserv/server/protocols/h2.py,sha256=pClkPlaX0WnQ1dKee7Fvr4csSH2bBqItTcsKVuk1p1Q
38
41
  omserv/server/protocols/protocols.py,sha256=1ky8PGYIIR8wco6fcw-41RmHW-Kz_cNcZZoOqi7btNk,2790
39
42
  omserv/server/protocols/types.py,sha256=OXt5U3LsBToDxT7ipfFGiIHJU0WVvlfT6QQacF-_Plc,440
40
43
  omserv/server/resources/__init__.py,sha256=KppZbvZBKX1TdyaQZYY92oEKpdB3nuUXxharAgrbAIA,193
44
+ omserv/server/resources/favicon.ico,sha256=48hwhc03Fp6Rbj0fEQEB95woJMhCDsM2nMZJfeKAU0g,38078
41
45
  omserv/server/streams/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
46
  omserv/server/streams/httpstream.py,sha256=0DeiAPLGbEGNa0fHTs8lUpi_CFZs4M5_QB-TiS8mobQ,8015
43
47
  omserv/server/streams/utils.py,sha256=aMOrqWIg_Hht5W4kLg3y7oR5AEkVvMrZhyjzo6U5owE,1527
44
48
  omserv/server/streams/wsstream.py,sha256=3Vyzox7dCE1tDSXjb6xBubWo41ZF9d38Hrsrlj6h1J8,15482
45
- omserv-0.0.0.dev24.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
46
- omserv-0.0.0.dev24.dist-info/METADATA,sha256=1LoV9C_TsRisl-F-w3OQ66tquPXZz-yIKpdLBhskYLk,881
47
- omserv-0.0.0.dev24.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
48
- omserv-0.0.0.dev24.dist-info/top_level.txt,sha256=HXehpnxeKscKNULzKNzZ27oNawBrsh1PaNAirbX-XNA,7
49
- omserv-0.0.0.dev24.dist-info/RECORD,,
49
+ omserv-0.0.0.dev25.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
50
+ omserv-0.0.0.dev25.dist-info/METADATA,sha256=65c61CuYjTA6ag094L-GdCJXShj0YcJNfbUWRK4B18Y,881
51
+ omserv-0.0.0.dev25.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
52
+ omserv-0.0.0.dev25.dist-info/top_level.txt,sha256=HXehpnxeKscKNULzKNzZ27oNawBrsh1PaNAirbX-XNA,7
53
+ omserv-0.0.0.dev25.dist-info/RECORD,,