cosven / cosven.github.io

个人零碎笔记,博客草稿,阅读笔记
10 stars 0 forks source link

再来折腾一发自定义网站 #53

Closed cosven closed 3 years ago

cosven commented 7 years ago

不对,不是博客...是记录生活的地方...[2017-1-17] 纠正 记录小事的地方...

功能需求

low-low

高端功能

cosven commented 7 years ago

tornado

概念:Tornado is a Python web framework and asynchronous networking library.

  • [ ] 为什么说是一个 asynchronous networking library

浏览器的地址体现在请求中是啥?

体现在 http header 的 Host 字段。 比如 blog.c.com 或者 c.com https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

cosven commented 7 years ago

两个域名(网站)对应同一个服务

Host 字段相关

Host 字段含义:https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

A client MUST include a Host header field in all HTTP/1.1 request messages . All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field.

django middleware 相关