@@ -107,9 +107,9 @@ export class WebClientServer {
107
107
// callback support
108
108
return this . _handleCallback ( res ) ;
109
109
}
110
- if ( / ^ \/ e x t e n s i o n R e s o u r c e \/ / . test ( pathname ) ) {
110
+ if ( / ^ \/ w e b - e x t e n s i o n - r e s o u r c e \/ / . test ( pathname ) ) {
111
111
// extension resource support
112
- return this . _handleExtensionResource ( req , res , parsedUrl ) ;
112
+ return this . _handleWebExtensionResource ( req , res , parsedUrl ) ;
113
113
}
114
114
115
115
return serveError ( req , res , 404 , 'Not found.' ) ;
@@ -142,10 +142,10 @@ export class WebClientServer {
142
142
/**
143
143
* Handle extension resources
144
144
*/
145
- private async _handleExtensionResource ( req : http . IncomingMessage , res : http . ServerResponse , parsedUrl : url . UrlWithParsedQuery ) : Promise < void > {
146
- // Strip `/extensionResource /` from the path
145
+ private async _handleWebExtensionResource ( req : http . IncomingMessage , res : http . ServerResponse , parsedUrl : url . UrlWithParsedQuery ) : Promise < void > {
146
+ // Strip `/web-extension-resource /` from the path
147
147
const normalizedPathname = decodeURIComponent ( parsedUrl . pathname ! ) ; // support paths that are uri-encoded (e.g. spaces => %20)
148
- const path = normalize ( normalizedPathname . substr ( '/extensionResource /' . length ) ) ;
148
+ const path = normalize ( normalizedPathname . substr ( '/web-extension-resource /' . length ) ) ;
149
149
150
150
const url = URI . parse ( path ) . with ( {
151
151
scheme : this . _productService . extensionsGallery ?. resourceUrlTemplate ? URI . parse ( this . _productService . extensionsGallery . resourceUrlTemplate ) . scheme : 'https' ,
@@ -239,7 +239,7 @@ export class WebClientServer {
239
239
'resourceUrlTemplate' : resourceUrlTemplate . with ( {
240
240
scheme : 'http' ,
241
241
authority : remoteAuthority ,
242
- path : `extensionResource /${ resourceUrlTemplate . authority } ${ resourceUrlTemplate . path } `
242
+ path : `web-extension-resource /${ resourceUrlTemplate . authority } ${ resourceUrlTemplate . path } `
243
243
} ) . toString ( true )
244
244
} : undefined
245
245
}
0 commit comments