-
Notifications
You must be signed in to change notification settings - Fork 206
feature: Support for auto parsing http gzip response content #260 #301
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
base: feature/1.6.0
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
// 创建gzip.Reader | ||
gzipReader, err := gzip.NewReader(bytesReader) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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() | ||
|
||
// 读取解压后的内容 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls use English
import time | ||
import sys | ||
|
||
# 创建一个Session对象 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls use English.
|
||
cat "${NGINX_GZIP_TEST_LNAME}" | ||
# 检查是否包含 gzip 相关信息 | ||
check_patterns_in_file "${NGINX_GZIP_TEST_LNAME}" "Content-Encoding: gzip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should verify the response body but not the header.
feature: Support for auto parsing http gzip response content #260