HTTP status code and troubleshooting

Miao Ying Hall 2021-01-14 17:53:19
http status code troubleshooting


background

Web Firewalls often encounter all kinds of status codes , The customer doesn't know why . According to the official documents , Sort out all the HTTP Status code and its meaning , And the common handling methods of abnormal status code , Improve the efficiency of problem handling .

Reference documents :https://www.restapitutorial.com/httpstatuscodes.html

Status code summary

Due to part 4xx and 5xx More status codes , And I haven't met , So the part didn't write , If you need to see all of them, please refer to the reference documents

Main status code description

Let's talk about the meaning of each status code :

1xx Request process or protocol conversion

2xx Request succeeded

3xx The request has been transferred

4xx The request cannot reach the server , Or the server refused

5xx Request to server , The server didn't want to respond or something went wrong with the response

101

Common in websocket, Protocol conversion

301 302

301 Permanent transfer , In short, the website before the transfer is gone

302 A temporary transfer , The site before the transfer is still , such as http Jump to https General use 302

difference : encounter 301 The search engine grabs new content when it's done , And put on a new one URL; encounter 302 when , Because it's temporary , Search engines grab new content , Keep the original URL

307 308

307 The definition of is actually and 302 It's consistent , The only difference is that ,307 The status code does not allow the browser to change the original POST The request for is redirected to GET On the request .

308 And 301 The definitions are the same , The only difference is ,308 The status code does not allow the browser to change the original to POST The request of the top to GET On the request .

400

400 yes bad request, Generally speaking , What happens is web The server has no corresponding configuration , For example, there is no domain name configured , No corresponding protocol is configured (http/https No, but use corresponding access )

401

unauthorized , such as nginx Configured account password access , But I didn't enter the password

403

Blocking access , such as nginx Configured with deny, perhaps WAF Interception is configured

404

Resources not found , It's common that the path is incorrect , Or used websocket My website is not open websocket function

499

The client actively disconnects , Generally, this status code appears , You need to check whether there is a problem with the client network , The timeout configuration is too short

500

web Internal error in service , It depends on each web Error log for service , For example, the operating system has too many open files , Script syntax errors and so on

502

The server returned an exception ,web Servers are often accompanied by recv() failed (104: Connection reset by peer) while reading response header from upstream Similar logs , Common reasons like php I can't handle the request , Or when the proxy forwards to the back end, the security group is not open

503

Service not available , Common in apache, For example, the number of connections is not enough

This is just a brief description of the problems we encounter everyday , Continue to update later .

Original statement , This article is authorized by the author + Community publication , Unauthorized , Shall not be reproduced .

If there is any infringement , Please contact the yunjia_community@tencent.com Delete .

版权声明
本文为[Miao Ying Hall]所创,转载请带上原文链接,感谢
https://javamana.com/2021/01/20210114174430981j.html

  1. Learn about RPC, why RPC was born, and what's the difference between RPC and HTTP?
  2. Learn about RPC, why RPC was born, and what's the difference between RPC and HTTP?
  3. Learn java base conversion supplementary learning
  4. JDBC测试连接数据库
  5. JDBC test connection database
  6. 大厂面试官竟然这么爱问Kafka,一连八个Kafka问题把我问蒙了?
  7. The interviewers of big factories love to ask Kafka so much. I'm blinded by eight Kafka questions in a row?
  8. 安卓开发和java开发有什么区别!2021年BATJ30套大厂Android经典高频面试题,面试必问
  9. Spring Security OAuth2.0認證授權四:分散式系統認證授權
  10. What's the difference between Android development and java development! 2021 batj30 Android classic high frequency interview questions
  11. Spring security oauth2.0 authentication and authorization 4: distributed system authentication and authorization
  12. Java微服务 vs Go微服务,究竟谁更强!?
  13. 大厂面试官竟然这么爱问Kafka,一连八个Kafka问题把我问蒙了?
  14. Who is stronger, Java microservice vs go microservice!?
  15. Java微服务 vs Go微服务,究竟谁更强!?
  16. The interviewers of big factories love to ask Kafka so much. I'm blinded by eight Kafka questions in a row?
  17. Who is stronger, Java microservice vs go microservice!?
  18. springboot异常处理之404
  19. Spring boot exception handling 404
  20. Spring Boot Security 国际化 多语言 i18n 趟过巨坑
  21. springboot异常处理之404
  22. Spring boot security international multilingual I18N
  23. Spring boot exception handling 404
  24. Netty系列化之Google Protobuf编解码
  25. Netty之编解码
  26. Java编解码
  27. Netty解码器
  28. Netty与TCP粘包拆包
  29. Netty开发入门
  30. Java集合遍历时遇到的坑
  31. Spring IOC 源码解析(下)
  32. Spring IoC源码解析(上)
  33. Google protobuf codec of netty serialization
  34. Encoding and decoding of netty
  35. Java codec
  36. Netty decoder
  37. Netty and TCP packet sticking and unpacking
  38. Introduction to netty development
  39. Problems encountered in Java collection traversal
  40. Spring IOC source code analysis (2)
  41. Spring IOC source code analysis (Part one)
  42. 半小时用Spring Boot注解实现Redis分布式锁
  43. Implementing redis distributed lock with spring boot annotation in half an hour
  44. What should we do if we can't get tickets for Spring Festival transportation? You can solve this problem by using these ticket grabbing apps!
  45. 百度智能(文本识别),API传图OC代码与SDK使用
  46. springboot源码解析-管中窥豹系列之aware(六)
  47. Baidu intelligent (text recognition), API map, OC code and SDK
  48. Spring boot source code analysis
  49. springboot源码解析-管中窥豹系列之aware(六)
  50. 百度智能(文本识别),API传图OC代码与SDK使用
  51. Spring boot source code analysis
  52. Baidu intelligent (text recognition), API map, OC code and SDK
  53. Java学习笔记
  54. Java learning notes
  55. Sentry(v20.12.1) K8S 雲原生架構探索, SENTRY FOR JAVASCRIPT 手動捕獲事件基本用法
  56. 我的程式設計師之路:自學Java篇
  57. SpringBoot專案,如何優雅的把介面引數中的空白值替換為null值?
  58. Sentry (v20.12.1) k8s cloud native architecture exploration, sentry for JavaScript manual capture event basic usage
  59. My way of programmer: self study java
  60. Spring boot project, how to gracefully replace the blank value in the interface argument with null value?