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

[Bug]: 高级查询数据源为“个人”时返回 400 Bad Request #534

Open
GalaxySnail opened this issue Jul 28, 2022 · 1 comment
Open
Assignees
Labels
bug Something isn't working expectedly

Comments

@GalaxySnail
Copy link

环境 // Environment

操作系统 / Operating System: Windows 10 21H2
浏览器名称 / Browser Name: Chromium
浏览器版本 / Browser Version: 103.0.5060.134 (正式版本)(64 位)

出现此问题的页面链接 // URL of the page that the problem occurred in

https://penguin-stats.cn/advanced

描述 / Description

您都做了哪些事情/我们如何才能复现这个问题呢? / What steps did you take to reproduce this problem?

  1. 查询任意关卡任意时段
  2. 将数据源选择为“个人”
  3. 点击执行查询

期望的结果 / What should have happened?

正确显示查询到的数据

实际的结果 / What actually happened?

返回 400 Bad Request: PenguinID not found in request,如图:

额外的信息 / Any additional information?

经过排查,发现是请求缺少了 authorization: PenguinID xxxxx 请求头。用 curl 复现如下:

不带 authorization 的情况:

curl 'https://penguin-stats.cn/PenguinStats/api/v2/result/advanced' \
  -H 'content-type: application/json;charset=UTF-8' \
  --data-raw '{"queries":[{"stageId":"act12side_03","itemIds":[],"server":"CN","isPersonal":true,"start":1556668800000}]}'
{"code":"INVALID_REQUEST","message":"PenguinID not found in request"}

authorization 的情况:

curl 'https://penguin-stats.cn/PenguinStats/api/v2/result/advanced' \
  -H 'content-type: application/json;charset=UTF-8' \
  -H 'authorization: PenguinID 114514' \
  --data-raw '{"queries":[{"stageId":"act12side_03","itemIds":[],"server":"CN","isPersonal":true,"start":1556668800000}]}'
{"advanced_results":[{"matrix":[ ... ]}]}
@GalaxySnail GalaxySnail added bug Something isn't working expectedly triage The issue is waiting for initial review labels Jul 28, 2022
@GalvinGao
Copy link
Member

你好 目测这个是前端的bug hhh,我们排查一下

@GalvinGao GalvinGao removed the triage The issue is waiting for initial review label Aug 3, 2022
@GalvinGao GalvinGao self-assigned this Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working expectedly
Projects
None yet
Development

No branches or pull requests

2 participants