Commit 51601dc3 authored by sigbjornf@opera.com's avatar sigbjornf@opera.com

Use a precise target type for Beacon requests.

To allow the embedder to distinguish POST requests emanating from
sendBeacon() from those from a <a ping>, assign a more precise target
type to the former.

This is done in preparation for adding Beacon-Age: headers to Beacon
requests.

R=mkwst@chromium.org
BUG=398167

Review URL: https://codereview.chromium.org/468853002

git-svn-id: svn://svn.chromium.org/blink/trunk@180179 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent fa5b9081
......@@ -21,8 +21,7 @@ namespace blink {
void BeaconLoader::prepareRequest(LocalFrame* frame, ResourceRequest& request)
{
// NOTE: do not distinguish Beacon by target type.
request.setRequestContext(blink::WebURLRequest::RequestContextPing);
request.setRequestContext(WebURLRequest::RequestContextBeacon);
request.setHTTPMethod("POST");
request.setHTTPHeaderField("Cache-Control", "max-age=0");
request.setAllowStoredCredentials(true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment