envoyproxy / envoyproxy/nighthawk

request_body_size is dropped from CommandLineOptions when no request header is configured

Open Beginner friendly
#1,606 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
414
Forks
95
Avg merge
2d 9h
Merged PRs (30d)
11

Description

*Title*: request_body_size is dropped from CommandLineOptions when no request header is configured

*Description*:
`OptionsImpl::toCommandLineOptions()` sets `request_options.request_body_size` inside the loop over the configured request headers, so with `--request-body-size N` but no `--request-header` the size is not emitted into the `CommandLineOptions` proto. Executions routed through the gRPC service (`--nighthawk-service`) therefore run with an empty body. It should always be emitted.

*Reproduction steps*:
```
nighthawk_client --request-body-size 1234 --nighthawk-service http://target/
```
Compare the executed request body size (0) with a run that also passes any `--request-header`.

*Logs*:
No error is logged; the proto simply lacks the field.

*Call Stack*:
Not a crash.

Contributor guide

Open the contributing guide

Research direction

Start with OptionsImpl::toCommandLineOptions(), where request_options.request_body_size is assigned inside the configured request-header loop. Reproduce with --request-body-size 1234 and --nighthawk-service without --request-header, then verify that the CommandLineOptions proto carries the size and the executed request is no longer empty.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.