agentic_security icon indicating copy to clipboard operation
agentic_security copied to clipboard

LocalProtocolError /verify

Open msoedov opened this issue 8 months ago • 0 comments


LocalProtocolError: Too much data for declared Content-Length
  File "starlette\applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "starlette\middleware\errors.py", line 187, in __call__
    raise exc
  File "starlette\middleware\errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "starlette\middleware\base.py", line 177, in __call__
    with recv_stream, send_stream, collapse_excgroups():
  File "contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "starlette\_utils.py", line 82, in collapse_excgroups
    raise exc
  File "starlette\middleware\base.py", line 179, in __call__
    response = await self.dispatch_func(request, call_next)
  File "agentic_security\middleware\logging.py", line 12, in dispatch
    raise e
  File "agentic_security\middleware\logging.py", line 9, in dispatch
    response = await call_next(request)
  File "starlette\middleware\base.py", line 154, in call_next
    raise app_exc
  File "starlette\middleware\base.py", line 141, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "starlette\middleware\cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "starlette\middleware\cors.py", line 144, in simple_response
    await self.app(scope, receive, send)
  File "starlette\middleware\exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "starlette\_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "starlette\_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "starlette\routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
  File "starlette\routing.py", line 735, in app
    await route.handle(scope, receive, send)
  File "starlette\routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "starlette\routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "starlette\_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "starlette\_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "starlette\routing.py", line 73, in app
    response = await f(request)
  File "fastapi\routing.py", line 301, in app
    raw_response = await run_endpoint_function(
  File "fastapi\routing.py", line 212, in run_endpoint_function
    return await dependant.call(**values)
  File "agentic_security\routes\scan.py", line 28, in verify
    r = await spec.verify()
  File "agentic_security\http_spec.py", line 119, in verify
    return await self.probe("test prompt")
  File "agentic_security\http_spec.py", line 94, in probe
    response = await client.request(
  File "httpx\_client.py", line 1540, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "httpx\_client.py", line 1629, in send
    response = await self._send_handling_auth(
  File "httpx\_client.py", line 1657, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "httpx\_client.py", line 1694, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "httpx\_client.py", line 1730, in _send_single_request
    response = await transport.handle_async_request(request)
  File "httpx\_transports\default.py", line 394, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "httpcore\_async\connection_pool.py", line 256, in handle_async_request
    raise exc from None
  File "httpcore\_async\connection_pool.py", line 236, in handle_async_request
    response = await connection.handle_async_request(
  File "httpcore\_async\connection.py", line 103, in handle_async_request
    return await self._connection.handle_async_request(request)
  File "httpcore\_async\http11.py", line 136, in handle_async_request
    raise exc
  File "httpcore\_async\http11.py", line 88, in handle_async_request
    await self._send_request_body(**kwargs)
  File "httpcore\_async\http11.py", line 159, in _send_request_body
    await self._send_event(event, timeout=timeout)
  File "httpcore\_async\http11.py", line 164, in _send_event
    bytes_to_send = self._h11_state.send(event)
  File "h11\_connection.py", line 512, in send
    data_list = self.send_with_data_passthrough(event)
  File "h11\_connection.py", line 545, in send_with_data_passthrough
    writer(event, data_list.append)
  File "h11\_writers.py", line 65, in __call__
    self.send_data(event.data, write)
  File "h11\_writers.py", line 91, in send_data
    raise LocalProtocolError("Too much data for declared Content-Length")

msoedov avatar Feb 24 '25 17:02 msoedov