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

Unable to obtain truncated responses using --max-print-bytes #291

Open
LeeZBug opened this issue Feb 13, 2025 · 5 comments
Open

Unable to obtain truncated responses using --max-print-bytes #291

LeeZBug opened this issue Feb 13, 2025 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed tui terminal ui related

Comments

@LeeZBug
Copy link

LeeZBug commented Feb 13, 2025

Describe the bug
I use 'kyanos watch http --path /site/list' to capture data, it says "truncated, total: 2351bytes"

Image

But when I use "kyanos watch http --path /site/list --max-print-bytes=5120", it not says "truncated, total: 2351bytes", but the response is still incomplete.

Image

To Reproduce
everytime

Expected behavior
It seems that the '--max-print-bytes=5120' parameter is not taking effect.

Screenshots
like above

Information (please complete the following information):
Linux test 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Copy link

dosubot bot commented Feb 13, 2025

Hello @LeeZBug! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to resolve this issue.

The --max-print-bytes parameter in kyanos is intended to adjust the limit for displaying the content of requests and responses. By default, content exceeding 1024 bytes is truncated, and this parameter should allow you to change that limit to a different byte size [1].

If you're experiencing issues where the parameter doesn't seem to take effect, consider the following possibilities:

  1. Parameter Override or Conflict: There might be other settings or conditions in kyanos that could override or affect the --max-print-bytes parameter, although specific details on this are not available [1].

  2. Implementation or Bug: There could be a bug or an implementation issue with how the parameter is handled. Unfortunately, there are no known issues or bugs documented related to this parameter [1].

  3. Error Handling or Logging: Check if there are any error messages or logs that might provide insights into why the parameter isn't working as expected. This could help identify if there's an underlying issue [1].

Since the parameter should allow for larger content display, and it's not working as expected, it might be worth checking the kyanos documentation or code comments for any additional insights or reaching out to the maintainers for further assistance.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other | Bug Report

@dosubot dosubot bot added the bug Something isn't working label Feb 13, 2025
@LeeZBug
Copy link
Author

LeeZBug commented Feb 13, 2025

I use '--max-print-bytes=anynumber'(like 3600,10240,20480), but the response is still incomplete. response is always truncate at same line

@hengyoush hengyoush added tui terminal ui related help wanted Extra attention is needed labels Feb 13, 2025
@Laitr0n
Copy link
Contributor

Laitr0n commented Feb 14, 2025

I'll take some time to work on it.

@Laitr0n
Copy link
Contributor

Laitr0n commented Feb 18, 2025

Hi, @hengyoush The problem is not related to the TUI, and it actually originates from HTTPStreamParser.ParseResponse. We only parse HTTP/1.X and do not handle HTTP/2 which is the root cause.

@Laitr0n
Copy link
Contributor

Laitr0n commented Feb 18, 2025

Hi, @LeeZBug Could you provide your response header ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed tui terminal ui related
Projects
None yet
Development

No branches or pull requests

3 participants