BrookExtra.pas 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. (* _ _
  2. * | |__ _ __ ___ ___ | | __
  3. * | '_ \| '__/ _ \ / _ \| |/ /
  4. * | |_) | | | (_) | (_) | <
  5. * |_.__/|_| \___/ \___/|_|\_\
  6. *
  7. * Microframework which helps to develop web Pascal applications.
  8. *
  9. * Copyright (c) 2012-2020 Silvio Clecio <[email protected]>
  10. *
  11. * Brook framework is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU Lesser General Public
  13. * License as published by the Free Software Foundation; either
  14. * version 2.1 of the License, or (at your option) any later version.
  15. *
  16. * Brook framework is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * Lesser General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Lesser General Public
  22. * License along with Brook framework; if not, write to the Free Software
  23. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  24. *)
  25. { Contains useful extra types for the framework. }
  26. unit BrookExtra;
  27. {$I BrookDefines.inc}
  28. interface
  29. const
  30. { Default post buffer size (in bytes). }
  31. BROOK_POST_BUFFER_SIZE = {$IFDEF CPUARM}1024{~1Kb}{$ELSE}4096{~4kB}{$ENDIF};
  32. { Default payload limit (in bytes). }
  33. BROOK_PAYLOAD_LIMIT = {$IFDEF CPUARM}1048576{~1MB}{$ELSE}4194304{~4MB}{$ENDIF};
  34. { Default upload(s) limit (in bytes). }
  35. BROOK_UPLOADS_LIMIT = {$IFDEF CPUARM}16777216{~16MB}{$ELSE}67108864{~64MB}{$ENDIF};
  36. { Default maximum length of the queue of pending connections. }
  37. BROOK_BACKLOG = 511;
  38. { Default minimal buffer size (in bytes). }
  39. BROOK_MIN_BUFFER_SIZE = 128;
  40. { Default buffer size (in bytes). }
  41. BROOK_BUFFER_SIZE = 4096;
  42. { Default file rights (under Unix, 438 = &666 = owner/group/others can read/write). }
  43. BROOK_FILE_RIGHTS = 438;
  44. { Default content type for text content (text/plain in UTF-8). }
  45. BROOK_CT_TEXT_PLAIN = 'text/plain; charset=utf-8';
  46. { Default content type for binary content (octet-stream). }
  47. BROOK_CT_OCTET_STREAM = 'application/octet-stream';
  48. implementation
  49. end.