- Dec 21, 2018
-
-
Jens Nevens authored
-
- Nov 29, 2018
-
-
João Távora authored
* common.lisp (arguments-to-uri-1): Remove unreachable code.
-
João Távora authored
Reported by Zach Beane. * common.lisp (uri-to-arguments-1, arguments-to-uri-1): Delete these two spurious and duplicate definitions.
-
- Nov 19, 2018
-
-
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, URI-TO-ARGUMENTS, READ-FOR-RESOURCE and WRITE-FOR-RESOURCE, respectively.
-
- Jul 22, 2018
-
-
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. (:snooze-tests-demo): Move package definition to top. (todo): Allow making TODO with given id. (with-request): Bind SNOOZE:*CATCH-ERRORS* and SNOOZE:*CATCH-HTTP-CONDITIONS* (todo :delete): New route (test-delete-route): New test (*mock-http-payload*): Move symbol to :SNOOZE-TESTS-DEMO
-
- Jan 09, 2018
-
-
João Távora authored
* common.lisp (resignalled-condition): Use a new slot ORIGINAL-CONDITION-BACKTRACE. (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 method. (safe-simple-read-from-string): Check for empty string.
-
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.
-
- Oct 08, 2017
-
-
João Távora authored
-
João Távora authored
-
João Távora authored
-
João Távora authored
-
- Oct 06, 2017
-
-
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.
-
- Jun 05, 2017
-
-
João Távora authored
* common.lisp (genpath-fn-lambda-list): New helper. (make-genpath-form): Refactor slightly
-
- Oct 05, 2016
-
-
João Távora authored
-
João Távora authored
SNOOZE-COMMON:PARSE-CONTENT-TYPE-HEADER presently ignores parameters in the "Content-Type:" header value, such as "Charset=UTF-8", but at least it sees the basic content type descriptor, whereas it previously returned nil. * common.lisp (content-classes-in-accept-string): Use PARSE-CONTENT-TYPE-HEADER. (parse-content-type-header): Use RFC2388:PARSE-HEADER. * snooze.asd (:snooze): Use RFC2388 system.
-
João Távora authored
-
- Sep 19, 2016
-
-
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.
-
- Jan 22, 2016
-
-
João Távora authored
* api.lisp (*uri-content-types-function*): Silly typo.
-
João Távora authored
-
João Távora authored
This seriously needs to be reworked, hopefully without changing the API. * common.lisp (call-brutally-explaining-conditions): Handle case where *CATCH-ERRORS* is nil but *CATCH-HTTP-CONDITIONS* is t.
-
- Jan 20, 2016
-
-
João Távora authored
-
- Jan 05, 2016
-
-
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 testing.
-
- Aug 17, 2015
-
-
João Távora authored
* demo/lispdoc.lisp (cl-who:convert-tag-to-string-list): New hack. (defform) Use *MACROEXPAND-HOOK* and CL-WHO:CONVERT-TAG-TO-STRING-LIST.
-
- Aug 16, 2015
-
-
João Távora authored
-
João Távora authored
* constants.lisp (*mime-type-list*): Add "application/x-www-form-urlencoded". * 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 authored
-
- Aug 15, 2015
-
-
João Távora authored
* api.lisp (make-hunchentoot-app): Use (funcall (fdefinition)))
-
João Távora authored
* README.md: Improve section on READ-FOR-RESOURCE and WRITE-FOR-RESOURCE. * common.lisp (read-for-resource, write-for-resource): Better docstrings. Write unqualified uninterned symbols.
-
João Távora authored
-
João Távora authored
-
João Távora authored
* api.lisp (backend-payload): Move Clack and Hunchentoot implementations to api.lisp for now. (make-hunchentoot-app): New function. * common.lisp (backend-payload): Moved to api.lisp * package.lisp (#:snooze): Export MAKE-HUNCHENTOOT-APP. * snooze.asd (:snooze-demo): Move demo to separate dir.
-
João Távora authored
-
João Távora authored
-
- Aug 14, 2015
-
-
João Távora authored
* common.lisp (explain-condition-failsafe): Use it. * constants.lisp: New function REASON-FOR * package.lisp (#:snooze-common): Export REASON-FOR
-
- Aug 13, 2015
-
-
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 condition. (read-string, parse-symbol) (safe-simple-read-from-string): Use it.
-
- Aug 12, 2015
-
-
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 SNOOZE-SAFE-SIMPLE-READ:SAFE-SIMPLE-READ-FROM-STRING. * safe-simple-read.lisp (parse-symbol): Return 4 values. (safe-simple-read-from-string): Take MAKE-SYMBOL-P. Update docstring. * 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 authored
* api.lisp (read-for-resource): Update docstring. * common.lisp (read-for-resource): Use SNOOZE-SAFE-SIMPLE-READ:SAFE-SIMPLE-READ-FROM-STRING. * 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 "safe-simple-read".
-
- Aug 11, 2015
-
-
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 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 authored
-