File: README.md

package info (click to toggle)
chromium 139.0.7258.127-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,122,156 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (32 lines) | stat: -rw-r--r-- 2,020 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Network Error Logging (NEL)

Network Error Logging (NEL) provides out-of-band reporting of network errors
via the Reporting API (see `//net/reporting`). Site operators can specify a
NEL policy that defines the Reporting endpoint(s) on which they wish to receive
reports about client-side errors encountered while connecting to the site. The
draft spec can be found [here](https://w3c.github.io/network-error-logging/).

This directory contains the core implementation of NEL.

## Implementation overview

Most of the action takes place in
[`NetworkErrorLoggingService`](https://source.chromium.org/chromium/chromium/src/+/main:net/network_error_logging/network_error_logging_service.h;l=42;drc=a9e9d6cbb3e5920f9207118cf9501ff0745bb536),
which handles receiving/processing `NEL:` response headers and
generating/queueing reports about network requests. The
`NetworkErrorLoggingService` is owned by the `URLRequestContext`.

Information about network requests comes directly from
[`HttpNetworkTransaction`](https://source.chromium.org/chromium/chromium/src/+/main:net/http/http_network_transaction.cc;l=1364;drc=a9e9d6cbb3e5920f9207118cf9501ff0745bb536),
which informs `NetworkErrorLoggingService` of the details of the request such
as the remote IP address and outcome (a `net::Error` code).

The `NetworkErrorLoggingService` finds a NEL policy applicable to the request
(previously set by a `NEL` header), and if one exists, potentially queues a
NEL report to be uploaded out-of-band to the policy's specified Reporting
endpoint via the
[`ReportingService`](https://source.chromium.org/chromium/chromium/src/+/main:net/reporting/reporting_service.h;l=56;drc=c3305c04ac6800d488bfc8b2f3249fd13186984a).

Received NEL policies are persisted to disk by a `PersistentNelStore`, whose
main implementation is the
[`SqlitePersistentReportingAndNelStore`](https://source.chromium.org/chromium/chromium/src/+/main:net/extras/sqlite/sqlite_persistent_reporting_and_nel_store.h;l=30;drc=456596a0b27623349d38e49d0e9812b24d47d5d8).