Hi!
I'm trying to process the content of the wsgi.input stream and I
realize that 2 different request mixes the content of the form (I can
see the both forms's content in the 2nd call)

Did you know why is that?

This is the related code I'm using:

if environ['REQUEST_METHOD'] == 'POST' and 'CONTENT_TYPE' in environ:
                        datos = self.procesaFormulario(FieldStorage(fp =
environ['wsgi.input'], environ = environ, keep_blank_values = 1))

def procesaFormulario(self, datos, resultado = {}):
                for campo in datos:
                        if type(datos[campo]) == type([]):
                                nombre = campo[:-2]
                                valor = []
                                for elemento in datos[campo]:
                                        if hasattr(elemento, 'filename'):
valor.append({elemento.filename: elemento.value})
                                        else: valor.append(datos[campo].value)
                        else:
                                nombre = campo
                                if hasattr(datos[campo], 'filename'): valor =
{datos[campo].filename: datos[campo].value}
                                else: valor = datos[campo].value
                        resultado[nombre] = valor
                return resultado

Thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to