服务器是否向referer链接或同一源链接发送响应? [英] Is server send response to referer link or the same origin link?

查看:96
本文介绍了服务器是否向referer链接或同一源链接发送响应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everyone!



在http请求/响应消息中,客户端请求服务器如下所示



http请求[

GET /js/standaloneMozLoop.js HTTP / 1.1

主持人:hello.firefox.com

用户代理: Mozilla / 5.0(Windows NT 6.1; WOW64; rv:37.0)Gecko / 20100101 Firefox / 37.0

接受:* / *

接受语言:en-US,en ; q = 0.5

接受编码:gzip,deflate

推荐人:https://hello.firefox.com/dJ_9SWkcHjE

Cookie: _ga = GA1.2.1623609526.1426832126; _gat = 1

连接:keep-alive]



和服务器响应回到客户端的http响应消息如下



http回复[

HTTP / 1.1 200 OK

内容编码:gzip

内容-Security-Policy:frame-ancestors'self'

内容类型:text / css

日期:2015年3月20日星期五07:52:14 GMT
最后修改时间:2015年3月10日星期二18:57:07 GMT

变化:接受编码

X-Frame-Options:SAMEORIGIN

内容长度:716

连接:keep-alive

]。



我的疑问是服务器是否回复对引用链接或主机链接的响应



Referer:https://hello.firefox.com/dJ_9SWkcHjE

$ / b $ b $



主持人:hello.firefox.com

解决方案

如何,服务器如何向referrer链接发送任何内容?该链接不是客户端。而客户不是链接。 HTTP基于TCP:客户端连接到侦听连接的服务器,然后他们开始发送/接收数据,而且,协议建立在客户端 - 服务器技术上:客户端发送HTTP请求,服务器发送HTTP响应(可以有服务器推送,但这是先进的技术)。根本没有发送到链接这样的东西:链接是URL,而不是TCP端点。



-SA

Hello Everyone!

In http request/response messages, client request to a server as below

http request [
GET /js/standaloneMozLoop.js HTTP/1.1
Host: hello.firefox.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://hello.firefox.com/dJ_9SWkcHjE
Cookie: _ga=GA1.2.1623609526.1426832126; _gat=1
Connection: keep-alive]

and server response back to the client with http response message as below

http response [
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Security-Policy: frame-ancestors 'self'
Content-Type: text/css
Date: Fri, 20 Mar 2015 07:52:14 GMT
Last-Modified: Tue, 10 Mar 2015 18:57:07 GMT
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
Content-Length: 716
Connection: keep-alive
].

My doubt is whether the server replies response to the referer link or host link

Referer: https://hello.firefox.com/dJ_9SWkcHjE

or

Host: hello.firefox.com

解决方案

How, how a server could possibly send anything to the referrer link? That link is not a client. And a client is not a "link". HTTP is based on TCP: a client connects to the server listening for connection, and then they start to send/receive data, moreover, the protocol is built on client-server technology: a client sends HTTP request, a server sends HTTP response (there can be server push, but this is advanced technology). There is no such thing as "send to a link" at all: a link is URL, not a TCP endpoint.

—SA


这篇关于服务器是否向referer链接或同一源链接发送响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆