Closed Bug 341340 Opened 16 years ago Closed 16 years ago

microsummary service should identify itself when downloading pages

Categories

(Firefox Graveyard :: Microsummaries, defect, P2)

2.0 Branch
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 2 beta2

People

(Reporter: myk, Assigned: zeniko)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

When the microsummary service downloads a page to summarize it, it should identify itself to the server so the server can adjust pageview stats, block problematic generators, and generally be able to tell the difference between a microsummary service-initiated request and a user-initiated request.

One option is to modify the user-agent for the requests.  Another is to add an extra HTTP header.  Are there others, and which is best?
Status: NEW → ASSIGNED
Whiteboard: [swag: 2d]
We use "X-moz: prefetch" for link-based prefetching, so it might make sense to extend that header.  "X-moz: microsummary" perhaps?
Flags: blocking-firefox2?
We really need this.
Flags: blocking-firefox2? → blocking-firefox2+
(In reply to comment #1)
> We use "X-moz: prefetch" for link-based prefetching, so it might make sense to
> extend that header.  "X-moz: microsummary" perhaps?

Makes sense to me.
Priority: -- → P2
Whiteboard: [swag: 2d] → [swag: 1.5d]
Once bug 339543 is fixed, this should be a matter of adding one line (request.setHeader("X-moz", "microsummary")) to MicrosummaryResource.load -- reducing Microsummary SWAGs by about 1.4 days. Right?
(In reply to comment #4)
> Once bug 339543 is fixed, this should be a matter of adding one line
> (request.setHeader("X-moz", "microsummary")) to MicrosummaryResource.load --
> reducing Microsummary SWAGs by about 1.4 days. Right?

Right.  Adding dependency and reducing swag (but to 0.25d rather than 0.1d, as I'm calculating swag in 0.25d increments).
Depends on: 339543
Whiteboard: [swag: 1.5d] → [swag: 0.25d]
Target Milestone: Firefox 2 beta1 → Firefox 2 beta2
Whiteboard: [swag: 0.25d] → [myk: mss] [swag: 0.25d]
Component: Bookmarks → Microsummaries
Whiteboard: [myk: mss] [swag: 0.25d] → [swag: 0.25d]
Attached patch one-line fix (obsolete) — Splinter Review
Assignee: myk → zeniko
Attachment #229344 - Flags: review?(myk)
Comment on attachment 229344 [details] [diff] [review]
one-line fix

>+    request.setRequestHeader("X-moz", "microsummary");

Works great, just one minor issue: the prefetch service capitalizes the m in moz when adding this header, i.e. it specifies X-Moz rather than X-moz:

http://lxr.mozilla.org/mozilla/source/uriloader/prefetch/nsPrefetchService.cpp#244
http://lxr.mozilla.org/mozilla/source/uriloader/prefetch/nsPrefetchService.cpp#341

We should be consistent with it.
Attachment #229344 - Flags: review?(myk) → review-
Attachment #229344 - Attachment is obsolete: true
Attachment #229737 - Flags: review?(myk)
Comment on attachment 229737 [details] [diff] [review]
one-line fix without nit

Perfect.  Just to make sure this is what we want, let's have Darin sr this.
Attachment #229737 - Flags: superreview?(darin)
Attachment #229737 - Flags: review?(myk)
Attachment #229737 - Flags: review+
Comment on attachment 229737 [details] [diff] [review]
one-line fix without nit

be sure to document this someplace where website admins can easily find it, sr=darin
Attachment #229737 - Flags: superreview?(darin) → superreview+
Whiteboard: [swag: 0.25d] → [has patch][needs trunk landing, approval][checkin needed]
mozilla/browser/components/microsummaries/src/nsMicrosummaryService.js.in 1.26
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][needs trunk landing, approval][checkin needed] → [has patch][needs approval]
Version: Trunk → 2.0 Branch
Comment on attachment 229737 [details] [diff] [review]
one-line fix without nit

Notes for drivers considering this approval request:

This is a trivial fix with a very low risk of regression.  It has been on the trunk since Wednesday morning.
Attachment #229737 - Flags: approval1.8.1?
Comment on attachment 229737 [details] [diff] [review]
one-line fix without nit

a=mconnor on behalf of drivers for checkin to the 1.8 branch
Attachment #229737 - Flags: approval1.8.1? → approval1.8.1+
Keywords: fixed1.8.1
Whiteboard: [has patch][needs approval]
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.