@@ -192,37 +192,11 @@ export const HeaderDetails = inject('accountStore')(observer((props: {
192
192
return < BlankContentPlaceholder > (None)</ BlankContentPlaceholder >
193
193
}
194
194
195
- let [ pseudoHeaders , normalHeaders ] = _ . partition ( sortedHeaders , ( [ key ] ) =>
196
- props . httpVersion >= 2 && key . startsWith ( ':' )
197
- ) ;
198
-
199
- if ( normalHeaders . length === 0 ) {
200
- normalHeaders = pseudoHeaders ;
201
- pseudoHeaders = [ ] ;
202
- }
195
+ // Filter out HTTP/2 pseudo-headers - they're not relevant, as all details (URL,
196
+ // method, status, etc) are shown elsewhere.
197
+ const normalHeaders = sortedHeaders . filter ( ( [ key ] ) => ! key . startsWith ( ':' ) ) ;
203
198
204
199
return < HeadersGrid >
205
- {
206
- pseudoHeaders . length > 0 && < CollapsibleSection
207
- withinGrid = { true }
208
- contentName = 'pseudo headers'
209
- >
210
- < CollapsibleSectionSummary >
211
- < PseudoHeadersHiddenMessage >
212
- HTTP/{
213
- props . httpVersion . toString ( ) . replace ( '.0' , '' )
214
- } pseudo-headers
215
- </ PseudoHeadersHiddenMessage >
216
- </ CollapsibleSectionSummary >
217
-
218
- < PseudoHeadersContent >
219
- < PseudoHeaderDetails
220
- headers = { pseudoHeaders }
221
- />
222
- </ PseudoHeadersContent >
223
- </ CollapsibleSection >
224
- }
225
-
226
200
{ _ . flatMap ( normalHeaders , ( [ key , value ] , i ) => {
227
201
const docs = getHeaderDocs ( key ) ;
228
202
const description = getHeaderDescription (
@@ -249,18 +223,3 @@ export const HeaderDetails = inject('accountStore')(observer((props: {
249
223
} ) }
250
224
</ HeadersGrid > ;
251
225
} ) ) ;
252
-
253
- const PseudoHeaderDetails = observer ( ( props : {
254
- headers : RawHeaders
255
- } ) => {
256
- return < HeadersGrid >
257
- { _ . flatMap ( props . headers , ( [ key , value ] , i ) => {
258
- return < CollapsibleSection
259
- contentName = { `${ key } header details` }
260
- withinGrid = { true }
261
- key = { `${ key } -${ i } ` } >
262
- < HeaderKeyValue headerKey = { key } headerValue = { value } />
263
- </ CollapsibleSection > ;
264
- } ) }
265
- </ HeadersGrid > ;
266
- } ) ;
0 commit comments