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正则学习
一直对正则很纠结也很畏惧,以前感觉花时间理解一个个奇奇怪怪的符号,还不如直接百度谷歌之. 但知其然不知其所以然也是种痛苦,所以花了两天稍微学了一下,虽然没学很深入彻底,但也比之前进步不少,特此笔记. ...
随机推荐
- singleCall单来源调用解析及实现
定义: 单来源调用指一个类的生成工作只能由特定类来执行. eg李宁牌鞋子只能由李宁专卖店生产 这个问题归结起来,也就是说在工厂模式中,指定的产品类只能通过具体的特定工厂类来生成,而不能自己new出来或 ...
- [Cordova] 无法显示Alert视窗
[Cordova] 无法显示Alert视窗 问题情景 今天开了一个Cordova专案做范例,将预设的index.html页面修改为下列内容.按下执行却发现,这样一个简单的范例无法正常执行.点击页面上的 ...
- a标签的target属性
_blank 浏览器总在一个新打开.未命名的窗口中载入目标文档. _self 这个目标的值对所有没有指定目标的 <a> 标签是默认目标,它使得目标文档载入并显示在相同的框架或者窗口中作为源 ...
- ADO.NET操作数据库(一)
---恢复内容开始--- [1]ADO.Net简介2015-12-07-20:16:05 ADO.Net提供对Microsoft SQL Server数据源以及通过OLE DB和XML公开的数据源的一 ...
- emberjs学习二(ember-data和localstorage_adapter)
emberjs学习二(ember-data和localstorage_adapter) 准备工作 首先我们加入ember-data和ember-localstorage-adapter两个依赖项,使用 ...
- Spring(3)—— Junit框架单元测试
Junit主要用于单元测试,即白盒测试.它是一个开源的由JAVA开发的一个用于测试的框架. Junit的几个基本概念:TestCase,TestSuite,TestFixtrue TestCase:代 ...
- ae显示标注
//添加标注,比TextElment功能更强大 public static void ToAddAnnotate(ILayer layer, string fieldName) { IGeoFeatu ...
- ReflectUitls类的编写和对反射机制的解析
ReflectUitls类的编写和对反射机制的解析 反射相关的类 反射相关的类,最基本的当然是Class类. 获取了Class对象之后,就可以接着生成对象实例.调用方法.查看字段等等. 字段(Fiel ...
- Android 6 检查权限代码
private static final int MY_PERMISSIONS_REQUEST_READ_CONTACTS= 0; //检查目前是否有权限 if (checkSelfPermissio ...
- Android 常见对话框
1.对话框通知(Dialog Notification) 当你的应用需要显示一个进度条或需要用户对信息进行确认时,可以使用对话框来完成. 下面代码将打开一个如图所示的对话框: public void ...