mercurial/hgweb/server.py
changeset 13570 617a87cb7eb2
parent 13443 8fa83d7159eb
child 14093 ce99d887585f
equal deleted inserted replaced
13569:3ab3b892d223 13570:617a87cb7eb2
     6 # This software may be used and distributed according to the terms of the
     6 # This software may be used and distributed according to the terms of the
     7 # GNU General Public License version 2 or any later version.
     7 # GNU General Public License version 2 or any later version.
     8 
     8 
     9 import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback
     9 import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback
    10 from mercurial import util, error
    10 from mercurial import util, error
       
    11 from mercurial.hgweb import common
    11 from mercurial.i18n import _
    12 from mercurial.i18n import _
    12 
    13 
    13 def _splitURI(uri):
    14 def _splitURI(uri):
    14     """ Return path and query splited from uri
    15     """ Return path and query splited from uri
    15 
    16 
   109             if hval:
   110             if hval:
   110                 env[hkey] = hval
   111                 env[hkey] = hval
   111         env['SERVER_PROTOCOL'] = self.request_version
   112         env['SERVER_PROTOCOL'] = self.request_version
   112         env['wsgi.version'] = (1, 0)
   113         env['wsgi.version'] = (1, 0)
   113         env['wsgi.url_scheme'] = self.url_scheme
   114         env['wsgi.url_scheme'] = self.url_scheme
       
   115         if env.get('HTTP_EXPECT', '').lower() == '100-continue':
       
   116             self.rfile = common.continuereader(self.rfile, self.wfile.write)
       
   117 
   114         env['wsgi.input'] = self.rfile
   118         env['wsgi.input'] = self.rfile
   115         env['wsgi.errors'] = _error_logger(self)
   119         env['wsgi.errors'] = _error_logger(self)
   116         env['wsgi.multithread'] = isinstance(self.server,
   120         env['wsgi.multithread'] = isinstance(self.server,
   117                                              SocketServer.ThreadingMixIn)
   121                                              SocketServer.ThreadingMixIn)
   118         env['wsgi.multiprocess'] = isinstance(self.server,
   122         env['wsgi.multiprocess'] = isinstance(self.server,