[pywin32-checkins] pywin32/isapi/samples advanced.py,1.3,1.4
OLD project page for the Python extensions for Windows
                
                Brought to you by:
                
                    mhammond
                    
                
            
            
        
        
        
    | 
      
      
      From: Mark H. <mha...@us...> - 2009-02-03 00:20:06
      
     | 
| Update of /cvsroot/pywin32/pywin32/isapi/samples In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21450 Modified Files: advanced.py Log Message: Fix query string handling and don't fail for invalid server vars Index: advanced.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/samples/advanced.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** advanced.py 1 Jan 2009 22:40:01 -0000 1.3 --- advanced.py 3 Feb 2009 00:19:56 -0000 1.4 *************** *** 122,130 **** print >> ecb, "<HTML><BODY>" ! queries = ecb.GetServerVariable("QUERY_STRING").split("&") ! if queries: print >> ecb, "<PRE>" for q in queries: ! val = ecb.GetServerVariable(q) print >> ecb, "%s=%r" % (q, val) print >> ecb, "</PRE><P/>" --- 122,131 ---- print >> ecb, "<HTML><BODY>" ! qs = ecb.GetServerVariable("QUERY_STRING") ! if qs: ! queries = qs.split("&") print >> ecb, "<PRE>" for q in queries: ! val = ecb.GetServerVariable(q, '<no such variable>') print >> ecb, "%s=%r" % (q, val) print >> ecb, "</PRE><P/>" |