Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

When using TemplateProcessor for serveStatic pages do not respond "304 Not Modified" #146

@mawi42

Description

@mawi42

When template processor is used do not return "not modifed 304" but refresh the webpage. Template processors might be used for non static pages since some variables which will be replaced might change.

Proposed workaround instead of introducing new method serveDynamic, use info if templat processor is set (_callback).

Webhandlers.cpp line 218:

if (!_callback && _last_modified.length() && _last_modified == request->header(T_IMS)) {
      request->_tempFile.close();
      request->send(304); // Not modified
    } else if(!_callback && _cache_control.length() && request->hasHeader(T_INM) && request->header(T_INM).equals(etag)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions