|
32 | 32 | PYTHON_LANGUAGE_RUNTIME, PYTHON_ENABLE_INIT_INDEXING,
|
33 | 33 | METADATA_PROPERTIES_WORKER_INDEXED,
|
34 | 34 | PYTHON_ENABLE_OPENTELEMETRY,
|
35 |
| - PYTHON_ENABLE_OPENTELEMETRY_DEFAULT) |
| 35 | + PYTHON_ENABLE_OPENTELEMETRY_DEFAULT, |
| 36 | + REQUIRES_ROUTE_PARAMETERS) |
36 | 37 | from .extension import ExtensionManager
|
37 | 38 | from .http_v2 import http_coordinator, initialize_http_server, HttpV2Registry, \
|
38 | 39 | sync_http_request, HttpServerInitError
|
@@ -346,6 +347,7 @@ async def _handle__worker_init_request(self, request):
|
346 | 347 | if HttpV2Registry.http_v2_enabled():
|
347 | 348 | capabilities[constants.HTTP_URI] = \
|
348 | 349 | initialize_http_server(self._host)
|
| 350 | + capabilities[REQUIRES_ROUTE_PARAMETERS] = _TRUE |
349 | 351 |
|
350 | 352 | except HttpServerInitError:
|
351 | 353 | raise
|
@@ -578,8 +580,10 @@ async def _handle__invocation_request(self, request):
|
578 | 580 | http_request = await http_coordinator.get_http_request_async(
|
579 | 581 | invocation_id)
|
580 | 582 |
|
581 |
| - await sync_http_request(http_request, invoc_request) |
582 |
| - args[fi.trigger_metadata.get('param_name')] = http_request |
| 583 | + trigger_arg_name = fi.trigger_metadata.get('param_name') |
| 584 | + func_http_request = args[trigger_arg_name] |
| 585 | + await sync_http_request(http_request, func_http_request) |
| 586 | + args[trigger_arg_name] = http_request |
583 | 587 |
|
584 | 588 | fi_context = self._get_context(invoc_request, fi.name,
|
585 | 589 | fi.directory)
|
@@ -730,6 +734,7 @@ async def _handle__function_environment_reload_request(self, request):
|
730 | 734 | if HttpV2Registry.http_v2_enabled():
|
731 | 735 | capabilities[constants.HTTP_URI] = \
|
732 | 736 | initialize_http_server(self._host)
|
| 737 | + capabilities[REQUIRES_ROUTE_PARAMETERS] = _TRUE |
733 | 738 | except HttpServerInitError:
|
734 | 739 | raise
|
735 | 740 | except Exception as ex:
|
|
0 commit comments