简体   繁体   English

没有URI百分比编码的请求的正确HTTP响应是什么?

[英]What is the correct HTTP response for requests without percent encoded URI?

Talking about HTTP API/HTTP Web server, what is the HTTP response code that the server should returns in case the client did not apply a URL encoding to requests params. 关于HTTP API / HTTP Web服务器,如果客户端未对请求参数应用URL编码,则服务器应返回的HTTP响应代码是什么。 I tried to look into HTTP RFCs but nothing specific or useful regarding that. 我试图研究HTTP RFC,但是对此没有任何具体或有用的信息。

If the request is invalid, you can return a 400 Bad Request status. 如果请求无效,则可以返回400错误请求状态。

400 Bad Request 400错误的要求

The request could not be understood by the server due to malformed syntax. 由于语法格式错误,服务器无法理解该请求。 The client SHOULD NOT repeat the request without modifications. 客户不应在没有修改的情况下重复请求。

( Source ) 来源

If you want to send a more informative or specific response, you can provide additional details in the response body. 如果要发送更多信息或特定的响应,可以在响应正文中提供其他详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM