freenode/#shirakumo - IRC Chatlog
Search
8:13:21
hjudt
Shinmera: i have created a pull request for radiance-contribs. i got rid of cl-ppcre in woo, since regexp will probably be slower than uiop:split-string. get, post, cookies, headers and remote now work (get and post have already worked before).
8:14:03
hjudt
do you have any test package where you can test these various kinds of requests? i haven't really found any but didn't look too much.
8:14:35
hjudt
i also have not tested various ways one can send cookies, only curl -b and wget, both with single and multiple cookies.
8:15:25
hjudt
i'd probably write one using parachute. have only done manual checks till now. a small radiance test application would probably be nice.
8:15:59
Colleen
github.com/Shirakumo/radian... Website (HTML), Title: radiance/test at master · Shirakumo/radiance · GitHub
8:16:15
hjudt
i have not tested file upload, nor did i fix json handling, but i'll work on that next. just a bit busy with other stuff atm
8:16:43
Shinmera
regarding json I think the only solution to that is to expose a way for the user to access the underlying stream directly
8:17:12
Shinmera
and to forego parsing post at all if the content type is not recognised by default.
8:21:12
hjudt
tbh, i thought handling json would be nice, since a lot of APIs and similar stuff is using this nowadays.
8:22:50
Shinmera
so if we made a choice about a particular json library to use we would be making choices on the user's behalf
8:26:31
Shinmera
So instead of calling that unconditionally, only call that if the content-type is either application/x-www-form-urlencoded or multipart/form-data
8:30:24
hjudt
ok, just a step back: http-body already draws in jonathan as dependency, whether we need it or not. i guess the user probably wouldn't care what implementation is used? so why not simply let http-body decode it and put it into the data field?
8:31:33
Shinmera
DATA is arbitrary data to store along the request for request-bound data from the application.
8:33:21
hjudt
well, i am fine with providing the raw stream. i only have reflected whether it could be done without any interface changes.
8:34:05
hjudt
hm... about the raw stream. does any server provide anything else than unsigned-8 byte vectors and do we need to care?
8:37:20
hjudt
ok, if you have decided which new fields to add, tell me, i start implementing in i-woo.
8:37:58
hjudt
don't know about wookie, i believe i haven't gotten it to work but have only tried with radiance
8:39:44
hjudt
iirc it only exposes fetch POST data as raw stream, which woo (or i-woo) for some strange reason does support somehow but hunchentoot (or i-hunchentoot) does not.
8:43:38
Shinmera
Hunchentoot has been around a long time and is maintained by people who are wary of breaking the API
8:44:12
Shinmera
https://github.com/Shirakumo/radiance/commit/2440af0305774f10bfb3362fdb0bb347e369381d
8:44:13
Colleen
github.com/Shirakumo/radian... Website (HTML), Title: Add body-stream to the request to allow accessing raw stream data on … · Shirakumo/radiance@2440af0 ·
8:44:40
no-defun-allowed
Yeah, it was written in 1972, and I don't think anyone would feel up to the task of changing something made by Frank Zappa.
8:46:41
Shinmera
Now we're good. https://github.com/Shirakumo/radiance/commit/191aaed70fc5e8e082f26a6780e035fcf0635863
8:46:42
Colleen
github.com/Shirakumo/radian... Website (HTML), Title: Add body-stream to the request to allow accessing raw stream data on … · Shirakumo/radiance@191aaed ·
8:53:26
hjudt
ok. i will see when i find some time working on the tests, then after that start working on raw-stream.
8:56:43
hjudt
i will probably use dexador to test requests if that is ok for you. perhaps i could use radiance:request, but i am not very comfortable using something inside radiance to test radiance...
8:58:11
Shinmera
Though I'm actually not sure how you'd do the tests, since the requests come in by a different mechanism than from where you're running the request.
8:59:19
hjudt
i can use drakma but it has problems with some application content or application servers, which need workarounds. dexador usually works fine with these, i use it in my applications and have replaced drakma with it. if i use drakma, maybe tests become more verbose. but i can try if you want and switch to dex if it gets more complicated.
9:00:45
Shinmera
As for how to do the tests; you'd probably have to set up a default handler that pushes all requests to a queue that you then inspect after the request is done to actually test conformance.