@@ -63,8 +63,6 @@ export default class ResourcesTable extends SqliteTable<IResourcesRecord> {
6363 didBlockResource : boolean ;
6464 browserRequestId ?: string ;
6565 isHttp2Push : boolean ;
66- browserServedFromCache ?: 'service-worker' | 'disk' | 'prefetch' | 'unspecified' ;
67- browserLoadFailure ?: string ;
6866 browserBlockedReason ?: string ;
6967 browserCanceled ?: boolean ;
7068 } ,
@@ -81,6 +79,12 @@ export default class ResourcesTable extends SqliteTable<IResourcesRecord> {
8179 ...error ,
8280 } ) ;
8381 }
82+ let contentEncoding : string ;
83+ if ( meta . response && meta . response . headers ) {
84+ contentEncoding = < string > (
85+ ( meta . response . headers [ 'Content-Encoding' ] ?? meta . response . headers [ 'content-encoding' ] )
86+ ) ;
87+ }
8488 return this . queuePendingInsert ( [
8589 meta . id ,
8690 extras . browserRequestId ,
@@ -101,7 +105,7 @@ export default class ResourcesTable extends SqliteTable<IResourcesRecord> {
101105 meta . response ? JSON . stringify ( meta . response . headers ?? { } ) : undefined ,
102106 meta . response ? JSON . stringify ( meta . response . trailers ?? { } ) : undefined ,
103107 meta . response ?. timestamp ,
104- meta . response ?. headers [ 'Content-Encoding' ] ?? meta . response ?. headers [ 'content-encoding' ] ,
108+ contentEncoding ,
105109 meta . response ? body : undefined ,
106110 extras . socketId ,
107111 extras . clientAlpn ,
@@ -111,8 +115,8 @@ export default class ResourcesTable extends SqliteTable<IResourcesRecord> {
111115 extras . didBlockResource ? 1 : 0 ,
112116 JSON . stringify ( extras . originalHeaders ?? { } ) ,
113117 errorString ,
114- extras . browserServedFromCache ,
115- extras . browserLoadFailure ,
118+ meta . response ? .browserServedFromCache ,
119+ meta . response ? .browserLoadFailure ,
116120 extras . browserBlockedReason ,
117121 extras . browserCanceled ? 1 : 0 ,
118122 ] ) ;
0 commit comments