feature: Support for auto parsing http gzip response content #260#301
Open
haolipeng wants to merge 7 commits into
Open
feature: Support for auto parsing http gzip response content #260#301haolipeng wants to merge 7 commits into
haolipeng wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
hengyoush
requested changes
Mar 13, 2025
|
|
||
| // 创建gzip.Reader | ||
| gzipReader, err := gzip.NewReader(bytesReader) | ||
| if err != nil { |
Owner
There was a problem hiding this comment.
resp.buf contains the response headers, so you CAN NOT gzip decompress the entire resp.buf as this will fail. Hint: If you debug to this point, you'll find that err is not nil.
| } | ||
| defer gzipReader.Close() | ||
|
|
||
| // 读取解压后的内容 |
| import time | ||
| import sys | ||
|
|
||
| # 创建一个Session对象 |
|
|
||
| cat "${NGINX_GZIP_TEST_LNAME}" | ||
| # 检查是否包含 gzip 相关信息 | ||
| check_patterns_in_file "${NGINX_GZIP_TEST_LNAME}" "Content-Encoding: gzip" |
Owner
There was a problem hiding this comment.
You should verify the response body but not the header.
|
@haolipeng is attempting to deploy a commit to the hengyoush's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feature: Support for auto parsing http gzip response content #260