Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#460 closed enhancement (fixed)

Get_Last_Modified in Servlet API

Reported by: Maxim Reznik Owned by: Maxim Reznik
Priority: major Milestone: 18.0
Component: Matreshka - Web Services Version: 0.7.0
Keywords: Last-Modified Cc:


Servlet API says:

2.1.3 Conditional GET Support
The HttpServlet interface defines the getLastModified method to support conditional GET operations.

So I propose to add into Servlet.HTTP_Servlets something like this:

   function Unknown_Date_Time return League.Calendars.Date_Time with Inline;
   not overriding function Get_Last_Modified
    (Self     : in out HTTP_Servlet;
     Request  : Servlet.HTTP_Requests.HTTP_Servlet_Request'Class)
      return League.Calendars.Date_Time;
   --  Returns the time the Http_Servlet_Request object was last modified.
   --  If the time is unknown, this method returns Unknown_Date_Time value.
   --  Servlets that support HTTP GET requests and can quickly determine their
   --  last modification time should override this method. This makes browser
   --  and proxy caches work more effectively, reducing the load on server and
   --  network resources.

Alternative is to return Optional_Date_Time or rewrite funcition as procedure with an additional Success : out Booleanparameter.

Change History (4)

comment:1 by Maxim Reznik, 5 years ago

Owner: set to Maxim Reznik
Resolution: fixed
Status: newclosed

In 5605:

Add Get_Last_Modified to HTTP_Servlet.

fixes #460

comment:2 by Maxim Reznik, 5 years ago

In 5607:

Set Last-Modified header before calling Do_Get

refs #460

comment:3 by Maxim Reznik, 5 years ago

In 5608:

Fix compilation after matreshka changes

refs #460

comment:4 by vadim.godunko, 3 years ago


Milestone renamed

Note: See TracTickets for help on using tickets.