feat: add gzip_partial_decode function and update documentation#248
feat: add gzip_partial_decode function and update documentation#248HaimLC wants to merge 1 commit intoprojectdiscovery:mainfrom
Conversation
There was a problem hiding this comment.
hi, thanks for the PR! i appreciate the effort, but i don’t think it makes sense to have two separate functions that essentially do the same thing. there’s no need to add gzip_partial_decode; instead, we can simply refactor gzip_decode to include an optional limit parameter - if the user provides this parameter, we can use io.LimitReader to read only the specified DefaultMaxDecompressionSize var as the limit. this way, we keep things clean and avoid duplication.
also, the test is fails.
|
i would fix the pipeline; Locally it worked well :) original: data, err := io.ReadAll(limitReader)
if err != nil {
_ = reader.Close()
return "", err
}partial: if err != nil && err != io.ErrUnexpectedEOF {
_ = reader.Close()
return "", err
}Why is this important?: |
|
i noticed that you’re only handling the EOF case, but i didn’t see any parameter being supplied to limit the reader to thanks for your contribution, really appreciate the effort! |
|
Superseded by #249. |
|
The limit happening in the template :) |
|
the |
implemented #247