Skip to content

ETag in ResponseHeader is different from staticwebassets.endpoints.json #62133

Open
@CodAffection

Description

@CodAffection

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

This my program.cs files

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddControllersWithViews(options =>
  options.Filters.Add());

var app = builder.Build();

app.UseRouting();

app.UseAuthentication();
app.UseAuthorization();


app.MapStaticAssets();
app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Article}/{action=Index}/{id?}")
    .WithStaticAssets();

app.Run();

The problem is that for custom css and js file in wwwroot/css or wwwroot/js the ETag generated in staticwebassets.endpoints.json is not what returned for particular statis files in Response.Header ETag(Strong).

and there each time the file is getting download with 200Ok instead of 304 Not Modified Status

What am I missing.

staticwebassets.endpoints.json (only the object representing site.css)

Image

Response Header
Image

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions