1. 21 Dec, 2018 1 commit
  2. 29 Nov, 2018 2 commits
  3. 19 Nov, 2018 1 commit
    • João Távora's avatar
      Prepare docstrings for doc generation from docstrings · 4df4cbb5
      João Távora authored
      Also fix ridiculous indentation.
      * api.lisp (uri-to-arguments, arguments-to-uri)
      (read-for-resource, write-for-resource, handle-request)
      (documentation, backend-payload): Fix docstrings.
      * common.lisp (find-content-class, verb-spec-or-lose)
      (parse-resource, parse-content-type-header, check-optional-args)
      (genpath-fn-lambda-list, explain-failsafe): Fix indentation.
      (arguments-to-uri-1, uri-to-arguments-1, read-for-resource-1)
      (write-for-resource-1): Rename from ARGUMENTS-TO-URI,
  4. 22 Jul, 2018 1 commit
    • João Távora's avatar
      Close #11: Fix broken HTTP DELETE verb · 67e08376
      João Távora authored
      * common.lisp (destructive-p): DELETE is also a destructive verb.
      (handle-request-1): DELETE doesn't care about content-types
      * snooze-tests.lisp (:snooze-tests): import some symbols from
      (:snooze-tests-demo): Move package definition to top.
      (todo): Allow making TODO with given id.
      (todo :delete): New route
      (test-delete-route): New test
      (*mock-http-payload*): Move symbol to :SNOOZE-TESTS-DEMO
  5. 09 Jan, 2018 2 commits
    • João Távora's avatar
      Improve error reporting when *CATCH-ERRORS* is :VERBOSE · be998d12
      João Távora authored
      * common.lisp (resignalled-condition): Use a new slot
      (explain-failsafe): Improve text.
      (explain-failsafe unconvertible-argument): New method.
      (explain-failsafe :after): Print the "...when it was bitten by"
      here. Explain the original condition and the backtrace.
      * safe-simple-read.lisp (print-object :snooze-reader-error): New
      (safe-simple-read-from-string): Check for empty string.
    • João Távora's avatar
      Close #8: Don't mess with PRINT-OBJECT for RESIGNALLED-CONDITION, it's trouble · ff1f3bd4
      João Távora authored
      Customizations to PRINT-OBJECT for conditions affect every attempt to
      print these condition, which may lead to heap- and stack-exhausting
      errors when printing backtraces, for example. This is what was
      happening in issue #8.
      Better to have a separate method to provide the more human readable
      explanation and keep to using terse PRINT-UNREADABLE-OBJECT
      expressions in the PRINT-OBJECT methods.
      In the future, keep the original backtrace for the original condition
      of the resignalled condition as a string.
      * common.lisp (explain-condition-failsafe): Call a new internal
      generic function EXPLAIN-FAILSAFE.
      (resignalled-condition): Prepare to store backtrace of the
      original condition.
      (print-object http-condition): Use PRINT-UNREADABLE-OBJECT
      (print-object :after resignalled-condition): Delete.
      (print-object error-when-explaining, invalid-uri-structure)
      (incompatible-lambda-list): Delete these methods.
      (explain-failsafe): New methods to replace PRINT-OBJECT.
  6. 08 Oct, 2017 4 commits
  7. 06 Oct, 2017 1 commit
    • João Távora's avatar
      Use EQL to compare chars, not EQ · 59e28166
      João Távora authored
      Thanks to 'lispm' on reddit.
      * safe-simple-read.lisp (read-string, read-name, parse-symbol)
      (safe-simple-read-from-string): Use EQL to compare chars.
  8. 05 Jun, 2017 1 commit
  9. 05 Oct, 2016 3 commits
  10. 19 Sep, 2016 1 commit
    • João Távora's avatar
      Closes #4: Unbreak README example · 05eba93d
      João Távora authored
      The commit b1300e ("Resist more DOS keyword intern attacks") made the
      code too strict when deciding whether to intern symbols used for
      keyword arguments. This commit relaxes the fix, while still blocking
      that particular DOS.
      * common.lisp (uri-to-arguments): Be less strict when checking if
      symbols naming keyword arguments should be interned in the
      :KEYWORD package.
  11. 22 Jan, 2016 3 commits
  12. 20 Jan, 2016 1 commit
  13. 05 Jan, 2016 1 commit
    • João Távora's avatar
      Resist more DOS keyword intern attacks · b1300ea2
      João Távora authored
      SNOOZE:URI-TO-ARGUMENTS is more careful when interning the keys in
      key-value pairs found in the URI as keyword arguments.
      It will only do so when a corresponding symbol with the same name is
      found in the resource's package. This heuristic should prevent abusive
      keyword interns.
      * common.lisp (resource-package): New helper.
      (uri-to-arguments): Be more careful when interning.
      (read-for-resource): Use RESOURCE-PACKAGE
      * snooze-tests.lisp (test-parse-uri): Explicitly intern BAR before
  14. 17 Aug, 2015 1 commit
    • João Távora's avatar
      Prepare for clever DEFFORM macro · ada09c0b
      João Távora authored
      * demo/lispdoc.lisp (cl-who:convert-tag-to-string-list): New hack.
      (defform) Use *MACROEXPAND-HOOK* and
  15. 16 Aug, 2015 3 commits
    • João Távora's avatar
      Update README.md · 1bc5514e
      João Távora authored
    • João Távora's avatar
      Enhance the demo app slightly · 1e1d726c
      João Távora authored
      * constants.lisp (*mime-type-list*): Add
      * demo/lispdoc.lisp (#:snooze-demo): Import some hunchentoot symbols.
      (defform): Idea for a DEFFORM macro.
      (render-docstring-form): Refactor this out.
      (lispdoc): New POST route
      (redirect, explain-condition): New redirect condition and a
      suitable explainer.
    • João Távora's avatar
      Change some CSS for the demo app · d2f4cc72
      João Távora authored
  16. 15 Aug, 2015 7 commits
  17. 14 Aug, 2015 1 commit
  18. 13 Aug, 2015 1 commit
    • João Távora's avatar
      Fix SAFE-SIMPLE-READ-FROM-StrING · f1c2f059
      João Távora authored
      READER-ERROR doesn't take usual SIMPLE-ERROR args. (it does in Allegro though)
      * safe-simple-read.lisp (snooze-reader-error): New error
      (read-string, parse-symbol)
      (safe-simple-read-from-string): Use it.
  19. 12 Aug, 2015 2 commits
    • João Távora's avatar
      SAFE-SIMPLE-READ-FROM-STRING may now make symbols if told so · dcc6e665
      João Távora authored
      * common.lisp (uri-to-arguments): Don't resignal if *CATCH-ERRORS*
      is nil. Fix indent.
      (read-for-resource): Don't check for errors here and pass t to
      * safe-simple-read.lisp (parse-symbol): Return 4 values.
      (safe-simple-read-from-string): Take MAKE-SYMBOL-P. Update
      * snooze-tests.lisp (test-some-routes): Update test.
      (safe-simple-read-should-error): Update tests.
      (safe-simple-dont-read-back): Delete this test.
    • João Távora's avatar
      Don't use READ-FROM-STRING to parse URI by default · 92f625b9
      João Távora authored
      * api.lisp (read-for-resource): Update docstring.
      * common.lisp (read-for-resource): Use
      * package.lisp: New package.
      * safe-simple-read.lisp: New file
      * snooze-tests.lisp (safe-simple-read-back)
      (safe-simple-dont-read-back, safe-simple-read-should-error): New tests
      * snooze.asd (:snooze): Depends on PARSE-FLOAT. Add
  20. 11 Aug, 2015 3 commits
    • João Távora's avatar
      Reorganize common.lisp · f2d9e13d
      João Távora authored
      * common.lisp (print-object): Move all PRINT-OBJECT for conditions nearer the conditions section.
      (*resource*): Fix a silly bug binding *RESOURCE* to a docstring.
      (default-resource-name, search-for-extension-content-type)
      (all-defined-resources, backend-payload): Group together as
      default implementation for options.
      (uri-to-arguments, arguments-to-uri, read-for-resource)
      (write-for-resource): Group together.
    • João Távora's avatar
      Adapt tests to new default arg-reading rules · dcbe67f5
      João Távora authored
      * snooze-tests.lisp (#:snooze-parse-uri-tests): Don't use this package.
      (test-parse-uri, path-generation, path-parse-back): Adapt to new
      default argument-reading rules.
    • João Távora's avatar
      Tweak README.md and the demo system · 05ecc8df
      João Távora authored