art1c0 / mooha

Automatically exported from code.google.com/p/mooha
0 stars 0 forks source link

Content Length in Header is 0 #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Requesting the Server

What is the expected output? What do you see instead?
Headers content lenth > 0. 
Header sends content length = 0.

What version of the product are you using? On what operating system?
0.1

Please provide any additional information below.

In
class MoohaServerSimple extends MoohaServer implements 
MoohaServerSimpleInterface {
  // implement a new public method
  public function process(){
    $this->request();
    $this->headers();
    $this->response();
    return $this->getOutput();
  }
}

The order of excecution
 $this->headers();
 $this->response();

is wrong. Sould be:
    $this->response();
    $this->headers();

because setting the content length in header() depends on the generated 
response output.

Original issue reported on code.google.com by c.schwie...@gmail.com on 2 Mar 2010 at 2:36

GoogleCodeExporter commented 9 years ago
Fixed in revision 10.
Thank you for the report!

Original comment by artico.b...@gmail.com on 5 Mar 2010 at 8:02