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

facebook分享报206 #203

Open
Jackson-p opened this issue Dec 6, 2019 · 4 comments
Open

facebook分享报206 #203

Jackson-p opened this issue Dec 6, 2019 · 4 comments

Comments

@Jackson-p
Copy link

beidou 起的页面在分享到facebook时 会报206的错误,用官方给出的curl命令尝试之后发现报了
curl: (18) transfer closed with 512742 bytes remaining to read
的错,也就是可能由于beidou内部对range的修改,导致facebook上无法分享?
有大佬遇见过这个问题吗?

@njugray
Copy link
Contributor

njugray commented Dec 9, 2019

框架没有针对range修改的特别逻辑,http部分的继承自egg。

能给个详细点的复现步骤么

@Jackson-p
Copy link
Author

Jackson-p commented Dec 9, 2019

框架没有针对range修改的特别逻辑,http部分的继承自egg。

能给个详细点的复现步骤么

我这里可以通过

npm run build
npm run start
curl --dump-header - -H 'Range: bytes=0-700000'   localhost:6001/facebook/test

加以复现(因为facebook的请求里是带range的),发现确实报了206的错误,截图如下:
image

虽然最后是完全返回了html,但是中间发生了一次断掉续读

image

断在了serviceWorker这里,那么egg和beidou都没有对range有处理的话,就会是serviceWorker的问题吗?

@njugray
Copy link
Contributor

njugray commented Dec 9, 2019

我测试了下我这边的几个站点,加range是不会报错的。

而且默认框架是不支持页面的range的,没有看到 Accept-Ranges 响应头

@Jackson-p
Copy link
Author

我测试了下我这边的几个站点,加range是不会报错的。

而且默认框架是不支持页面的range的,没有看到 Accept-Ranges 响应头

不好意思一直忘回了,问题出在koa-range上,把egg-static禁用就好了

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

No branches or pull requests

2 participants