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

Allow precise configuration of raw request body #205

Open
theseion opened this issue Nov 8, 2023 · 1 comment
Open

Allow precise configuration of raw request body #205

theseion opened this issue Nov 8, 2023 · 1 comment

Comments

@theseion
Copy link
Collaborator

theseion commented Nov 8, 2023

The following body represents a chunk in a Transfer-Encoding: chunked request (content length, content, remaining chunks):

data: |
  7
  foo=bar
  0

While the contents of the lines is readable, the line breaks are not, but are relevant to the request, as the specification requires each line to be terminated with \r\n. In this particular context it is also not possible to properly encode the line breaks.

One idea to get around this limitation is to provide a "line specification", like so:

raw_lines:
  - content: 7
    ending: "\r\n"
  - content: "foo=bar"
    ending: "\r\n"
  - content: 0
    ending: "\r\n"

This format would give us more control and better readability, in addition to sending malformed request bodies.

@theseion
Copy link
Collaborator Author

theseion commented Jun 5, 2024

We have encoded_request, that's good enough for now.

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

No branches or pull requests

1 participant