Skip to content

Commit

Permalink
fix asset handling (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch authored Feb 11, 2025
1 parent 814ca77 commit eb02ecb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/HTTPServer/implementation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ function online_url(server::Server, url)
if isempty(base_url)
return local_url(server, url)
else
if endswith(base_url, "/") && startswith(url, "/")
url = url[2:end]
end
return base_url * url
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/asset-serving/http.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function (server::HTTPAssetServer)(context)
return HTTP.Response(200, header; body=asset.data)
else
data = nothing
if isempty(asset.bundle_data)
if !isempty(asset.bundle_data)
data = asset.bundle_data
else
if isfile(local_path(asset))
Expand Down

0 comments on commit eb02ecb

Please sign in to comment.