[swift-server-dev] Next HTTP API meeting

Helge Heß me at helgehess.eu
Tue Apr 4 12:15:59 CDT 2017


On 4. Apr 2017, at 18:06, Johannes Weiß <johannesweiss at apple.com> wrote:
> I agree that should be added to the API I proposed. It still makes a big difference without the completion handler for the chunk handler but I agree there's applications for which it just wouldn't work.

Well it doesn’t work for anything that would need actual back pressure support ;-> (well, of course it would ‘work', but would be very inefficient and quickly overload the server).
A done callback should do.

>>> given that the underlying HTTP parser library needs to parse everything anyway, we just ignore everything that we don't care about. So it'll still be handed to the client but the client would just ignore everything by doing nothing.
>> 
>> So if I upload a 10000TB file to iCloud, you still /dev/null process it? That doesn’t seem sensible to me :-)
> 
> well, you need to parse it anyway

I can’t follow you on this one. Why would I have to parse it? If I eventually detect that the content is more than I want to handle or that they payload is b0rked (e.g. invalid iCalendar data, or amount exceeding limits, says it sends a text/plain but actually uploads an avi etc), I would just want to close the stream?

> The question is how many applications actually want to stream a very large amount of data to just ignore it.

That is exactly the point, if someone is sending you endless or invalid or unexpected data, you want to stop that from polluting your server and just stop.

> As I said at the beginning

No one is complaining, just passing on notes ;-> So your plan is to send along an updated proposal at some point?

hh



More information about the swift-server-dev mailing list