400错误请求怎么解决

A 400 Bad Request Error occurs when a request sent to the website server is incorrect or corrupt, and the server receiving the request can’t understand it. Occasionally, the problem is on the website itself, and there’s not much you can do about that. But most of the time, the problem is one you might be able to solve—maybe you typed the address wrong, or maybe your browser cache is causing problems. Here are some solutions you can try.

当发送到网站服务器的请求不正确或损坏,并且接收到该请求的服务器无法理解时,就会发生400错误请求错误。 有时,问题出在网站本身上,您对此无能为力。 但是在大多数情况下,问题是您可能可以解决的问题-也许您输入的地址错误,或者浏览器缓存导致了问题。 您可以尝试以下解决方案。

什么是400错误请求错误? (What Is a 400 Bad Request Error?)

A 400 Bad Request error happens when a server cannot understand a request that’s been made of it. It’s called a 400 error because that’s the HTTP status code that the web server uses to describe that kind of error.

当服务器无法理解对它的请求时,会发生400 Bad Request错误。 之所以称为400错误,是因为这是Web服务器用来描述这种错误的HTTP状态代码。

A 400 Bad Request error can happen because there’s a simple error in the request. Perhaps you’ve mistyped a URL and the server can’t return a 404 Error, for some reason. Or maybe your web browser is trying to use an expired or invalid cookie. Some servers that are not configured properly can also throw 400 errors instead of more helpful errors in some situations. For example, when you try to upload a file that’s too big to some sites, you might get a 400 error instead of an error letting you know about the maximum file size.

可能会发生400错误的请求错误,因为请求中有一个简单的错误。 也许您输入了错误的URL,并且服务器由于某种原因无法返回404错误。 也许您的Web浏览器正在尝试使用过期或无效的cookie 。 在某些情况下,某些未正确配置的服务器也可能引发400错误,而不是更多有用的错误。 例如,当您尝试上传对某些站点太大的文件时,可能会显示400错误,而不是让您知道最大文件大小的错误。

Just like with 404 errors and 502 errors, website designers can customize how a 400 error looks. So, you might see different looking 400 pages on different websites. Websites might also use slightly different names for this error. For example, you might see things like:

就像404错误和502错误一样,网站设计者可以自定义400错误的外观。 因此,您可能会在不同的网站上看到外观不同的400页。 网站可能还会对此错误使用稍微不同的名称。 例如,您可能会看到以下内容:

  • 400 Bad Request400错误的要求
  • 400 – Bad request. The request could not be understood by the server due to malformed syntax. The client should not repeat the request without modifications400 –错误的请求。 由于语法格式错误,服务器无法理解该请求。 客户不得在未经修改的情况下重复请求
  • Bad Request – Invalid URL错误的请求–无效的URL
  • Bad Request. Your browser sent a request that this server could not understand错误的请求。 您的浏览器发送了此服务器无法理解的请求
  • HTTP Error 400. The request hostname is invalidHTTP错误400。请求主机名无效
  • Bad Request: Error 400错误的要求:错误400
  • HTTP Error 400 – Bad RequestHTTP错误400 –错误的请求

Often, you can do something to fix getting a 400 error, but figuring out exactly what can be challenging because of the vague nature of the error. Here are some things you can try.

通常,您可以采取一些措施来解决出现400错误的问题,但是由于错误的含糊性质,您可以准确地找出可能具有挑战性的内容。 您可以尝试以下方法。

刷新页面 (Refresh the Page)

Refreshing the page is always worth a shot. Many times the 400 error is temporary, and a simple refresh might do the trick. Most browsers use the F5 key to refresh, and also provide a Refresh button somewhere on the address bar. It doesn’t fix the problem very often, but it takes just a second to try.

刷新页面始终值得一试。 很多时候,400错误是暂时的,只需刷新即可解决问题。 大多数浏览器使用F5键刷新,并在地址栏上的某个位置提供“刷新”按钮。 它不会经常解决问题,但是只需一秒钟即可尝试。

仔细检查地址 (Double Check the Address)

The most common reason for a 400 error is a mistyped URL. If you typed a URL into your address box yourself, it’s possible you mistyped. If you clicked a link on another web page and were shown a 404 error, it’s also possible that the link was mistyped on the linking page. Check the address and see if you spot any obvious errors. Also, check for special symbols in the URL, especially ones that you don’t see in URLs often.

出现400错误的最常见原因是网址输入错误。 如果您自己在地址栏中输入了URL,则可能输入错误。 如果单击另一个网页上的链接并显示404错误,则也有可能在链接页面上键入了错误的链接。 检查地址,看看是否发现任何明显的错误。 另外,请检查URL中的特殊符号,尤其是您在URL中通常看不到的特殊符号。

执行搜索 (Perform a Search)

If the URL you are trying to reach is descriptive (or if you know roughly the name of the article or page you were expecting), you can use the keywords in the address to search the website. In the example below, you can’t really tell from the URL itself if anything is mistyped, but you can see some words from the name of the article.

如果您尝试访问的URL是描述性的(或者您大致了解所期望的文章或页面的名称),则可以使用地址中的关键字搜索网站。 在下面的示例中,您无法真正从URL本身判断出是否输错了任何内容,但是可以从文章名称中看到一些单词。

Armed with that knowledge, you can perform a search on the website with the relevant keywords.

有了这些知识,您就可以使用相关的关键字在网站上进行搜索。

That should lead you to the correct page.

那应该引导您到正确的页面。

The same solution also works if the website you are trying to reach changed the URL for some reason and did not redirect the old address to the new one.

如果您尝试访问的网站由于某种原因更改了URL并且未将旧地址重定向到新地址,则相同的解决方案也可以使用。

And if the website you’re on doesn’t have it’s own search box, you can always use Google (or whatever search engine you prefer). Just use the “site:” operator to search only the website in question for the keywords.

而且,如果您所在的网站没有它自己的搜索框,则可以随时使用Google(或您喜欢的任何搜索引擎)。 只需使用“ site:”运算符即可仅在相关网站中搜索关键字。

In the image below, we’re using Google and the search phrase “site:howtogeek.com focal length” to search just the howtogeek.com site for the keywords.

在下图中,我们使用Google和搜索词组“ site:howtogeek.com焦距”来仅搜索howtogeek.com网站中的关键字。

清除浏览器的Cookie和缓存 (Clear Your Browser’s Cookies and Cache)

Many websites (including Google and YouTube) report a 400 error because the cookies they are reading are either corrupt or too old. Some browser extensions can also change your cookies and cause 400 errors. It’s also possible that your browser has cached a corrupt version of the page you’re trying to open.

许多网站(包括Google和YouTube)报告400错误,因为它们正在读取的Cookie损坏或过旧。 某些浏览器扩展程序也可能会更改Cookie,并导致400错误。 您的浏览器也可能缓存了您试图打开的页面的损坏版本。

To test out this possibility, you’ll have to clear your browser cache and cookies. Clearing the cache won’t affect your browsing experience much, but some websites may a take a couple of extra seconds to load as they re-download all the previously cached data. Clearing cookies means you’ll have to sign in again to most websites.

为了测试这种可能性,您必须清除浏览器缓存和cookie。 清除缓存不会对您的浏览体验造成太大影响,但是某些网站在重新下载所有先前缓存的数据时可能会花费额外的几秒钟时间。 清除Cookie意味着您将不得不再次登录大多数网站。

To clear the cache in your browser, you can follow this extensive guide which will teach you how to clear your cache on all the popular desktop and mobile browsers.

要清除浏览器中的缓存,您可以按照这份详尽的指南进行操作,该指南将教您如何清除所有流行的台式机和移动浏览器上的缓存。

刷新您的DNS (Flush Your DNS)

Your computer might be storing outdated DNS records that are causing the errors. A simple flushing of your DNS records might help solve the problem. It’s easy to do, and won’t cause any problems to try. We’ve got full guides on how to reset your DNS cache on both Windows and macOS.

您的计算机可能正在存储导致错误的过时DNS记录。 简单刷新DNS记录可能有助于解决问题。 这很容易做到,并且不会引起任何问题。 我们已获得有关如何在Windows和macOS上重置DNS缓存的完整指南。

检查文件大小 (Check for File Size)

If you’re uploading a file to a website and that is when you are getting a 400 error, then the chances are that the file is too big. Try to upload a smaller file to confirm if this is causing the issue.

如果您正在将文件上传到网站,也就是当您遇到400错误时,则可能是文件太大。 尝试上传较小的文件,以确认是否是引起此问题的原因。

尝试其他网站 (Try Other Websites)

If you’ve been trying to open a single website and getting 400 errors, you should try to open other websites to see if the problem persists. If it does, it might be a problem with your computer or networking equipment rather than the website you’re trying to open.

如果您一直试图打开一个网站并遇到400个错误,则应尝试打开其他网站以查看问题是否仍然存在。 如果是这样,则可能是您的计算机或网络设备有问题,而不是您要打开的网站。

重新启动计算机和其他设备 (Restart Your Computer and Other Equipment)

This solution is a hit and miss, but restarting your computer and especially your networking equipment (routers, modems) is a common way to get rid of a lot of server errors.

该解决方案是一个偶然的选择,但是重新启动计算机,尤其是重新启动网络设备(路由器,调制解调器)是摆脱许多服务器错误的常用方法。

联系网站 (Contact the Website)

If you’ve tried all the solutions and the error doesn’t seem to go away, then the website itself might be having a problem. Try to contact the website through a contact us page (if that works) or through social media. Chances are, they are already aware of the problem and working on fixing it.

如果您尝试了所有解决方案,但错误似乎并未消除,则网站本身可能有问题。 尝试通过“联系我们”页面(如果可行)或通过社交媒体与网站联系。 他们很可能已经意识到了这个问题,并正在努力解决。

翻译自: https://www.howtogeek.com/359267/what-is-a-400-bad-request-error-and-how-can-i-fix-it/

400错误请求怎么解决

400错误请求怎么解决_什么是400错误请求错误(以及如何解决)?相关推荐

  1. 应用程序错误电脑黑屏_电脑运行程序出现APPCRASH错误的三种解决方法

    好多小伙伴说电脑在运行程序时出现appcrash错误,导致软件无法正常运行,其实电脑是很复杂的程序代码设计的,遇到一些奇怪的问题也不奇怪,系统运行程序出现APPCRASH错误,很多新手用户都不知道怎么 ...

  2. axios delete有请求体吗_封装 axios 取消重复请求

    编者按:本文作者舒丽琦,奇舞团前端开发工程师 在我们web开发过程中,很多地方需要我们取消重复的请求.但是哪种场合需要我们取消呢?我们如何取消呢?带着这些问题我们阅读本文. 阅读完本文,你将了解以下内 ...

  3. python类型错误如何解决_在Python中 出现的错误类型以及解决办法

    #IndentationError:expected an indented #block 缩进错误 #解决办法 tab 缩进 for index in range(10): if name == ' ...

  4. mysql错误代码1怎样解决_打开网页提示mysql发生错误,错误号1194,请问下该怎么解决? 爱问知识人...

    今天上服务器一看,发现网页错误,无法连接数据库服务器.mysql服务自己down掉了,然后重新启动服务器,发现网页无法打开,提示: [mysql]Table tblName is marked as ...

  5. mysql2003错误如何解决_如何安装最新版redis6错误解决以及配置开机启动等

    1.正常安装步骤如下: [root@localhost ~]# yum install gcc[root@localhost ~]# cd /usr/local[root@localhost loca ...

  6. ora00936缺失表达式怎么解决_初学者学习AE经常会遇到问题及解决方法,快进来看看吧!~~...

    关于软件常见问题 请一定要收藏 对初学者的你绝对有用 首先解决的第一个问题是: 软件安装失败提示及解决方案 说起原因 安装失败是由AE的某些文件没有删除干净 (绿化版本极易造成,不建议安装) 解决方案 ...

  7. 安卓手机卡顿怎么解决_手机卡顿怎么办? 几招教你轻松解决!

    看点:iPhone X原装屏与国产屏有哪些区别? 看点:换7P.8P屏幕:C11和DTP和DKH的区别 狮淘:不锈钢拆机片5个只需9.9元!包邮!每天10名 如今手机厂商发布新品的次数越来越多,手机各 ...

  8. 接口请求两次_事故分享之接口请求顺序错乱

    后发的请求先到,先发的请求后到,还有这等事?一起看看占坑防重大法. | 更多事故分享,请锁定公众号:甲蛙全栈 | 01 开篇 之前分享过一篇文章<资深码农给新手的一些建议--项目开发>,里 ...

  9. unresolved external symbol怎么解决_收藏!用Kubernetes和PKS 1.5解决Windows Server2008的问题...

    随着Windows Server 2019的发布,Windows Server 2008即将与我们告别,并将于2020年1月14日停止服务. 不知您企业的迁移计划制定的如何了?对于IT部门来说,这种因 ...

最新文章

  1. Composer使用
  2. java 生成二维码 QRCode、zxing 两种方式
  3. Python 技术篇-用pytesseract库进行图像识别之环境配置
  4. python 正则 去除字符串中异常字符
  5. Spring 体系结构详解
  6. Zara带你快速入门WPF(4)---Command与功能区控件
  7. 多列集合的索引器实现
  8. JS 构造图片Image对象
  9. html js css如何关联_会html+css+js就能把前端项目发布到多个平台
  10. java响应式网页设计_基于HTML5的响应式网站的设计与实现(论文).docx
  11. 如何成为一名Web前端开发人员?入行学习完整指南
  12. 微信公众开放平台开发06---复习一下servlet
  13. 深度学习框架如何优雅的做算子对齐任务?
  14. Java 实体对象转Map
  15. 【AvalonDock】布局控件使用教程
  16. Flutter 实现吹气球动画
  17. 带云的计算机词语,关于写带有云字的词语
  18. golang runtime源码阅读 channal实现
  19. 【安装库】WARNING: A newer version of conda exists.
  20. 大学计算机课桌面弄毛玻璃,高校换上新课桌,同学表示“世界观被颠覆”,网友:黑科技的诞生...

热门文章

  1. springboot 配置错误页面
  2. 如何利用python制作一个解压缩软件
  3. 吴永达老师--项目管理专家--沪师经纪刘建
  4. outlook邮箱怎么删除服务器数据,outlook邮箱怎么修改默认删除服务器邮件?
  5. c语言银行三个窗口,[离散事件模拟] 银行窗口模拟 - C语言
  6. SaaS技术虎跃龙腾!这些大厂卡位跟进Serverless!
  7. 性格特征、性格特点有哪些?描述一个人。自我介绍。简历。
  8. 如何取消 Google Cloud Platform 试用 关闭 GCP 帐号 删除信用卡 取消订阅
  9. 强烈推荐的几个微信小程序开发小技巧,简单又实用
  10. Unity3D数学之坐标系,向量与四元素