kevinkreiser / prime_server

non-blocking (web)server API for distributed computing and SOA based on zeromq
Other
59 stars 26 forks source link

Empty HTTP Body #47

Open kevinkreiser opened 8 years ago

kevinkreiser commented 8 years ago

If you do a work function like this:

worker_t::result_t result{false};
http_response_t response(200, "OK", std::string());
response.from_info(info);
result.messages.emplace_back(response.to_string());
return result;

That is reply to an http request by sending an empty body as a response, firefox at least, will choke on parsing it. It will expect more of the request even when it isn't coming. So something is weird when content length is 0 or something in the serialization of http responses..