My application should respond to remote application request with data from
attached file.
By default web2py has "Transfer-Encoding: Chunked" parameter and for some
reason remote app can get only
first string from file, so I need to use "Content-Length" parameter that
set to file bytes size.
My current Controller is:
def file_to_process():
try:
files = Expose('/home/user/Desktop/TAA_Testing/Policies_for_send')
except HTTP as http_response:
if http_response.status == 200:
http_response.headers['Content-Type'] = 'application/json'
http_response.headers['Content-Length'] = '1000'
raise http_response
return dict(files=files)
In this case remote app will get only 1000 bytes of data so I want to know
what value should I set to respond with full range of data that file
contain?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.