Cookie、HTTP GET 和查询字符串

发布于 2024-07-15 19:52:05 字数 432 浏览 4 评论 0原文

美国纽约南区地方法院在 Doubleclick Inc. 案中指出:

“GET 信息作为网站地址或“URL”的一部分提交,即所谓的“查询字符串”。例如,对假设的在线唱片店选择 Bon Jovi 专辑的请求可能会这样:http://recordstore. 以“?”开头,这意味着 cookie 会记录用户请求的有关 Bon Jovi 的信息。

hyperthetical.com/search?terms=bonjovi。 URL查询字符串 ?”会让cookie记录用户请求的信息?如果是这样,什么RFC/标准包含这个?

编辑:我知道美国地方法院没有定义标准,但我想有一些具体的东西来说明它们是不正确。

The United States District Court for the Southern District of New York in re Doubleclick Inc. stated:

"GET information is submitted as part of a Web site's address or "URL," in what is known as a "query string." For example, a request for a hypothetical online record store's selection of Bon Jovi albums might read: http://recordstore.hypothetical.com/search?terms=bonjovi. The URL query string begins with the "?" character meaning the cookie would record that the user requested information about Bon Jovi.

Is it true that a URL query string with a "?" would have the cookie record the user requested information? If so, what RFC/standard includes this?

Edit: I understand the United States District Court doesn't define standards, but I would like to have something concrete to note that they were incorrect.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

一梦浮鱼 2024-07-22 19:52:05

如果您阅读了整个文档,你会注意到他们说

DoubleClick 的 Cookie 仅收集
上述步骤中的信息
流程:第一步。 cookie捕获
通信的某些部分
用户发送到
DoubleClick 附属网站。
他们
分三部分收集这些信息
方式:(1)“GET”提交、(2)
“POST”提交,以及 (3)“GIF”
提交内容。

它们描述的是 DoubleClick 使用的流程,而不是互联网标准。

您(以及任何其他人,包括 DoubleClick)可以获取您可用的信息(包括可能作为 GET 的一部分发送的信息)提交)并将其存储在 cookie 中。

您应该解释有问题的句子(在上下文< /a>),如下所示:

  1. DoubleClick 将查询字符串中的信息存储在 cookie 中。
  2. URL 查询字符串是 URL 中以“?”开头的部分。 特点。
  3. 假设 URL 的查询字符串部分是“Bon Jovi”。
  4. DoubleClick 的流程将使用 cookie 来记录用户请求的有关 Bon Jovi 的信息

支持的结论:

DoubleClick 从 URL 查询字符串(这是 URL 中以“? ”开头的部分)获取信息。 ") 并使用 cookie 来记录用户请求的信息。

不支持的结论:

带有“?”的 URL 查询字符串 会让cookie记录用户请求的信息。 有一些 RFC 描述了这种行为。

If you read the whole document, you'll note that they say

DoubleClick's cookies only collect
information from one step of the above
process: Step One. The cookies capture
certain parts of the communications
that users send to
DoubleClick-affiliated Web sites.
They
collect this information in three
ways: (1) "GET" submissions, (2)
"POST" submissions, and (3) "GIF"
submissions.

They are describing a process used by DoubleClick, not an internet standard.

You (and anyone else, including DoubleClick) can take information that is available to you (including information that might be sent as part of a GET submission) and store it in a cookie.

You should interpret the sentence in question (in context) like this:

  1. DoubleClick stores information from the query string in a cookie.
  2. The URL query string is the portion of a URL that begins with the "?" character.
  3. The query string portion of the hypothetical URL is "Bon Jovi".
  4. DoubleClick's process would use a cookie to record that the user requested information about Bon Jovi

Supported Conclusion:

DoubleClick takes/took information from a URL query string (which is the part of the URL that begins with a "?") and uses a cookie to record information that the user requested.

Unsupported Conclusion:

A URL query string with a "?" would have the cookie record the user requested information. There exists some RFC that describes this behavior.

拥有 2024-07-22 19:52:05

当然可以将查询字符串存储在 cookie 中,但没有强制执行此操作的技术标准。

他们可能引用了特定网站上代码的特定内容,该网站可能将查询字符串存储在 cookie 中。

It's certainly possible to store the query string in a cookie, but there is no technical standard that forces that to occur.

They are likely referencing something specific to the code on that specific website, which is presumably storing the query string in a cookie.

寄居人 2024-07-22 19:52:05

Cookie 的设置和提交与 URL 分开,因此在 HTTP 标头中,它看起来像这样:

GET /search?terms=bonjovi
Cookie:$版本=1; UserId=JohnDoe

查询字符串存储在 cookie 中的唯一方法是 cookie 路径与重写的 URL 结合使用,或者服务器明确设置带有某种 id 或查询字符串的 cookie。

Cookies get set and submitted seperately from the URL, so in the HTTP-header it would look like this:

GET /search?terms=bonjovi
Cookie: $Version=1; UserId=JohnDoe

The only way the query string would be stored in a cookie would be if a cookie path is used in conjunction with rewritten URLS or if the server explicitely sets a cookie with some sort of id or the query string.

趴在窗边数星星i 2024-07-22 19:52:05

上次我检查时,美国纽约南区地方法院没有定义互联网标准。

查询字符串不会影响cookie,它们以一种草率的方式使用技术语言。

Last time I checked, the US District Court for the Southern District of New York didn't define Internet standards.

The query string does not affect the cookies, they are using technical language in a sloppy way.

找回味觉 2024-07-22 19:52:05

该文本可能只是一个示例,您不应该坚持这样做。

在查询字符串中包含任何文本并不意味着 cookie 是使用该信息创建的,尽管某些网站可能包含额外的代码来执行此操作。

That text may be just an example and you shouldn't stick to that.

Including any text in the query string does not imply a cookie is created with that information, although some sites may contain additional code to do so.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文