日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費收錄網(wǎng)站服務(wù),提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

今天配置下分析下Nginx關(guān)于URI的部分,另外需要看下DNS的長度.簡單而已,DNS長度不超過255個octets.我們是用.來分割域名的,那么每個點之間的長度不超過63個octets.

Nginx本身對于傳參的長度大小支持決定于
large_client_header_buffers

下面是詳細(xì)分析過程.

 

nginx location

  • 塊通過指定模式來與客戶端請求的URI相匹配 Sets configuration depending on a request URI.
  • What's different between URI, request-URI and URL? https://stackoverflow.com/questions/34849543/whats-different-between-uri-request-uri-and-url
  • What's different between URI, request-URI and URL?
  • URI vs. URL
  • http://nginx.org/en/docs/http/ngxhttpcore_module.html#location

nginx largeclientheader_buffers

reference:
https://www.digitalocean.com/community/tutorials/understanding-nginx-http-proxying-load-balancing-buffering-and-caching
http://nginx.org/en/docs/http/ngxhttpcoremodule.html#largeclientheaderbuffers
http://nginx.org/en/docs/http/ngxhttpproxymodule.html#proxybuffers
Our nginx.conf configure // largeclientheader_buffers 4 32k;
dump conf from running nginx process ==> As of Nginx 1.9.2 you can dump the Nginx config with the -T flag: ==> /sbin/nginx -T
-t — test the configuration file: nginx checks the configuration for correct syntax, and then tries to open files referred in the configuration.
-T — same as -t, but additionally dump configuration files to standard output (1.9.2). http { include mime.types; default_type Application/octet-stream; #increase proxy buffer size proxy_buffer_size 32k; proxy_buffers 4 128k; proxy_busy_buffers_size 256k; #increase the header size to 32K large_client_header_buffers 4 32k;
  • 1kb=1024 位1kB=1024 字節(jié)
Nginx
  如果您的 nginx 錯誤日志包含 client sent too long URI while reading client request line,則表示請求 URI 已超出允許的限制。
  在 nginx 中,允許的最大 URI 長度由 large_client_header_buffers 指令定義,它由兩個值組成:緩沖區(qū)的數(shù)量和大小。 它默認(rèn)為 4 8k,這意味著 Nginx 將每個請求行限制為 8 KB。
  large_client_header_buffers 4 128K;
  設(shè)置用于讀取大型客戶端請求標(biāo)頭的緩沖區(qū)的最大數(shù)量和大小。 一個請求行不能超過一個緩沖區(qū)的大小,否則會向客戶端返回 414(Request-URI Too Large)錯誤。 請求頭字段也不能超過一個緩沖區(qū)的大小,否則返回 400(Bad Request)錯誤給客戶端。 緩沖區(qū)僅按需分配。 默認(rèn)情況下,緩沖區(qū)大小等于 8K 字節(jié)。 如果在請求處理結(jié)束后連接轉(zhuǎn)換為保持活動狀態(tài),則釋放這些緩沖區(qū)。
  設(shè)置讀取客戶端請求頭的緩沖區(qū)大小。對于大多數(shù)請求,1K 字節(jié)的緩沖區(qū)就足夠了。但是,如果請求中包含長 cookie,或者來自 WAP 客戶端,則可能 1K 是不適用的。如果請求行或請求頭域不適合此緩沖區(qū),則會分配由 large_client_header_buffers 指令配置的較大緩沖區(qū)

linux configure

  • keyword for search [nginx upstream proxy length ]
  • https://www.cyberciti.biz/faq/nginx-upstream-sent-too-big-header-while-reading-response-header-from-upstream/
  • Use the getconf command to find os level page size value in bytes:
  • getconf PAGESIZE 4096

common nginx.conf

```
gsutil cat gs://nginx/a.conf

service=name
enables resolving of DNS SRV records and sets the service name (1.9.13). In order for this parameter to work, it is necessary to specify the resolve parameter for the server and specify a hostname without a port number.
If the service name does not contain a dot (“.”), then the RFC-compliant name is constructed and the TCP protocol is added to the service prefix. For example, to look up the _http._tcp.backend.example.com SRV record, it is necessary to specify the directive:

server backend.example.com service=http resolve;
If the service name contains one or more dots, then the name is constructed by joining the service prefix and the server name. For example, to look up the _http._tcp.backend.example.com and server1.backend.example.com SRV records, it is necessary to specify the directives:

server backend.example.com service=_http._tcp resolve;
server example.com service=server1.backend resolve;
Highest-priority SRV records (records with the same lowest-number priority value) are resolved as primary servers, the rest of SRV records are resolved as backup servers. If the backup parameter is specified for the server, high-priority SRV records are resolved as backup servers, the rest of SRV records are ignored.
```

dns length

  • https://en.wikipedia.org/wiki/Hostname
    • Hostnames are composed of a sequence of labels concatenated with dots. For example, "en.wikipedia.org" is a hostname. Each label must be from 1 to 63 characters long.[2] The entire hostname, including the delimiting dots, has a maximum of 253 ASCII characters.[3]
    • https://www.ietf.org/rfc/rfc1035.txt
    • 2.3.4. Size limits Various objects and parameters in the DNS have size limits. They are listed below. Some could be easily changed, others are more fundamental. labels 63 octets or less names 255 octets or less TTL positive values of a signed 32 bit number. UDP messages 512 octets or less 1. DOMAIN NAME SPACE AND RR DEFINITIONS 3.1. Name space definitions Domain names in messages are expressed in terms of a sequence of labels. Each label is represented as a one octet length field followed by that number of octets. Since every domain name ends with the null label of the root, a domain name is terminated by a length byte of zero. The high order two bits of every length octet must be zero, and the remaining six bits of the length field limit the label to 63 octets or less. To simplify implementations, the total length of a domain name (i.e., label octets and label length octets) is restricted to 255 octets or less. Although labels can contain any 8 bit values in octets that make up a label, it is strongly recommended that labels follow the preferred syntax described elsewhere in this memo, which is compatible with existing host naming conventions. Name servers and resolvers must compare labels in a case-insensitive manner (i.e., A=a), assuming ASCII with zero parity. Non-alphabetic codes must match exactly.
  • https://devblogs.microsoft.com/oldnewthing/20120412-00/?p=7873

about KB

```
首先不同編碼,所占字節(jié)數(shù)不同。
1,ASCII碼:一個英文字母(不分大小寫)占一個字節(jié)的空間,一個中文漢字占兩個字度節(jié)的空間。
2,UTF-8編碼:一個英文字符等于一個字節(jié),一個中文(含繁體)等于三個字節(jié)。中文標(biāo)點占三個字節(jié),英文標(biāo)點占一個字節(jié)
3,Unicode編碼:一個英文等于兩個字節(jié),一個中文(含繁體)等于兩個字節(jié)。中文標(biāo)點占兩個字節(jié),英文標(biāo)點占兩個字節(jié)

字節(jié)是指Byte
字符是一種數(shù)據(jù)類型,通常是char,更具不同語言,占據(jù)不同字節(jié)大小。

- 1kb=1024 位1kB=1024 字節(jié)
using wc :
  -c, --bytes            print the byte counts
  -m, --chars            print the character counts

]$ echo "local-stackdriver-agent.stackdriver.com"|wc -c
40
$ echo "local-stackdriver-agent.stackdriver.com"|wc -m
40
https://blog.csdn.NET/weixin_48702807/article/details/120199304
  getStringSize(text) {
    let textlength = Buffer.byteLength(text, 'utf8'); //得到占多少 bytes

    let size = textlength / 1024; //得到字符串占多少 KB

    return size.toFixed(2);

  },
```

spring context path limitation

  • spring context path limitation
  @RequestMapping(value = {REST_PREFIX + "/{key}"}, method = {RequestMethod.GET})
  public DashboardItem getExceptionByKey(@PathVariable("key") String key, HttpServletRequest request, HttpServletResponse httpResponse_p) {
      log.info("URL is {}", request.getRequestURL());
      log.info("Key is {}", key);
      return InspectionUtils.getExceptionByKey(key);
  }

 

分享到:
標(biāo)簽:URL
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨大挑戰(zhàn)2018-06-03

數(shù)獨一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運動步數(shù)有氧達(dá)人2018-06-03

記錄運動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績評定2018-06-03

通用課目體育訓(xùn)練成績評定