~ubuntu-branches/ubuntu/natty/flup/natty

« back to all changes in this revision

Viewing changes to flup/server/ajp_base.py

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2007-09-12 20:22:04 UTC
  • mfrom: (1.2.1 upstream) (4 gutsy)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20070912202204-fg63etr9vzaf8hea
* New upstream release
* http://www.saddi.com/software/news/archives/58-flup-1.0-released.html
* Added a note in the description that people should probably start thinking
  of moving to modwsgi.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23
23
# SUCH DAMAGE.
24
24
#
25
 
# $Id: ajp_base.py 2015 2006-06-18 16:04:44Z asaddi $
 
25
# $Id: ajp_base.py 2188 2006-12-05 22:11:45Z asaddi $
26
26
 
27
27
__author__ = 'Allan Saddi <allan@saddi.com>'
28
 
__version__ = '$Revision: 2015 $'
 
28
__version__ = '$Revision: 2188 $'
29
29
 
30
30
import sys
31
31
import socket
398
398
                    newPos = self._avail
399
399
                    break
400
400
                else:
 
401
                    if length is not None and len(self._buf) >= length + self._pos:
 
402
                        newPos = self._pos + length
 
403
                        break
401
404
                    # Wait for more to come.
402
405
                    self._waitForData()
403
406
                    continue
404
407
            else:
405
408
                newPos = i + 1
406
409
                break
407
 
        if length is not None:
408
 
            if self._pos + length < newPos:
409
 
                newPos = self._pos + length
410
410
        r = self._buf[self._pos:newPos]
411
411
        self._pos = newPos
412
412
        self._shrinkBuffer()
924
924
        environ['PATH_INFO'] = value[len(scriptName):]
925
925
        environ['SCRIPT_NAME'] = scriptName
926
926
 
 
927
        if not environ.has_key('QUERY_STRING'):
 
928
            environ['QUERY_STRING'] = ''
 
929
 
927
930
    def error(self, request):
928
931
        """
929
932
        Override to provide custom error handling. Ideally, however,