互联网传输技术

52 阅读2分钟

传输协议

TCP

传输控制协议;面向连接,可靠传输,连接前需要3次握手

UDP

用户数据报协议;面向无连接,不可靠传输,连接前不需要握手

HTTP状态码

  • 200 OK:表示请求成功,服务器成功返回请求的数据。
  • 201 Created:表示请求已经被成功处理,并且创建了新的资源。
  • 204 No Content:表示请求已经被成功处理,但是服务器没有返回任何数据。
  • 301 Moved Permanently:请求的资源已经被永久性转移,新的URL已经在响应的Location头中给出。
  • 302 Found:请求的资源已经被暂时性转移,新的URL已经在响应的Location头中给出。
  • 304 Not Modified:表示请求的资源并没有被修改,可以使用浏览器缓存中的版本。
  • 400 Bad Request:表示服务器无法理解请求的语法,客户端应该检查请求是否正确。
  • 401 Unauthorized:表示请求需要用户认证,通常是由于缺乏凭据或者凭据无效引起的。
  • 403 Forbidden:表示服务器拒绝请求,通常是由于客户端没有访问资源的权限引起的。
  • 404 Not Found:表示服务器无法找到请求的资源。
  • 500 Internal Server Error:表示服务器遇到了错误,无法完成请求。
  • 503 Service Unavailable:表示服务器暂时无法处理请求,可能是由于过载或维护引起的。

常见文件下载返回的content-type

.doc application/msword

.dot application/msword

.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document

.dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template

.docm application/vnd.ms-word.document.macroEnabled.12

.dotm application/vnd.ms-word.template.macroEnabled.12

.xls application/vnd.ms-excel

.xlt application/vnd.ms-excel

.xla application/vnd.ms-excel

.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

.xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template

.xlsm application/vnd.ms-excel.sheet.macroEnabled.12

.xltm application/vnd.ms-excel.template.macroEnabled.12

.xlam application/vnd.ms-excel.addin.macroEnabled.12

.xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12

.ppt application/vnd.ms-powerpoint

.pot application/vnd.ms-powerpoint

.pps application/vnd.ms-powerpoint

.ppa application/vnd.ms-powerpoint

.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation

.potx application/vnd.openxmlformats-officedocument.presentationml.template

.ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow

.ppam application/vnd.ms-powerpoint.addin.macroEnabled.12

.pptm application/vnd.ms-powerpoint.presentation.macroEnabled.12

.potm application/vnd.ms-powerpoint.presentation.macroEnabled.12

.ppsm application/vnd.ms-powerpoint.slideshow.macroEnabled.12