omserv 0.0.0.dev24__tar.gz → 0.0.0.dev26__tar.gz

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.
Files changed (59) hide show
  1. {omserv-0.0.0.dev24/omserv.egg-info → omserv-0.0.0.dev26}/PKG-INFO +2 -2
  2. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/README.rst +3 -0
  3. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/__about__.py +13 -0
  4. omserv-0.0.0.dev26/omserv/_manifests.json +1 -0
  5. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/nginx/build.py +1 -1
  6. omserv-0.0.0.dev26/omserv/nginx/patches/nginx-1.27.1_http_status.patch +109 -0
  7. omserv-0.0.0.dev26/omserv/server/LICENSE +14 -0
  8. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/protocols/h11.py +25 -21
  9. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/protocols/h2.py +16 -1
  10. omserv-0.0.0.dev26/omserv/server/resources/favicon.ico +0 -0
  11. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26/omserv.egg-info}/PKG-INFO +2 -2
  12. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv.egg-info/SOURCES.txt +4 -0
  13. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv.egg-info/requires.txt +1 -1
  14. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/pyproject.toml +15 -3
  15. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/LICENSE +0 -0
  16. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/MANIFEST.in +0 -0
  17. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/__init__.py +0 -0
  18. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/apps/__init__.py +0 -0
  19. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/apps/base.py +0 -0
  20. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/apps/inject.py +0 -0
  21. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/apps/markers.py +0 -0
  22. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/apps/routes.py +0 -0
  23. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/apps/sessions.py +0 -0
  24. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/apps/templates.py +0 -0
  25. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/dbs.py +0 -0
  26. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/nginx/__init__.py +0 -0
  27. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/nginx/configs.py +0 -0
  28. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/nginx/patches/__init__.py +0 -0
  29. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/nginx/stubstatus.py +0 -0
  30. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/node/__init__.py +0 -0
  31. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/node/models.py +0 -0
  32. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/node/registry.py +0 -0
  33. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/node/sql.py +0 -0
  34. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/secrets.py +0 -0
  35. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/__init__.py +0 -0
  36. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/config.py +0 -0
  37. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/debug.py +0 -0
  38. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/events.py +0 -0
  39. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/headers.py +0 -0
  40. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/lifespans.py +0 -0
  41. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/multiprocess.py +0 -0
  42. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/protocols/__init__.py +0 -0
  43. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/protocols/protocols.py +0 -0
  44. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/protocols/types.py +0 -0
  45. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/resources/__init__.py +0 -0
  46. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/sockets.py +0 -0
  47. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/ssl.py +0 -0
  48. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/streams/__init__.py +0 -0
  49. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/streams/httpstream.py +0 -0
  50. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/streams/utils.py +0 -0
  51. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/streams/wsstream.py +0 -0
  52. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/taskspawner.py +0 -0
  53. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/tcpserver.py +0 -0
  54. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/types.py +0 -0
  55. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/workercontext.py +0 -0
  56. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv/server/workers.py +0 -0
  57. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv.egg-info/dependency_links.txt +0 -0
  58. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/omserv.egg-info/top_level.txt +0 -0
  59. {omserv-0.0.0.dev24 → omserv-0.0.0.dev26}/setup.cfg +0 -0
@@ -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.dev26
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.dev26
16
16
  Provides-Extra: all
17
17
  Requires-Dist: h11~=0.14; extra == "all"
18
18
  Requires-Dist: h2~=4.1; extra == "all"
@@ -8,3 +8,6 @@ Core packages installable from git via:
8
8
  .. code-block::
9
9
 
10
10
  pip install 'git+https://github.com/wrmsr/omlish@master#subdirectory=.pkg/<pkg>'
11
+
12
+ Core packages have no required dependencies, but numerous optional ones - see their respective ``pyproject.toml`` files
13
+ for details.
@@ -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
+ }
@@ -0,0 +1 @@
1
+ []
@@ -10,7 +10,7 @@ from omlish import check
10
10
  from omlish import lang
11
11
 
12
12
 
13
- NGINX_VERSION = '1.27.0'
13
+ NGINX_VERSION = '1.27.1'
14
14
  NGINX_SRC_URL = f'https://nginx.org/download/nginx-{NGINX_VERSION}.tar.gz'
15
15
 
16
16
  NGINX_VTS_VERSION = '0.2.2'
@@ -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;
@@ -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.
@@ -107,7 +107,8 @@ class H11Protocol(Protocol):
107
107
  self.client = client
108
108
  self.config = config
109
109
  self.connection: h11.Connection | H11WsConnection = h11.Connection(
110
- h11.SERVER, max_incomplete_event_size=self.config.h11_max_incomplete_size,
110
+ h11.SERVER,
111
+ max_incomplete_event_size=self.config.h11_max_incomplete_size,
111
112
  )
112
113
  self.context = context
113
114
  self.keep_alive_requests = 0
@@ -176,31 +177,30 @@ class H11Protocol(Protocol):
176
177
  await self.send(Closed())
177
178
  break
178
179
 
179
- else:
180
- if isinstance(event, h11.Request):
181
- await self.send(Updated(idle=False))
182
- await self._check_protocol(event)
183
- await self._create_stream(event)
180
+ if isinstance(event, h11.Request):
181
+ await self.send(Updated(idle=False))
182
+ await self._check_protocol(event)
183
+ await self._create_stream(event)
184
184
 
185
- elif event is h11.PAUSED:
186
- await self.can_read.clear()
187
- await self.can_read.wait()
185
+ elif event is h11.PAUSED:
186
+ await self.can_read.clear()
187
+ await self.can_read.wait()
188
188
 
189
- elif isinstance(event, h11.ConnectionClosed) or event is h11.NEED_DATA:
190
- break
189
+ elif isinstance(event, h11.ConnectionClosed) or event is h11.NEED_DATA:
190
+ break
191
191
 
192
- elif self.stream is None:
193
- break
192
+ elif self.stream is None:
193
+ break
194
194
 
195
- elif isinstance(event, h11.Data):
196
- await self.stream.handle(Body(stream_id=STREAM_ID, data=event.data))
195
+ elif isinstance(event, h11.Data):
196
+ await self.stream.handle(Body(stream_id=STREAM_ID, data=event.data))
197
197
 
198
- elif isinstance(event, h11.EndOfMessage):
199
- await self.stream.handle(EndBody(stream_id=STREAM_ID))
198
+ elif isinstance(event, h11.EndOfMessage):
199
+ await self.stream.handle(EndBody(stream_id=STREAM_ID))
200
200
 
201
- elif isinstance(event, Data):
202
- # WebSocket pass through
203
- await self.stream.handle(event)
201
+ elif isinstance(event, Data):
202
+ # WebSocket pass through
203
+ await self.stream.handle(event)
204
204
 
205
205
  async def _create_stream(self, request: h11.Request) -> None:
206
206
  upgrade_value = ''
@@ -229,6 +229,7 @@ class H11Protocol(Protocol):
229
229
  STREAM_ID,
230
230
  )
231
231
  self.connection = H11WsConnection(ta.cast(h11.Connection, self.connection))
232
+
232
233
  else:
233
234
  self.stream = HttpStream(
234
235
  self.app,
@@ -255,6 +256,7 @@ class H11Protocol(Protocol):
255
256
  raw_path=request.target,
256
257
  ),
257
258
  )
259
+
258
260
  self.keep_alive_requests += 1
259
261
  await self.context.mark_request()
260
262
 
@@ -283,6 +285,7 @@ class H11Protocol(Protocol):
283
285
 
284
286
  async def _maybe_recycle(self) -> None:
285
287
  await self._close_stream()
288
+
286
289
  if (
287
290
  not self.context.terminated.is_set()
288
291
  and self.connection.our_state is h11.DONE
@@ -297,6 +300,7 @@ class H11Protocol(Protocol):
297
300
  self.scope = None
298
301
  await self.can_read.set()
299
302
  await self.send(Updated(idle=True))
303
+
300
304
  else:
301
305
  await self.can_read.set()
302
306
  await self.send(Closed())
@@ -316,7 +320,7 @@ class H11Protocol(Protocol):
316
320
  elif sanitised_name in {'content-length', 'transfer-encoding'}:
317
321
  has_body = True
318
322
 
319
- # h2c Upgrade requests with a body are a pain as the body must be fully recieved in HTTP/1.1 before the upgrade
323
+ # h2c Upgrade requests with a body are a pain as the body must be fully received in HTTP/1.1 before the upgrade
320
324
  # response and HTTP/2 takes over, so Hypercorn ignores the upgrade and responds in HTTP/1.1. Use a preflight
321
325
  # OPTIONS request to initiate the upgrade if really required (or just use h2).
322
326
  if upgrade_value.lower() == 'h2c' and not has_body:
@@ -138,13 +138,16 @@ class H2Protocol(Protocol):
138
138
  self.connection.initiate_upgrade_connection(settings)
139
139
  else:
140
140
  self.connection.initiate_connection()
141
+
141
142
  await self._flush()
143
+
142
144
  if headers is not None:
143
145
  event = h2.events.RequestReceived()
144
146
  event.stream_id = 1
145
147
  event.headers = headers
146
148
  await self._create_stream(event)
147
149
  await self.streams[event.stream_id].handle(EndBody(stream_id=event.stream_id))
150
+
148
151
  self.task_spawner.spawn(self.send_task)
149
152
 
150
153
  async def send_task(self) -> None:
@@ -178,6 +181,7 @@ class H2Protocol(Protocol):
178
181
  await self._flush()
179
182
  del self.stream_buffers[stream_id]
180
183
  self.priority.remove_stream(stream_id)
184
+
181
185
  except (h2.exceptions.StreamClosedError, KeyError, h2.exceptions.ProtocolError):
182
186
  # Stream or connection has closed whilst waiting to send data, not a problem - just force close it.
183
187
  await self.stream_buffers[stream_id].close()
@@ -316,6 +320,7 @@ class H2Protocol(Protocol):
316
320
  weight=event.weight,
317
321
  exclusive=event.exclusive,
318
322
  )
323
+
319
324
  except priority.MissingStreamError:
320
325
  # Received PRIORITY frame before HEADERS frame
321
326
  self.priority.insert_stream(
@@ -345,6 +350,7 @@ class H2Protocol(Protocol):
345
350
  self.stream_send,
346
351
  request.stream_id,
347
352
  )
353
+
348
354
  else:
349
355
  self.streams[request.stream_id] = HttpStream(
350
356
  self.app,
@@ -356,7 +362,9 @@ class H2Protocol(Protocol):
356
362
  self.stream_send,
357
363
  request.stream_id,
358
364
  )
365
+
359
366
  self.stream_buffers[request.stream_id] = StreamBuffer(self.context.event_class)
367
+
360
368
  try:
361
369
  self.priority.insert_stream(request.stream_id)
362
370
  except priority.DuplicateStreamError:
@@ -372,16 +380,21 @@ class H2Protocol(Protocol):
372
380
  method=method,
373
381
  raw_path=raw_path,
374
382
  ))
383
+
375
384
  self.keep_alive_requests += 1
376
385
  await self.context.mark_request()
377
386
 
378
387
  async def _create_server_push(
379
- self, stream_id: int, path: bytes, headers: list[tuple[bytes, bytes]],
388
+ self,
389
+ stream_id: int,
390
+ path: bytes,
391
+ headers: list[tuple[bytes, bytes]],
380
392
  ) -> None:
381
393
  push_stream_id = self.connection.get_next_available_stream_id()
382
394
  request_headers = [(b':method', b'GET'), (b':path', path)]
383
395
  request_headers.extend(headers)
384
396
  request_headers.extend(response_headers(self.config, 'h2'))
397
+
385
398
  try:
386
399
  self.connection.push_stream(
387
400
  stream_id=stream_id,
@@ -389,9 +402,11 @@ class H2Protocol(Protocol):
389
402
  request_headers=request_headers,
390
403
  )
391
404
  await self._flush()
405
+
392
406
  except h2.exceptions.ProtocolError:
393
407
  # Client does not accept push promises or we are trying to push on a push promises request.
394
408
  pass
409
+
395
410
  else:
396
411
  event = h2.events.RequestReceived()
397
412
  event.stream_id = push_stream_id
@@ -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.dev26
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.dev26
16
16
  Provides-Extra: all
17
17
  Requires-Dist: h11~=0.14; extra == "all"
18
18
  Requires-Dist: h2~=4.1; extra == "all"
@@ -4,6 +4,7 @@ README.rst
4
4
  pyproject.toml
5
5
  omserv/__about__.py
6
6
  omserv/__init__.py
7
+ omserv/_manifests.json
7
8
  omserv/dbs.py
8
9
  omserv/secrets.py
9
10
  omserv.egg-info/PKG-INFO
@@ -23,10 +24,12 @@ omserv/nginx/build.py
23
24
  omserv/nginx/configs.py
24
25
  omserv/nginx/stubstatus.py
25
26
  omserv/nginx/patches/__init__.py
27
+ omserv/nginx/patches/nginx-1.27.1_http_status.patch
26
28
  omserv/node/__init__.py
27
29
  omserv/node/models.py
28
30
  omserv/node/registry.py
29
31
  omserv/node/sql.py
32
+ omserv/server/LICENSE
30
33
  omserv/server/__init__.py
31
34
  omserv/server/config.py
32
35
  omserv/server/debug.py
@@ -47,6 +50,7 @@ omserv/server/protocols/h2.py
47
50
  omserv/server/protocols/protocols.py
48
51
  omserv/server/protocols/types.py
49
52
  omserv/server/resources/__init__.py
53
+ omserv/server/resources/favicon.ico
50
54
  omserv/server/streams/__init__.py
51
55
  omserv/server/streams/httpstream.py
52
56
  omserv/server/streams/utils.py
@@ -1,4 +1,4 @@
1
- omlish==0.0.0.dev24
1
+ omlish==0.0.0.dev26
2
2
 
3
3
  [all]
4
4
  h11~=0.14
@@ -12,7 +12,7 @@ authors = [
12
12
  urls = {source = 'https://github.com/wrmsr/omlish'}
13
13
  license = {text = 'BSD-3-Clause'}
14
14
  requires-python = '~=3.12'
15
- version = '0.0.0.dev24'
15
+ version = '0.0.0.dev26'
16
16
  classifiers = [
17
17
  'License :: OSI Approved :: BSD License',
18
18
  'Development Status :: 2 - Pre-Alpha',
@@ -22,7 +22,7 @@ classifiers = [
22
22
  ]
23
23
  description = 'omserv'
24
24
  dependencies = [
25
- 'omlish == 0.0.0.dev24',
25
+ 'omlish == 0.0.0.dev26',
26
26
  ]
27
27
 
28
28
  [project.optional-dependencies]
@@ -40,7 +40,6 @@ server = [
40
40
  ]
41
41
 
42
42
  [tool.setuptools]
43
- include-package-data = false
44
43
 
45
44
  [tool.setuptools.packages.find]
46
45
  include = [
@@ -51,3 +50,16 @@ exclude = [
51
50
  '*.tests',
52
51
  '*.tests.*',
53
52
  ]
53
+
54
+ [tool.setuptools.package-data]
55
+ '*' = [
56
+ '*.c',
57
+ '*.cc',
58
+ '*.h',
59
+ '*.json',
60
+ '*.sql',
61
+ 'LICENSE',
62
+ '*.ico',
63
+ '*.j2',
64
+ '*.patch',
65
+ ]
File without changes
File without changes
File without changes
File without changes