jacksonh / manos-spark

Library for using the Spark View Engine with Manos de Mono applications
3 stars 1 forks source link

Content-Length: 0 header #1

Closed quux closed 13 years ago

quux commented 13 years ago

Hi, You're probably aware of it, but FYI...

Using a Mac build of Manos, Spark templating works but Manos.Server.HTTPResponse is not aware of how many bytes has been sent through HTTPResponse.Writer when calling RenderView() on a template. Hence a Content-Length: 0 header.

Thanks for the lib.

Thanks

jacksonh commented 13 years ago

Are you using an up-to-date Manos? I added a little workaround for this. I am in the midst of redoing the HttpResponseStream so I just stuck a hack in there for now, so it should work.

jacksonh commented 13 years ago

This is the specific hack: http://github.com/jacksonh/manos/commit/5c1d4643c3c6612d8598567d07127cbdfb7c43f8

quux commented 13 years ago

Duh. Will pull the latest version.

jacksonh commented 13 years ago

Its a pretty ugly workaround, but it seems to work OK for me. Let me know if it works for you.

quux commented 13 years ago

Recompiled with the latest version. The Content-length header is fine now. Thanks

quux commented 13 years ago

BTW, in base.spark: I had to replace <use content="body" /> by <use content="view" /> to get the child template to render

jacksonh commented 13 years ago

Oh, I think the sample just wasn't displaying properly because of some markdown formatting. I just fixed it. Thanks.