Skip to content

Webhooks with '/' in them don't get routed to the controller #4070

@lakshmi-kannan

Description

@lakshmi-kannan

CLI logs

(virtualenv) root@80fa4dcc1299:/st2# st2 --debug webhook get devices/config
# -------- begin 140399977822608 request ----------
curl -X GET -H  'Connection: keep-alive' -H  'Accept-Encoding: gzip, deflate' -H  'Accept: */*' -H  'User-Agent: python-requests/2.14.2' http://127.0.0.1:9101/v1/webhooks/devices/config
# -------- begin 140399977822608 response ----------
{
    "faultstring": "The resource could not be found."
}
# -------- end 140399977822608 response ------------

Webhook "devices/config" is not found.

CLI settings:
----------------
Config file path: /root/.st2/config
Client settings:
----------------
ST2_BASE_URL: http://127.0.0.1
ST2_AUTH_URL: http://127.0.0.1:9100
ST2_API_URL: http://127.0.0.1:9101/v1
ST2_STREAM_URL: http://127.0.0.1:9102/v1
ST2_AUTH_TOKEN: None

Proxy settings:
---------------
HTTP_PROXY:
HTTPS_PROXY:

Traceback (most recent call last):
  File "/st2/st2client/st2client/shell.py", line 343, in run
    func(args)
  File "/st2/st2client/st2client/commands/resource.py", line 334, in run_and_print
    raise OperationFailureException('Resource %s not found.' % resource_id)
OperationFailureException: Resource devices/config not found.
(virtualenv) root@80fa4dcc1299:/st2#

API logs

2018-04-06 16:21:38,093 140341107055824 DEBUG router [-] Match path: /v1/webhooks/devices/config
2018-04-06 16:21:38,095 140341107055824 DEBUG error_handling [-] API call failed: None (exception_message='The resource could not be found.',exception_data={'comment': None, '_headers': None, 'conditional_response': False, 'detail': None, '_app_iter': [''], '_status': '404 Not Found', '_headerlist': [('Content-Type', 'text/html; charset=UTF-8'), ('Content-Length', '0')]},exception_class='HTTPNotFound')
2018-04-06 16:21:38,098 140341107055824 DEBUG error_handling [-] Traceback (most recent call last):
  File "/st2/st2common/st2common/middleware/error_handling.py", line 49, in __call__
    raise exc.HTTPNotFound()
HTTPNotFound: The resource could not be found.

2018-04-06 16:21:38,099 140341107055824 DEBUG router [-] Match path: /v1/webhooks/devices/config
2018-04-06 16:21:38,101 140341107055824 INFO logging [-] 627fc307-795f-42b3-9580-be1e6bd062bb - 404 57 9.845ms (content_length=57,request_id='627fc307-795f-42b3-9580-be1e6bd062bb',runtime=9.845,remote_addr='127.0.0.1',status=404,method='GET',path='/v1/webhooks/devices/config')
2018-04-06 16:21:38,102 140341107055824 DEBUG logging [-] 627fc307-795f-42b3-9580-be1e6bd062bb - 404 57 9.845ms
{
    "faultstring": "The resource could not be found."
} (result='{\n    "faultstring": "The resource could not be found."\n}',content_length=57,request_id='627fc307-795f-42b3-9580-be1e6bd062bb',runtime=9.845,remote_addr='127.0.0.1',status=404,method='GET',path='/v1/webhooks/devices/config')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions