Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.13.0

### Changed / 优化
- 大 body 在解码前先剪枝:请求 / 响应体在 `utf8.decode` 之前按面板预览字符上限(`InspectorService.maxBodyPreviewBytes`,默认 32K 字符)裁剪字节前缀(上限取 `maxChars * 4 + 3`——UTF-8 单字符最多 4 字节,额外 3 字节用于避免把多字节字符切在中间导致 decode 抛错、被误判成「二进制响应」),不再为随后必然被截断丢弃的尾部付费:512 KB 缓冲对 32K 字符预览,纯 ASCII 场景解码量最多降到约 1/16、中文场景约 1/4。预览内容与长度完全不变,base64 / hex 的二进制兜底仍基于原始字节。 / Large bodies are trimmed before decoding: request/response bytes are clipped to the panel's preview char cap (`InspectorService.maxBodyPreviewBytes`, default 32K chars) before `utf8.decode` (cap = `maxChars * 4 + 3` — one UTF-8 char is at most 4 bytes, plus 3 so a multi-byte char is never cut in half, which used to make `utf8.decode` throw and misread the payload as binary). We no longer pay for the tail that truncation discards: with a 512 KB buffer against a 32K-char preview, decoding work drops to ~1/16 for ASCII payloads and ~1/4 for CJK. Preview content and length are unchanged, and the base64/hex binary fallback still reads the original bytes.
- 新增 `InspectorService.maxBodyPreviewBytes` getter,供拦截器读取当前配置的预览上限(原来该上限是私有的,拦截器无法感知)。 / Adds the `InspectorService.maxBodyPreviewBytes` getter so interceptors can read the configured preview cap (it used to be private and invisible to them).

## 1.12.1

### Fixed / 修复
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ An in-app developer console for Flutter: inspect HTTP, WebSocket & gRPC traffic,
[![Dart](https://img.shields.io/badge/Dart-✓-0175C2?logo=dart)](https://dart.dev)
[![Style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://pub.dev/packages/effective_dart)

> **🔔 Upgrade recommended:** This release fixes several network-capture correctness bugs (https URL on non-443 ports, request-body rule `Content-Length` mismatch in pass-through mode, responses that are never consumed staying pending forever, WebSocket/gRPC records never being persisted, and the `done` getter returning a different response proxy) plus async errors being missed under the `init()` + `wrapApp()` two-liner and a memory-leak false-positive without VM Service. All users are encouraged to upgrade to the latest version (`^1.12.1`).
> **🔔 Upgrade recommended:** This release trims large request/response bodies before UTF-8 decoding, so the inspector no longer decodes a 512 KB body just to keep the first 32K characters of the preview — up to ~16x less decoding work for ASCII payloads, with preview content unchanged. All users are encouraged to upgrade to the latest version (`^1.13.0`).

🌐 **[Official Website](https://www.zerolabsco.com/)**  ·  📦 **[View on pub.dev](https://pub.dev/packages/zero_inspector_kit)**  ·  🔗 **[View on GitHub](https://github.com/zero-labsco/zero_inspector_kit)**

Expand Down Expand Up @@ -102,7 +102,7 @@ An in-app developer console for Flutter: inspect HTTP, WebSocket & gRPC traffic,

```yaml
dependencies:
zero_inspector_kit: ^1.12.1
zero_inspector_kit: ^1.13.0
```

### GitHub
Expand All @@ -112,7 +112,7 @@ dependencies:
zero_inspector_kit:
git:
url: https://github.com/zero-labsco/zero_inspector_kit.git
ref: release/v1.12.1 # replace 1.12.1 with the version you need
ref: release/v1.13.0 # replace 1.13.0 with the version you need
```

---
Expand Down
6 changes: 3 additions & 3 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[![Dart](https://img.shields.io/badge/Dart-✓-0175C2?logo=dart)](https://dart.dev)
[![Style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://pub.dev/packages/effective_dart)

> **🔔 推荐升级:** 本版本修复了多处网络抓取正确性 bug(非 443 端口的 https URL、直传模式下请求体规则的 `Content-Length` 错配、响应体未被消费时永远停在 pending、WebSocket/gRPC 记录从不落盘、`done` getter 返回不同响应代理),以及两行式集成(`init()` + `wrapApp()`)下漏捕的异步异常、无 VM Service 时的内存泄漏误报。建议所有用户升级到最新版本(`^1.12.1`)。
> **🔔 推荐升级:** 本版本在大体积请求 / 响应体解码前先做剪枝,不再为了保留面板预览的前 32K 字符而完整解码 512 KB 的 body —— 纯 ASCII 载荷的解码量最多降到约 1/16,预览内容完全不变。建议所有用户升级到最新版本(`^1.13.0`)。

🌐 **[官方网站](https://www.zerolabsco.com/)**  ·  📦 **[在 pub.dev 查看](https://pub.dev/packages/zero_inspector_kit)**  ·  🔗 **[查看 GitHub 仓库](https://github.com/zero-labsco/zero_inspector_kit)**

Expand Down Expand Up @@ -101,7 +101,7 @@

```yaml
dependencies:
zero_inspector_kit: ^1.12.1
zero_inspector_kit: ^1.13.0
```

### GitHub
Expand All @@ -111,7 +111,7 @@ dependencies:
zero_inspector_kit:
git:
url: https://github.com/zero-labsco/zero_inspector_kit.git
ref: release/v1.12.1 # 将 1.12.1 替换为你需要的版本号
ref: release/v1.13.0 # 将 1.13.0 替换为你需要的版本号
```

---
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_inspector_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_inspector_kit/_next/static/chunks/webpack-ad90bb3f37d3ab33.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/main-f5dfbda958d94c6d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_app-dfead9b5b0a86c83.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/HOKBL-YNOJJmFvcM-iq75/_buildManifest.js" defer=""></script><script src="/zero_inspector_kit/_next/static/HOKBL-YNOJJmFvcM-iq75/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"HOKBL-YNOJJmFvcM-iq75","assetPrefix":"/zero_inspector_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_inspector_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_inspector_kit/_next/static/chunks/webpack-ad90bb3f37d3ab33.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/main-f5dfbda958d94c6d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_app-dfead9b5b0a86c83.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/rhZ5TDhK5xNMS7pIlRbZf/_buildManifest.js" defer=""></script><script src="/zero_inspector_kit/_next/static/rhZ5TDhK5xNMS7pIlRbZf/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"rhZ5TDhK5xNMS7pIlRbZf","assetPrefix":"/zero_inspector_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
2 changes: 1 addition & 1 deletion docs/404/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_inspector_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_inspector_kit/_next/static/chunks/webpack-ad90bb3f37d3ab33.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/main-f5dfbda958d94c6d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_app-dfead9b5b0a86c83.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/HOKBL-YNOJJmFvcM-iq75/_buildManifest.js" defer=""></script><script src="/zero_inspector_kit/_next/static/HOKBL-YNOJJmFvcM-iq75/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"HOKBL-YNOJJmFvcM-iq75","assetPrefix":"/zero_inspector_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><link rel="preload" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" as="style"/><link rel="stylesheet" href="/zero_inspector_kit/_next/static/css/df9fc72061aac7da.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/zero_inspector_kit/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/zero_inspector_kit/_next/static/chunks/webpack-ad90bb3f37d3ab33.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/framework-64ad27b21261a9ce.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/main-f5dfbda958d94c6d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_app-dfead9b5b0a86c83.js" defer=""></script><script src="/zero_inspector_kit/_next/static/chunks/pages/_error-7a92967bea80186d.js" defer=""></script><script src="/zero_inspector_kit/_next/static/rhZ5TDhK5xNMS7pIlRbZf/_buildManifest.js" defer=""></script><script src="/zero_inspector_kit/_next/static/rhZ5TDhK5xNMS7pIlRbZf/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"rhZ5TDhK5xNMS7pIlRbZf","assetPrefix":"/zero_inspector_kit","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
4 changes: 2 additions & 2 deletions docs/Alerts/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Configuration/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Custom-Database-Provider/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Database-Viewer/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Errors/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/FAQ/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/FPS-Viewer/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Getting-Started/index.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/Installation/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Log-Viewer/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Memory-Viewer/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Network-Inspector/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Route-Tracker/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Timeline/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Usage/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_next/static/chunks/nextra-data-en-US.json

Large diffs are not rendered by default.

Loading
Loading