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
- About the location in the response header
14 Header Field Definitions
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.
URL tailing slash的更多相关文章
- js正则表达式之解析——URL的正则表达式
首先,此片文章并不是直接告诉你,url的正则表达式是什么,以及怎么使用这个正则表达式去解析一个URL地址,相信这种问题在网络上已经能找到很多.本文的宗旨在于教你如何理解URL的正则表达式,以达到理解正 ...
- Clouda聊天室实践
1.Clouda说明 Clouda是简单,可依赖的实时Javascript框架.对一个想开发移动webapp的开发者来说,可以使用clouda开发框架,实现一个功能和体验与native app齐平的轻 ...
- Javascript 语言精粹 代码片段合集
Javascript 语言精粹 代码片段合集 标签:Douglas-Crockford Javascript 最佳实践 原文链接 更好的阅读体验 使用一个method 方法定义新方法 Function ...
- jfinal路由简单解析
在jfinal中,通过JFinalFilter对所有的类进行过滤. 以下是路由的调用关系(我在调用关系旁边做了标记,会贴出具体的代码和解释): -1- Config: Routes -2- Inter ...
- keep_on _coding——js_good_parts
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- Regular Expression--Good parts
匹配URL的正则表达式 <!doctype html><html lang="en"><head> <meta charset=" ...
- MongoDB源码分析——mongo与JavaScript交互
mongo与JavaScript交互 源码版本为MongoDB 2.6分支 之前已经说过mongo是MongoDB提供的一个执行JavaScript脚本的客户端工具,执行js其实就是一个js和 ...
- sshj 示例
sshj 示例 开发常常需要去服务器做一些操作,比如配置一下,或者取服务器的配置什么的,需要写点工具方便开发. 下面是一个使用sshj 模拟ssh的过程. package sshStuff; impo ...
- js正则学习
一直对正则很纠结也很畏惧,以前感觉花时间理解一个个奇奇怪怪的符号,还不如直接百度谷歌之. 但知其然不知其所以然也是种痛苦,所以花了两天稍微学了一下,虽然没学很深入彻底,但也比之前进步不少,特此笔记. ...
随机推荐
- 相识不易,要懂珍惜----------Spring Mvc
一.Spring Mvc简介 Spring Mvc也叫Spring Web Mvc,属于表现层额框架.Spring Mvc是Spring框架的一部分,是在Spring3.0后发布的. 二.Spring ...
- 你会喜欢的25个创意的扁平化 LOGO 设计
扁平设计的风暴席卷了整个设计领域,它不仅影响网页设计,也影响了用户界面和标志设计.最近,我们看到了很多大公司,如谷歌和必应开始使用扁平设计的标识. 一个 LOGO 应该简单,显眼和精美,以适应产品的整 ...
- crm2011 使用SOAP 查询单个记录 Retrieve
function getServiceUrl() { var serverUrl = Xrm.Page.context.getServerUrl(); if (serverUrl.ma ...
- -[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object' 解决方法
-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object' 解决方法: 错误:NSMutableD ...
- 之二:CAKeyframeAnimation - 关键帧动画
是CApropertyAnimation的子类,跟CABasicAnimation的区别是:CABasicAnimation只能从一个数值(fromValue)变到另一个数值(toValue),而CA ...
- Android Content Provider基础
Android Content Provider基础 Content Providers Content providers管理对一个结构化的数据集合的访问.它们封装了数据,并且提供了保护数据安全性的 ...
- Failed to push selection: Read-only file system的解决方法
1.获得root权限:adb root 2.设置/system为可读写:adb remount 3.将hosts文件复制到PC:adb pull /system/usr/keylayout/mtk-k ...
- Android 使用xml序列化器生成xml文件
在<Android 生成xml文件>一文中使用流的形式写入xml格式文件,但是存在一定的问题,那就是在短信内容中不能出现<>之类的括号,本文使用xml序列化器来解决 xml序列 ...
- 关于JNI的使用方法
1首先在java里面定义你需要的native方法 2打开cmd,进入doc窗口,如果是android项目就进入到你当前项目的bin目录下,在doc里面输入cd E:\workspace\Test1 也 ...
- 【读书笔记】iOS网络-使用Bonjour实现自组织网络
Bonjour就是这样一种技术:设备可以通过它轻松探测并连接到相同网络中的其他设备,整个过程只需要很少的用户参与或是根本就不需要用户参与.该框架提供了众多适合于移动的使用场景,如基于网络的游戏,设备间 ...