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

fix comment for parameters "end_stream" of decodeData/encodeData. #14620

Merged
merged 7 commits into from
Jan 13, 2021
2 changes: 2 additions & 0 deletions include/envoy/http/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ class StreamDecoderFilter : public StreamFilterBase {
* Called with a decoded data frame.
* @param data supplies the decoded data.
* @param end_stream supplies whether this is the last data frame.
* Further note that end_stream is only true if there are no trailers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a tautology? I.e. the fact that the data frame is last already means this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a tautology? I.e. the fact that the data frame is last already means this.

@htuch The data frame is easily mistaken for the body of the request or response. Here's the same issue.

virtual FilterDataStatus decodeData(Buffer::Instance& data, bool end_stream) PURE

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, I guess this is clearer.

* @return FilterDataStatus determines how filter chain iteration proceeds.
*/
virtual FilterDataStatus decodeData(Buffer::Instance& data, bool end_stream) PURE;
Expand Down Expand Up @@ -825,6 +826,7 @@ class StreamEncoderFilter : public StreamFilterBase {
* Called with data to be encoded, optionally indicating end of stream.
* @param data supplies the data to be encoded.
* @param end_stream supplies whether this is the last data frame.
* Further note that end_stream is only true if there are no trailers.
* @return FilterDataStatus determines how filter chain iteration proceeds.
*/
virtual FilterDataStatus encodeData(Buffer::Instance& data, bool end_stream) PURE;
Expand Down