Closed grelner closed 5 years ago
The quick fix is for clients to not use the Expect
header (or force it to be blank):
curl -v -X POST --header 'Expect:' 'localhost:8888/bla'
It would be nice if colossus handled this automatically, but previous discussions lead us not to add this functionality. However, I think we should discuss it again and investigate the changes required.
we discussed this and do not immediately plan on handling the Expect
header because of the changes required to the http response writer / http server request handler API. as previously mentioned, using an empty field value is a fix. in the specific case where we send a POST/PUT with no Body to a route that expects a Body, the request handler can immediately return a "400 Bad Request" final status code (e.g. HttpResponseBuilding#badRequest(…)
), and the client can retry the request with an included Body
closing this for now. please re-open if this continues to be a pain point
Colossus does not seem to support the "Expect: 100-continue" http header for post and put requests, causing high latency for clients that use this header, as sending of the request body from the client side is delayed by up to half a second while waiting for the 100 response from the server.
For details look here: https://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3