keplerproject / wsapi

WSAPI is an API that abstracts the web server from Lua web applications.
http://keplerproject.github.io/wsapi
74 stars 33 forks source link

Use tables to deal with huge responses. #21

Closed ignacio closed 10 years ago

ignacio commented 11 years ago

Instead of accumulating the response in a string, use a table. This reduces the chances of "out of memory" errors when testing endpoints that produces huge amounts of data.

It also changes the call to common.send_content to match the way it is used in wsapi itself.

ignacio commented 10 years ago

Ping?

hishamhm commented 10 years ago

I don't know enough (or rather, anything) about wsapi to be able to make the call about those patches. The other one I just merged was something quite obvious about coxpcall compatibility so it seemed a no-brainer... I'm shying away from merging patches that I have no real idea about. If anyone else using wsapi (or who knows about it) would like to chime in to run an additional pair of eyes over the patches, that would be great, but if you tell me there's no compatibility concerns with these tweaks, I'll take your word. :) (TBH I don't know who is maintaining wsapi nowadays!)

ignacio commented 10 years ago

Ok, thanks Hisham. Maybe I can ask @norman to take a look at this, since this only deals with the mock module.

norman commented 10 years ago

Last I knew @mascarenhas is still maintaining WSAPI but I haven't been around much lately so I'm not sure. It's been a long time since I wrote this and I'm quite certain that at this point @ignacio knows the code I wrote much better than I do!

ignacio commented 10 years ago

So let's wait for @mascarenhas then. Right now there are 4 PRs waiting so maybe a new release can be tagged.

ignacio commented 10 years ago

Great, thank you.