mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1608] 服务端插件接收不到frps请求的json数据 #1272
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1272
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hsk-story on GitHub (Jan 10, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1608
Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
(请不要在 issue 评论中出现无意义的 加1,我也是 等内容,将会被直接删除。)
(由于个人精力有限,和系统环境,网络环境等相关的求助问题请转至其他论坛或社交平台。)
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
What version of frp are you using (./frpc -v or ./frps -v)?
0.31.1
What operating system and processor architecture are you using (
go env)?linux/window(都不行)
服务端插件运行在PHP环境上
Configures you used:
Steps to reproduce the issue:
1.配置frps
2.frpc连接
3.服务端插件记录request请求
Describe the results you received:
服务端插件记录的request的json数据为空
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
翻阅了源码, 猜测是在frps在请求服务端插件时, 未带
Content-Type=application/json的请求头? 由于个人不熟悉go语言, 也不清楚如何编译, 只能提交个issue看看Can you point out what caused this issue (optional)
@hsk-story commented on GitHub (Jan 10, 2020):
我刚刚在postman试了一下, 如果请求内容数据json. 请求头没带
Content-Type:application/json至少php是肯定接收不到请求内容的@fatedier commented on GitHub (Jan 10, 2020):
不要依赖 content-type,直接从 request body 中读取数据。
@hsk-story commented on GitHub (Jan 10, 2020):
这个也是一个办法, 不过从之后从规范的角度来说, 会增加这个请求头吗?
@QQ2017 commented on GitHub (Jan 10, 2020):
我测试使用易语言(和C语法类似)引用的HP-HTTP Server 组件,是可以接受到数据的。
@fatedier commented on GitHub (Jan 12, 2020):
@hsk-story 有可能会加,也有可能不会,所以不要强依赖,这不是一个明确的定义。
@NemoAlex commented on GitHub (Mar 2, 2020):
还是建议加一下。服务端对不明类型的请求做JSON解析,是比较不合适的。