@@ -120,6 +120,10 @@ func New(options *Options) *API {
120
120
// types to get files.
121
121
r .Get ("/assets/{publisher}/{extension}/{version}/{type}" , api .assetRedirect )
122
122
123
+ // This is the "download manually" URL, which like /assets is hardcoded and
124
+ // ignores the VSIX asset URL provided to VS Code in the response.
125
+ r .Get ("/publishers/{publisher}/vsextensions/{extension}/{version}/{type}" , api .assetRedirect )
126
+
123
127
return api
124
128
}
125
129
@@ -200,10 +204,14 @@ func (api *API) extensionQuery(rw http.ResponseWriter, r *http.Request) {
200
204
func (api * API ) assetRedirect (rw http.ResponseWriter , r * http.Request ) {
201
205
// TODO: Asset URIs can contain a targetPlatform query variable.
202
206
baseURL := httpapi .RequestBaseURL (r , "/" )
207
+ assetType := chi .URLParam (r , "type" )
208
+ if assetType == "vspackage" {
209
+ assetType = database .ExtensionAssetType
210
+ }
203
211
url , err := api .Database .GetExtensionAssetPath (r .Context (), & database.Asset {
204
212
Extension : chi .URLParam (r , "extension" ),
205
213
Publisher : chi .URLParam (r , "publisher" ),
206
- Type : chi . URLParam ( r , "type" ) ,
214
+ Type : assetType ,
207
215
Version : chi .URLParam (r , "version" ),
208
216
}, baseURL )
209
217
if err != nil && os .IsNotExist (err ) {
0 commit comments