@@ -165,6 +165,7 @@ <h2>Dependencies</h2>
165
165
< li > < dfn data-cite ="!RFC7231#section-6.3.1 " data-lt ="200 response "> 200 status code</ dfn > </ li >
166
166
< li > < dfn data-cite ="!RFC7231#section-6.6 "> 5xx status code</ dfn > </ li >
167
167
< li > < dfn data-cite ="!RFC7234 "> local cache</ dfn > </ li >
168
+ < li > < dfn data-cite ="!RFC7230#section-6.3 "> persistent connections</ dfn > </ li >
168
169
< li > < dfn data-cite ="!RFC7230#section-2.1 " data-lt ="requests "> request</ dfn > </ li >
169
170
< li > < dfn data-cite ="!RFC7231#section-4 "> request method</ dfn > </ li >
170
171
< li > < dfn data-cite ="!RFC7231#section-3 "> resource representation</ dfn > </ li >
@@ -274,6 +275,43 @@ <h2>Network requests</h2>
274
275
< a > HTTP-network fetch</ a > algorithm.
275
276
</ p >
276
277
278
+ < p >
279
+ Regardless of which fetch algorithm and which underlying application and
280
+ transport protocols are used, servicing a < a > network request</ a > consists
281
+ of the following < dfn data-lt ="phase "> phases</ dfn > :
282
+ </ p >
283
+
284
+ < ol >
285
+ < li >
286
+ < dfn > DNS resolution</ dfn > : The user agent uses the Domain Name System
287
+ [[RFC1034]] to resolve a domain name into an IP address of a
288
+ < a > server</ a > can that service HTTP requests to that domain.
289
+ </ li >
290
+
291
+ < li >
292
+ < dfn > Secure connection establishment</ dfn > : The user agent opens a
293
+ connection to the < a > server</ a > , and establishes a secure channel over
294
+ this connection.
295
+ </ li >
296
+
297
+ < li >
298
+ < dfn > Transmission of request and response</ dfn > : Once the secure
299
+ channel is established, the user agent can transmit the HTTP request,
300
+ and receive the response from the < a > server</ a > .
301
+ </ li >
302
+ </ ol >
303
+
304
+ < p >
305
+ The only mandatory phase is the < a > transmission of request and
306
+ response</ a > ; the other phases might not be needed for every < a > network
307
+ request</ a > . For instance, DNS results can be cached locally in the
308
+ user agent, eliminating < a > DNS resolution</ a > for future requests to the
309
+ same domain. Similarly, HTTP < a > persistent connections</ a > allow open
310
+ connections to be shared for multiple requests to the same < a > origin</ a > .
311
+ However, if multiple < a > phases</ a > occur, they will occur in the above
312
+ order.
313
+ </ p >
314
+
277
315
< p >
278
316
A < a > network request</ a > is < dfn
279
317
data-lt ="succeed|succeeded "> successful</ dfn > if the user agent is able
@@ -299,6 +337,28 @@ <h2>Network errors</h2>
299
337
a string.
300
338
</ p >
301
339
340
+ < p >
341
+ Each < a > network error</ a > has a < dfn data-lt-nodefault
342
+ data-lt ="type-phase "> phase</ dfn > , which describes which < a > phase</ a > the
343
+ error occurred in:
344
+ </ p >
345
+
346
+ < dl >
347
+ < dt > < code > dns</ code > </ dt >
348
+ < dd > the error occurred during < a > DNS resolution</ a > </ dd >
349
+
350
+ < dt > < code > connection</ code > </ dt >
351
+ < dd >
352
+ the error occurred during < a > secure connection establishment</ a >
353
+ </ dd >
354
+
355
+ < dt > < code > application</ code > </ dt >
356
+ < dd >
357
+ the error occurred during the < a > transmission of request and
358
+ response</ a >
359
+ </ dd >
360
+ </ dl >
361
+
302
362
< p >
303
363
There are several predefined < a > network error</ a > < a > types</ a > defined in
304
364
< a href ="#predefined-network-error-types "> </ a > .
@@ -315,6 +375,12 @@ <h2>NEL policies</h2>
315
375
delivered to the user agent via HTTP < a > response headers</ a > .
316
376
</ p >
317
377
378
+ < p >
379
+ Each < a > NEL policy</ a > has a < dfn > received IP address</ dfn > , which is the
380
+ IP address of the < a > server</ a > that the user agent received this < a > NEL
381
+ policy</ a > from.
382
+ </ p >
383
+
318
384
< p >
319
385
Each < a > NEL policy</ a > has an < dfn data-lt-nodefault data-lt ="policy
320
386
origin "> origin</ dfn > .
@@ -611,6 +677,12 @@ <h2>Process policy headers</h2>
611
677
</ p >
612
678
613
679
< dl >
680
+ < dt > < a > received IP address</ a > </ dt >
681
+ < dd >
682
+ the IP address of the < a > server</ a > that the user agent received
683
+ < var > response</ var > from
684
+ </ dd >
685
+
614
686
< dt > < a > origin</ a > </ dt >
615
687
< dd > < var > origin</ var > </ dd >
616
688
@@ -803,6 +875,13 @@ <h2>Generate a network error report</h2>
803
875
fetch and when it was completed or aborted by the user agent.
804
876
</ dd >
805
877
878
+ < dt > < code > phase</ code > </ dt >
879
+ < dd >
880
+ If < var > request</ var > < a > failed</ a > , the < a > phase</ a > of its
881
+ < a > network error</ a > . If < var > request</ var > < a > succeeded</ a > ,
882
+ < code > "application"</ code > .
883
+ </ dd >
884
+
806
885
< dt > < code > type</ code > </ dt >
807
886
< dd >
808
887
If < var > request</ var > < a > failed</ a > , the < a > type</ a > of its
@@ -812,6 +891,33 @@ <h2>Generate a network error report</h2>
812
891
</ dl >
813
892
</ li >
814
893
894
+ < li >
895
+ If < var > request body</ var > 's < code > server_ip</ code > property is
896
+ non-empty, and not equal to < var > policy</ var > 's < a > received IP
897
+ address</ a > :
898
+
899
+ < ol >
900
+ < li >
901
+ Set < var > request body</ var > 's < code > phase</ code > to
902
+ < code > dns</ code > .
903
+ </ li >
904
+ < li >
905
+ Set < var > request body</ var > 's < code > type</ code > to
906
+ < code > dns.changed_address</ code > .
907
+ </ li >
908
+ < li >
909
+ Clear < var > request body</ var > 's < code > status_code</ code > and
910
+ < code > elapsed_time</ code > properties.
911
+ </ li >
912
+ </ ol >
913
+ </ li >
914
+
915
+ < li >
916
+ If < var > policy</ var > 's < a > subdomains</ a > flag is < code > include</ code > ,
917
+ and < var > request body</ var > 's < code > phase</ code > property is not
918
+ < code > dns</ code > , abort these steps.
919
+ </ li >
920
+
815
921
< li >
816
922
< p > < a data-cite ="!REPORTING#queue-report "> Queue the report for delivery</ a > via the Reporting API. [[!REPORTING]]</ p >
817
923
@@ -849,16 +955,40 @@ <h2>Predefined network error types</h2>
849
955
and/or one or multiple subgroups.
850
956
</ p >
851
957
852
- < dl class ="reportTypeGroup ">
958
+ < section >
959
+ < h2 > DNS resolution errors</ h2 >
960
+
961
+ < p >
962
+ All of the < a > network errors</ a > in this section occur during the
963
+ < a > DNS resolution</ a > < a > phase</ a > , and therefore have a < a data-lt ="type
964
+ phase "> phase</ a > of < code > dns</ code > .
965
+ </ p >
966
+
967
+ < dl >
853
968
< dt > < code > dns.unreachable</ code > </ dt >
854
969
< dd > DNS server is unreachable</ dd >
855
970
< dt > < code > dns.name_not_resolved</ code > </ dt >
856
971
< dd > DNS server responded but is unable to resolve the address</ dd >
857
972
< dt > < code > dns.failed</ code > </ dt >
858
973
< dd > Request to the DNS server failed due to reasons not covered by previous errors</ dd >
974
+ < dt > < code > dns.changed_address</ code > </ dt >
975
+ < dd >
976
+ Indicates that the resolved IP address for a request's < a > origin</ a > has
977
+ changed since the corresponding < a > NEL policy</ a > was received
978
+ </ dd >
859
979
</ dl >
980
+ </ section >
981
+
982
+ < section >
983
+ < h2 > Secure connection establishment errors</ h2 >
860
984
861
- < dl class ="reportTypeGroup ">
985
+ < p >
986
+ All of the < a > network errors</ a > in this section occur during the
987
+ < a > secure connection establishment</ a > < a > phase</ a > , and therefore have a
988
+ < a data-lt ="type phase "> phase</ a > of < code > connection</ code > .
989
+ </ p >
990
+
991
+ < dl >
862
992
< dt > < code > tcp.timed_out</ code > </ dt >
863
993
< dd > TCP connection to the server timed out</ dd >
864
994
@@ -884,7 +1014,7 @@ <h2>Predefined network error types</h2>
884
1014
< dd > The TCP connection failed due to reasons not covered by previous errors</ dd >
885
1015
</ dl >
886
1016
887
- < dl class =" reportTypeGroup " >
1017
+ < dl >
888
1018
< dt > < code > tls.version_or_cipher_mismatch</ code > </ dt >
889
1019
< dd > The TLS connection was aborted due to version or cipher mismatch</ dd >
890
1020
@@ -915,8 +1045,18 @@ <h2>Predefined network error types</h2>
915
1045
< dt > < code > tls.failed</ code > </ dt >
916
1046
< dd > The TLS connection failed due to reasons not covered by previous errors</ dd >
917
1047
</ dl >
1048
+ </ section >
1049
+
1050
+ < section >
1051
+ < h2 > Transmission of request and response errors</ h2 >
918
1052
919
- < dl class ="reportTypeGroup ">
1053
+ < p >
1054
+ All of the < a > network errors</ a > in this section occur during the
1055
+ < a > transmission of request and response</ a > < a > phase</ a > , and therefore
1056
+ have a < a data-lt ="type phase "> phase</ a > of < code > application</ code > .
1057
+ </ p >
1058
+
1059
+ < dl >
920
1060
< dt > < code > http.protocol.error</ code > </ dt >
921
1061
< dd > The connection was aborted due to an HTTP protocol error</ dd >
922
1062
@@ -931,13 +1071,14 @@ <h2>Predefined network error types</h2>
931
1071
932
1072
</ dl >
933
1073
934
- < dl class =" reportTypeGroup " >
1074
+ < dl >
935
1075
< dt > < code > abandoned</ code > </ dt >
936
1076
< dd > User aborted the resource fetch before it is complete</ dd >
937
1077
938
1078
< dt > < code > unknown</ code > </ dt >
939
1079
< dd > error type is unknown</ dd >
940
1080
</ dl >
1081
+ </ section >
941
1082
942
1083
</ section >
943
1084
0 commit comments