[Checkins] [zopefoundation/zope.testbrowser] 2d3a6f: Stop sending Referer on browser.open/browser.post

Colin Watson noreply at github.com
Mon Nov 11 18:20:09 CET 2019


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/zope.testbrowser
  Commit: 2d3a6fa60186dda1461e6249a2558a030377b460
      https://github.com/zopefoundation/zope.testbrowser/commit/2d3a6fa60186dda1461e6249a2558a030377b460
  Author: Colin Watson <cjwatson at debian.org>
  Date:   2019-11-11 (Mon, 11 Nov 2019)

  Changed paths:
    M CHANGES.rst
    M src/zope/testbrowser/browser.py
    M src/zope/testbrowser/tests/test_browser.py

  Log Message:
  -----------
  Stop sending Referer on browser.open/browser.post

RFC 2616 14.36 says: "The Referer field MUST NOT be sent if the
Request-URI was obtained from a source that does not have its own URI,
such as input from the user keyboard."  In the context of a test
browser, `browser.open` is analogous to input from the user keyboard and
should not result in sending a `Referer` header.

We save the previous request's referrer in order to maintain the
appropriate state for `browser.reload`.

Fixes #87.


  Commit: 1c4c4284739dbd26ba00e063a9ed9c42d73cb078
      https://github.com/zopefoundation/zope.testbrowser/commit/1c4c4284739dbd26ba00e063a9ed9c42d73cb078
  Author: Colin Watson <cjwatson at ubuntu.com>
  Date:   2019-11-11 (Mon, 11 Nov 2019)

  Changed paths:
    M CHANGES.rst
    M src/zope/testbrowser/browser.py
    M src/zope/testbrowser/tests/test_browser.py

  Log Message:
  -----------
  Merge pull request #88 from cjwatson/fix-referrer

Stop sending Referer on browser.open/browser.post


Compare: https://github.com/zopefoundation/zope.testbrowser/compare/c7755680e7fc...1c4c4284739d


More information about the checkins mailing list