Created
May 19, 2012 12:49
-
-
Save snmsts/2730735 to your computer and use it in GitHub Desktop.
古いhunchentootによる単純なpostのテスト。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/sbcl --script | |
(print (parse-integer(second *posix-argv*))) | |
(load #P"/tmp/http.test/quicklisp/setup.lisp") | |
(ql:quickload '(:hunchentoot :trivial-shell)) | |
(hunchentoot:start | |
(make-instance 'hunchentoot:acceptor | |
:port (parse-integer(second *posix-argv*)))) | |
(defvar *tmp* nil) | |
(hunchentoot:define-easy-handler (test :uri "/test") | |
(x y) | |
(setf *tmp* (list :x x :y y)) | |
(print *tmp*) | |
(force-output *standard-output*) | |
"hoge") | |
(loop :while t :do | |
(trivial-shell:shell-command (format nil "curl -F x=@/tmp/http.test/quicklisp.lisp -F y=1 http://localhost:~A/test" (second *posix-argv*))) | |
(sleep 10)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rm -rf /tmp/http.test/ | |
mkdir /tmp/http.test/ | |
curl http://beta.quicklisp.org/quicklisp.lisp >/tmp/http.test/quicklisp.lisp | |
sbcl --non-interactive --no-sysinit --no-userinit --load /tmp/http.test/quicklisp.lisp --eval "(ignore-errors (quicklisp-quickstart:install :path \"/tmp/http.test/quicklisp/\"))" | |
sbcl --non-interactive --no-sysinit --no-userinit --load /tmp/http.test/quicklisp/setup.lisp --eval "(ql-dist:install-dist \"http://beta.quicklisp.org/dist/quicklisp/2011-10-01/distinfo.txt\" :replace t :prompt nil)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment