/src/yolk-not_found.ads

http://github.com/ThomasLocke/yolk · Ada · 36 lines · 7 code · 5 blank · 24 comment · 0 complexity · 7e41beebd006cbb065608463cfdb15cb MD5 · raw file

  1. -------------------------------------------------------------------------------
  2. -- --
  3. -- Copyright (C) 2010-, Thomas ¸cke --
  4. -- --
  5. -- This library is free software; you can redistribute it and/or modify --
  6. -- it under terms of the GNU General Public License as published by the --
  7. -- Free Software Foundation; either version 3, or (at your option) any --
  8. -- later version. This library is distributed in the hope that it will be --
  9. -- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --
  10. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
  11. -- --
  12. -- As a special exception under Section 7 of GPL version 3, you are --
  13. -- granted additional permissions described in the GCC Runtime Library --
  14. -- Exception, version 3.1, as published by the Free Software Foundation. --
  15. -- --
  16. -- You should have received a copy of the GNU General Public License and --
  17. -- a copy of the GCC Runtime Library Exception along with this program; --
  18. -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
  19. -- <http://www.gnu.org/licenses/>. --
  20. -- --
  21. -------------------------------------------------------------------------------
  22. -- If a requested resource is not found, then we must return a 404 message to
  23. -- the client. Yolk.Not_Found.Output does exactly that and nothing else.
  24. with AWS.Response;
  25. with AWS.Status;
  26. package Yolk.Not_Found is
  27. function Generate
  28. (Request : in AWS.Status.Data)
  29. return AWS.Response.Data;
  30. -- Outputs a generic 404 not found HTML.
  31. end Yolk.Not_Found;