Skip to content

Commit

Permalink
Public resources fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hugithordarson committed Feb 12, 2024
1 parent 9812019 commit 122a3cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ng-appserver/src/main/java/ng/appserver/NGApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,6 @@ private NGResponse noHandlerResponse( final NGRequest request ) {
}

final Optional<byte[]> resourceBytes = resourceManager().bytesForPublicResourceNamed( resourcePath );
System.out.println( "resourcePath: " + resourcePath );
System.out.println( "resourceBytes: " + resourceBytes );
return NGResourceRequestHandler.responseForResource( resourceBytes, resourcePath );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ public JavaClasspathResourceSource( final String basePath ) {
public Optional<InputStream> inputStreamForResourceWithPath( String resourcePath ) {
Objects.requireNonNull( resourcePath );

// FIXME: To fix up some mess with public resources. Needs to be fixed at the origin site // Hugi 2024-02-12
if( resourcePath.startsWith( "/" ) ) {
resourcePath = resourcePath.substring( 1 );
}

logger.debug( "Reading resource {} ", resourcePath );

resourcePath = pathWithPrefix( resourcePath );
Expand Down

0 comments on commit 122a3cf

Please sign in to comment.