Re: Raw HTTP request processing?
Thanks but it seems that in this example (if I have understood correctly) it loads the entire request into memory. I need to convert stuff on the fly using streams on both input and output as both may be huge. I have a number of stages of transformation and it wouldn't take very many requests to bring the machine to a grinding halt if everything is being done in memory at each stage. I have decided to do it in java with jetty, servlets and embedding jython (which bizarrely for large datasets seems to be more efficient, standard c python perfomance plunges after certain in memory data sizes - I believe its the GC strategy not scaling well from what I have heard). On 25 Aug, 21:41, Peter Bengtssonwrote: > Here's an example:http://www.djangosnippets.org/snippets/1322/ > > On Aug 25, 5:43 pm, John wrote: > > > > Isn't it just > > > request.raw_post_data > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Raw HTTP request processing?
Here's an example: http://www.djangosnippets.org/snippets/1322/ On Aug 25, 5:43 pm, Johnwrote: > > Isn't it just > > request.raw_post_data > > Thanks and I suspected it was that but hoped there might be a little > example somewhere as the docs don't say much only this: > > HttpRequest.raw_post_data > The raw HTTP POST data. This is only useful for advanced > processing. Use POST instead. > > As I am going to be dealing with potentially very large streams in and > out, I need it to access the streams rather than a variable stored in > memory. Any examples of doing this that you know about? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Raw HTTP request processing?
> Isn't it just > request.raw_post_data Thanks and I suspected it was that but hoped there might be a little example somewhere as the docs don't say much only this: HttpRequest.raw_post_data The raw HTTP POST data. This is only useful for advanced processing. Use POST instead. As I am going to be dealing with potentially very large streams in and out, I need it to access the streams rather than a variable stored in memory. Any examples of doing this that you know about? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Raw HTTP request processing?
On Aug 25, 4:54 pm, John Bakerwrote: > Some of my views need to process arbitrary incoming data that isn't a > normal web request i.e. process an incoming document and return an > altered document. > > How do I get a view to process raw incoming data rather than the usual > encoded parameters and form etc? > Isn't it just request.raw_post_data > It is obvious how to do this on output as you create the response > object yourself, but with a request? > > Thanks in advance, > John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Raw HTTP request processing?
Some of my views need to process arbitrary incoming data that isn't a normal web request i.e. process an incoming document and return an altered document. How do I get a view to process raw incoming data rather than the usual encoded parameters and form etc? It is obvious how to do this on output as you create the response object yourself, but with a request? Thanks in advance, John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---