Time  Nick        Message
09:20 DylanJ      what http status code should i use when the client sends a request that i refuse to fulfill. the client is sending a post to publish some messages. but there is a quota on how many messages the client can send in a given month. the client knows the quota but doesn't respect it. Does a 412 precondition make sense?
09:46 trygvis     yeah, I guess. an alternative is to return 200 ok and model failure/status as a part of the response there
17:43 spaceone    DylanJ: (trygvis) 412 is for preconditions via if-*- headers. 200 should not be used on an error. I would use 429 too many request (https://tools.ietf.org/html/rfc6585#section-4), otherwise i would use 400 bad request, 403 forbidden, 409 conflict or 423 locked.
18:39 trygvis     sorry, I was reading up on 422
18:41 trygvis     403, 409 and 423 are all as bad as 412. 403 is in common use, 400 is bad syntax, 409 is for race-conditions etc, 423 is DAV stuff
18:41 trygvis     I think 400 is rather commonly used as a catch all "you fucked up"
18:41 whartung    yea
18:42 whartung    "Whatever is wrong, it's your fault. kthx"
18:42 asdf        wasn't there a status specifically for quota exceeded
18:43 trygvis     yeah. I could see a valid argument for using 200 too and assert that the user has to check the response in any case
18:43 asdf        (oh, 429)
19:32 DylanJ      I ended up using 402
19:32 DylanJ      since you /can/ pay for a larger limit.
19:32 DylanJ      but i'd never seen it before
23:51 ModusPwnens Is there a way of doing file uploads over HTTP without using multipart/form-data?
23:57 whartung    sure, you can just shove a large blob of data up to the service.
23:57 whartung    multipart is basially to support the FILE type on forms