2009/8/16 gert <[email protected]>:
>
> this does not show any error messages in apache log ?
>
> [Sun Aug 16 14:57:12 2009] [info] [client 192.168.2.17] mod_wsgi
> (pid=5791, process='www', application=''): Loading WSGI script '/usr/
> httpd/www/appwsgi/wsgi/upload2.wsgi'.
>
> import os,sys
> def application(environ, response):
>    #query=environ.get['QUERY_STRING']
>    query=os.path.join(os.path.dirname(__file__),'teeeeeeeeeemp')
>    print('query=',query,file=sys.stderr)
>    range=environ.get('HTTP_RANGE','bytes=0-').replace
> ('bytes=','').split(',')
>    offset=[]
>    for r in range: offset.append(r.split('-'))
>    with open(query,'wb') as f

You are missing a ':' on end of preceding line.

>         f.seek(offset[0][0])
>         while True:
>             chunk=environ['wsgi.input'].read(8192).decode('latin1')
>             if not chunk: break
>             f.write(chunk)
>         l=os.fstat(f.fileno()).st_size
>    response('200 OK', [('Content-Type', 'text/plain'), ('Content-
> Length', str(len(l)))])
>    return [l]

Graham

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to