
import wsgi, convergence

forwarding_conditions = [
    lambda e : 'google.com/safebrowsing/downloads' not in e['reconstructed_url'],
    lambda e : 'mozilla.org/en-US/firefox/livebookmarks.html' not in e['reconstructed_url'],
    ]

def add_forward_condition(condition):
    forwarding_conditions.append(condition)
    
def remove_forward_condition(condition):
    while condition in forwarding_conditions:
        forwarding_conditions.remove(condition)



import wsgi, convergence

forwarding_conditions = [
    lambda e : 'google.com/safebrowsing/downloads' not in e['reconstructed_url'],
    lambda e : 'mozilla.org/en-US/firefox/livebookmarks.html' not in e['reconstructed_url'],
    lambda e : e.get('CONTENT_TYPE') != 'application/x-shockwave-flash',
    ]

def add_forward_condition(condition):
    forwarding_conditions.append(condition)
    
def remove_forward_condition(condition):
    while condition in forwarding_conditions:
        forwarding_conditions.remove(condition)


Stop forwarding flash by default, it breaks more than it doesn't.
Stop forwarding flash by default, it breaks more than it doesn't.

git-svn-id: 87d19257dd11500985d055ec4730e446075a5f07@1279 78c7df6f-8922-0410-bcd3-9426b1ad491b

  
  import wsgi, convergence
  
  forwarding_conditions = [
      lambda e : 'google.com/safebrowsing/downloads' not in e['reconstructed_url'],
      lambda e : 'mozilla.org/en-US/firefox/livebookmarks.html' not in e['reconstructed_url'],
+     lambda e : e.get('CONTENT_TYPE') != 'application/x-shockwave-flash',
      ]
  
  def add_forward_condition(condition):
      forwarding_conditions.append(condition)
      
  def remove_forward_condition(condition):
      while condition in forwarding_conditions:
          forwarding_conditions.remove(condition)
  
  
Stop forwarding flash by default, it breaks more than it doesn't.
## Code Before:

import wsgi, convergence

forwarding_conditions = [
    lambda e : 'google.com/safebrowsing/downloads' not in e['reconstructed_url'],
    lambda e : 'mozilla.org/en-US/firefox/livebookmarks.html' not in e['reconstructed_url'],
    ]

def add_forward_condition(condition):
    forwarding_conditions.append(condition)
    
def remove_forward_condition(condition):
    while condition in forwarding_conditions:
        forwarding_conditions.remove(condition)


## Instruction:
Stop forwarding flash by default, it breaks more than it doesn't.
## Code After:

import wsgi, convergence

forwarding_conditions = [
    lambda e : 'google.com/safebrowsing/downloads' not in e['reconstructed_url'],
    lambda e : 'mozilla.org/en-US/firefox/livebookmarks.html' not in e['reconstructed_url'],
    lambda e : e.get('CONTENT_TYPE') != 'application/x-shockwave-flash',
    ]

def add_forward_condition(condition):
    forwarding_conditions.append(condition)
    
def remove_forward_condition(condition):
    while condition in forwarding_conditions:
        forwarding_conditions.remove(condition)

