def do_PUT( self ):
		global murky, files, config
		
		if 1 > len( self.path ):
			try:
				resid = int( self.path[1:] )
				#print resid
				#content = murky.fetch( resid )
				L = int( self.headers['content-length'] )
				data = self.rfile.read( L )
				#print "Adding", resid, ":", data
				murky.add( resid, data )
				murky.propagate( resid )
				
				save_file( config, resid, data )
				
				files[resid] = data
				self.send_response( 200 )
				self.end_headers()
				self.wfile.write( json.dumps( {'response': 'Ok.'} ) + "\n" )

			except ValueError:
				self.send_response( 400 )
				self.end_headers()
				return
		else:
			self.send_response( 404 )
			self.end_headers()
dataset/ETHPy150Open mgronhol/pouring-rain/mw-http.py/MurkyProxy.do_PUT/swapped operands of `>`