zoukankan      html  css  js  c++  java
  • URL tailing slash

    • Without tailing slash

    request header

    GET /snippets HTTP/1.1
    User-Agent: Fiddler
    Host: 192.168.128.132
    

    response header

    HTTP/1.1 301 MOVED PERMANENTLY
    Server: nginx/1.6.2
    Date: Sat, 12 Sep 2015 08:05:41 GMT
    Content-Type: text/html; charset=utf-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    X-Frame-Options: SAMEORIGIN
    Location: http://192.168.128.132/snippets/
    
    • With a tailing slash

    request header

    GET /snippets/ HTTP/1.1
    User-Agent: Fiddler
    Host: 192.168.128.132
    

    response header

    HTTP/1.1 200 OK
    Server: nginx/1.6.2
    Date: Sat, 12 Sep 2015 08:18:15 GMT
    Content-Type: applicaiton/json
    Transfer-Encoding: chunked
    Connection: keep-alive
    X-Frame-Options: SAMEORIGIN
    
    
        14.30 Location>    
        The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI.
               Location       = "Location" ":" absoluteURI 
        An example is:    
               Location: http://www.w3.org/pub/WWW/People.html    
              Note: The Content-Location header field (section 14.14) differs
              from Location in that the Content-Location identifies the original
              location of the entity enclosed in the request. It is therefore
              possible for a response to contain header fields for both Location
              and Content-Location. Also see section 13.10 for cache
              requirements of some methods.
    
  • 相关阅读:
    炒炒饼分锅喂
    奥运会
    360和腾讯QQ共存
    Lenovo F41 使用WinXP不能全屏看Flash格式的电影的解决方法
    如何在Windows server 2003上安装和设置Citrix MetaFrame XP FR3
    “电脑人才”是怎么炼成的
    Lenovo F41 使用WinXP不能全屏看Flash格式的电影的解决方法
    学车
    终于有了自己的本本了
    学车
  • 原文地址:https://www.cnblogs.com/BugQiang/p/4803149.html
Copyright © 2011-2022 走看看