winlin

fix the http zero content length bug.

@@ -81,6 +81,11 @@ SrsHttpResponseWriter::~SrsHttpResponseWriter() @@ -81,6 +81,11 @@ SrsHttpResponseWriter::~SrsHttpResponseWriter()
81 81
82 int SrsHttpResponseWriter::final_request() 82 int SrsHttpResponseWriter::final_request()
83 { 83 {
  84 + // write the header data in memory.
  85 + if (!header_wrote) {
  86 + write_header(SRS_CONSTS_HTTP_OK);
  87 + }
  88 +
84 // complete the chunked encoding. 89 // complete the chunked encoding.
85 if (content_length == -1) { 90 if (content_length == -1) {
86 std::stringstream ss; 91 std::stringstream ss;