Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Issue 600008: Add option to suppress HTTP Referer header. (Closed)

Created:
10 years, 10 months ago by jochen (gone - plz use gerrit)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, darin+cc_chromium.org, jam, ben+cc_chromium.org, eroman
Visibility:
Public.

Description

Add option to suppress HTTP Referer header. BUG=none TEST=start chrome and run tcpdump -A. Should be contain any referer header. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=38587

Patch Set 1 #

Total comments: 8

Patch Set 2 : updates #

Patch Set 3 : kill referer from extra headers #

Total comments: 2

Patch Set 4 : add comment #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -6 lines) Patch
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 chunks +7 lines, -4 lines 1 comment Download
M chrome/common/chrome_switches.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.cc View 3 2 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 20 (0 generated)
jochen (gone - plz use gerrit)
please review.
10 years, 10 months ago (2010-02-09 22:35:24 UTC) #1
Peter Kasting
This is b/2379855, isn't it? LGTM http://codereview.chromium.org/600008/diff/1/2 File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/600008/diff/1/2#newcode704 chrome/browser/renderer_host/resource_dispatcher_host.cc:704: request->set_referrer(""); Nit: "" ...
10 years, 10 months ago (2010-02-09 22:39:47 UTC) #2
ian fette
LGTM http://codereview.chromium.org/600008/diff/1/2 File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/600008/diff/1/2#newcode465 chrome/browser/renderer_host/resource_dispatcher_host.cc:465: request->set_referrer(""); std::string() instead of "" as Peter points ...
10 years, 10 months ago (2010-02-09 23:11:04 UTC) #3
jochen (gone - plz use gerrit)
On 2010/02/09 23:11:04, ian fette wrote: > LGTM > > http://codereview.chromium.org/600008/diff/1/2 > File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): ...
10 years, 10 months ago (2010-02-09 23:12:43 UTC) #4
Peter Kasting
On 2010/02/09 23:11:04, ian fette wrote: > http://codereview.chromium.org/600008/diff/1/3#newcode440 > chrome/common/chrome_switches.cc:440: // Don't send HTTP-Referrer headers. ...
10 years, 10 months ago (2010-02-09 23:14:06 UTC) #5
jochen (gone - plz use gerrit)
On 2010/02/09 23:14:06, Peter Kasting wrote: > On 2010/02/09 23:11:04, ian fette wrote: > > ...
10 years, 10 months ago (2010-02-09 23:15:36 UTC) #6
jochen (gone - plz use gerrit)
http://codereview.chromium.org/600008/diff/1/2 File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/600008/diff/1/2#newcode704 chrome/browser/renderer_host/resource_dispatcher_host.cc:704: request->set_referrer(""); On 2010/02/09 22:39:47, Peter Kasting wrote: > Nit: ...
10 years, 10 months ago (2010-02-09 23:16:38 UTC) #7
darin (slow to review)
Hmm... do we need to worry about the case where the HttpRequestInfo::extra_headers contains Referer? I ...
10 years, 10 months ago (2010-02-09 23:28:26 UTC) #8
ian fette
I would personally prefer it if the switch were also "referer" since that is the ...
10 years, 10 months ago (2010-02-09 23:34:46 UTC) #9
jochen (gone - plz use gerrit)
On 2010/02/09 23:34:46, ian fette wrote: > I would personally prefer it if the switch ...
10 years, 10 months ago (2010-02-10 00:37:11 UTC) #10
ian fette
On 2010/02/10 00:37:11, jochen wrote: > On 2010/02/09 23:34:46, ian fette wrote: > > I ...
10 years, 10 months ago (2010-02-10 00:43:10 UTC) #11
darin (slow to review)
http://codereview.chromium.org/600008/diff/14/18 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/600008/diff/14/18#newcode51 net/http/http_network_transaction.cc:51: static const char* const kExtraHeadersToBeStripped[] = { please add ...
10 years, 10 months ago (2010-02-10 06:38:53 UTC) #12
jochen (gone - plz use gerrit)
http://codereview.chromium.org/600008/diff/14/18 File net/http/http_network_transaction.cc (right): http://codereview.chromium.org/600008/diff/14/18#newcode51 net/http/http_network_transaction.cc:51: static const char* const kExtraHeadersToBeStripped[] = { On 2010/02/10 ...
10 years, 10 months ago (2010-02-10 06:52:45 UTC) #13
darin (slow to review)
LGTM http://codereview.chromium.org/600008/diff/8002/7003 File chrome/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/600008/diff/8002/7003#newcode619 chrome/browser/renderer_host/resource_dispatcher_host.cc:619: request->set_referrer(CommandLine::ForCurrentProcess()->HasSwitch( i think this duplication of code is ...
10 years, 10 months ago (2010-02-10 07:20:41 UTC) #14
eroman
Looping-in Jim, since this will impact DNS prefetching (which is using the referrer to accrue ...
10 years, 10 months ago (2010-02-11 07:28:45 UTC) #15
darin (slow to review)
Are you sure it is using the referrer? We often do not have a referrer. ...
10 years, 10 months ago (2010-02-11 08:18:56 UTC) #16
jar (doing other things)
Dns prefetching does indeed use this field. The prefetching monitors all navigations, in part, so ...
10 years, 10 months ago (2010-02-11 18:11:49 UTC) #17
darin (slow to review)
We'd basically need to plumb it all the way back to WebKit if we wanted ...
10 years, 10 months ago (2010-02-11 18:34:17 UTC) #18
jochen (gone - plz use gerrit)
I can imagine that this information would be also useful for other upcoming filtering stuff, ...
10 years, 10 months ago (2010-02-11 18:51:01 UTC) #19
darin (slow to review)
10 years, 10 months ago (2010-02-12 06:35:33 UTC) #20
or distinguish the Referer header from the actual referrer.

-darin



On Thu, Feb 11, 2010 at 10:51 AM, <jochen@chromium.org> wrote:

> I can imagine that this information would be also useful for other upcoming
> filtering stuff, so it might by worthwhile to make it a first_party without
> the
> for_cookies
>
> -j
>
>
> On 2010/02/11 18:34:17, darin wrote:
>
>> We'd basically need to plumb it all the way back to WebKit if we wanted
>> the
>> same information as the referrer but applied uniformly to all requests.
>>  Mozilla has something like this.  Our first-party-for-cookies is almost
>> what you want, but we have tried to not use that for anything but
>> third-party cookie blocking.
>>
>
>  -Darin
>>
>
>
>  On Thu, Feb 11, 2010 at 10:11 AM, Jim Roskind <mailto:jar@chromium.org>
>> wrote:
>>
>
>  > Dns prefetching does indeed use this field.  The prefetching monitors
>> all
>> > navigations, in part, so that it can calculate benefits.  As a second
>> use,
>> > when a navigation takes place to a host that was *not* anticipated
>> > (prefetched), the prefetcher tries to use the referrer field to learn
>> what
>> > it should prefetch (as a subresource of the referrer) in the future.
>> >
>> > If there were an alternate slot that carried this information, separate
>> > from the headers, that would indeed be preferable.  Since you noted
>> there
>> > are some cases where we don't fill in this header, it would be a chance
>> to
>> > express a relationship to the prefetcher that is currently missed.
>> >
>> > Is there such an alternate slot?  or.... Should I create such a
>> slot?....
>> > and then... in what class do you suggest landing and maintaining it?
>> >
>> > Jim
>> >
>> >
>> > On Thu, Feb 11, 2010 at 12:18 AM, Darin Fisher <mailto:
>> darin@chromium.org>
>>
> wrote:
>
>> >
>> >> Are you sure it is using the referrer?  We often do not have a
>> referrer.
>> >>  We should never use the HTTP referrer for anything other than sending
>> it
>>
> to
>
>> >> the server since it may not be set in several interesting cases.
>> >>
>> >> -Darin
>> >>
>> >>
>> >>
>> >> On Wed, Feb 10, 2010 at 11:28 PM, <mailto:eroman@chromium.org> wrote:
>> >>
>> >>> Looping-in Jim,
>> >>>
>> >>> since this will impact DNS prefetching (which is using the referrer to
>> >>> accrue
>> >>> prefetch benefit.)
>> >>>
>> >>>
>> >>> http://codereview.chromium.org/600008
>> >>>
>> >>
>> >>
>> >
>>
>
>
>
>
> http://codereview.chromium.org/600008
>

Powered by Google App Engine
This is Rietveld 408576698