Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Router Fails to Validate HTTP Body Length Before Sending to Coprocessor Plugin #6531

Open
rafaelreinert opened this issue Jan 9, 2025 · 0 comments

Comments

@rafaelreinert
Copy link

Describe the bug

When body length is less than the 'Content-Length' header instead of ignoring or correctly log the request, router throws an exception on https://github.com/apollographql/router/blob/dev/apollo-router/src/services/router/body.rs#L92, logging the misleading message:

error: external extensibility: router request stage error: error reading a body from connection: error reading a body from connection: error reading a body from connection: error reading a body from connection: end of file before message length reached

I spent some hours to figure it out that the issue was not related the my coprocessor.

To Reproduce

  1. Setup Router + Coprocessor for router request.
  2. Submit request without body but the Content-Length
  3. See external extensibility error and others.

Expected behavior

Validate the request before and send correct log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant