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

add content len field #1033

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

add content len field #1033

wants to merge 1 commit into from

Conversation

dogancanbakir
Copy link
Member

Closes #1032

Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

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

From the issue, if the goal is mostly checking if the body is empty or not I think it's better to directly access it via jq, as the Content-Length header might be misleading or inconsistent as well. For example:

katana -u https://gmail.com | jq 'select(.body != "")'

What do you think?

@dogancanbakir
Copy link
Member Author

Yes, but in this case, we're calculating the len from the body -mentioning @Sab0tag3d for the discussion.

@Sab0tag3d
Copy link

@Mzack9999
Well, my goal is mostly to understand the size of the content on the pages.
It's really helpful to detect some anomaly contents.

Besides, if we would use tool like jq, we need to store html bodies in report (in my case it's json file).
I don't do it because of space, in memory and on disk.
Also, sometimes JSON is broken because of body, and can't be parsed. I think it's because of maximum response size to read option, but haven't done investigation yet.

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

Successfully merging this pull request may close these issues.

Bug: Missing content_length in JSON output if server response lacks Content-Length header
3 participants