
aspen - issue #88
Serving Dynamically-Generated PDF content with Aspen/Stephane/Django
I'm posting a small self-contained sample that demonstrates the problem. The README.txt file in the attached archive contains complete instructions for configuring and running the sample.
In a nutshell: Experimenting with Aspen/Stephane to serve a Django application. Am able to serve dynamically-generated HTML and static content, but dynamically-generated PDF is not working.
The README file describes how to run the sample using the built-in Django development server (which works) and with apsen/stephane. Everything in aspen works except for the PDF generation.
--gordon
- test.tar.gz 91.51KB
Comment #1
Posted on Jan 27, 2007 by Helpful RhinoGordy,
Thanks for this! I've installed your test, and have been able to reproduce the problem. Now let's figure out what it is. :)
chad
Comment #2
Posted on Jan 27, 2007 by Helpful RhinoOk, progress: this has to do w/ wsgiserver.py's handling of some HTTP/1.1 feature. If I force the server to use HTTP/1.0 (by setting server.protocol to that in aspen.init) then the PDF loads fine.
Maybe it's the 'chunked' Transfer-Encoding?
Comment #3
Posted on Feb 4, 2007 by Helpful Rhino(No comment was entered for this change.)
Comment #4
Posted on Feb 4, 2007 by Helpful RhinoWorst-case scenario: let's add an http_version setting to aspen.conf, since this would not be a bad thing to have anyway.
Comment #5
Posted on Mar 1, 2007 by Helpful RhinoOk Gordy, I've added an http_version config knob in r184. What I see is that setting this to 1.0 makes the problem go away, so we at least have that workaround. Now I'm going to see if I can actually get to the bottom of this.
Comment #6
Posted on Mar 1, 2007 by Helpful RhinoOk, got it! This was the tiniest of bugs in wsgiserver.py. It's fixed in the version from CP 3.0.1, so I upgraded to that in r186.
I initially reported the bug with more detail to Django:
Comment #7
Posted on Mar 1, 2007 by Helpful RhinoActually, I'm going to leave this open until you confirm the fix, Gordy.
Comment #8
Posted on Mar 1, 2007 by Helpful RhinoChanged my mind again: closing this now that I've released 0.7.1. Re-open if it's still an issue. Thanks!
Comment #9
Posted on Mar 3, 2007 by Massive BearThanks Chad! Sorry for being so slow in getting back to you. I'm going down download 0.7.1 this weekend and try things out.
Comment #10
Posted on Mar 3, 2007 by Massive BearThanks Chad! Sorry for being so slow in getting back to you. I'm going down download 0.7.1 this weekend and try things out.
Comment #11
Posted on Mar 3, 2007 by Massive BearChad you are a genius! Works perfectly. Thanks for all your hard work. --gordy
Comment #12
Posted on Mar 3, 2007 by Helpful RhinoWoo-hoo! Thanks again for the report. :^)
Status: Closed
Labels:
Milestone-0.7.1
Priority-Medium