[英]Lithium PHP Framework - posted data empty when receive PATCH requests ???
So, I'm sending PATCH
requests to a server side, built with Lithium PHP Framework
, and in side the controller actions I see that the $request->data
is empty ... and I can't use the sent data. 因此,我正在将PATCH
请求发送到使用Lithium PHP Framework
构建的服务器端,并且在控制器操作方面,我看到$request->data
为空...并且我无法使用发送的数据。
What could be the problem? 可能是什么问题呢? ... ...
(If I change the client side to send POST requests - then all is fine ... but the Lithium PHP Framework
rely on the request type ... and so it breaks if the request type is PATCH
? ...) (如果我将客户端更改为发送POST请求,那么一切都很好...但是Lithium PHP Framework
依赖于请求类型...,因此如果请求类型为PATCH
,它就会中断?)
What version of Lithium is used? 使用什么版本的锂? Lithium didn't support PATCH method until this commit . 直到此提交,锂电才支持PATCH方法。 See how support for PATCH was added in that commit so it should populate $request->data now. 查看如何在该提交中添加对PATCH的支持,以便现在应填充$ request-> data。
Try to update to the most recent version of Lithium or just apply that patch to check if it solves the problem. 尝试更新至最新版本的Lithium或仅应用该补丁以检查它是否可以解决问题。
What web server are you using ? 您正在使用什么Web服务器? I had the same problem with li3_server
library ( https://github.com/daschl/li3_server ). 我在li3_server
库( https://github.com/daschl/li3_server )中遇到了同样的问题。 I changed to nginx
and it worked fine. 我改为使用nginx
,它工作正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.