Hi Graham,

When the IUS RPM upgrade hit our server Saturday, we started getting 500
Internal Server Errors.  The upgrade was from

python33-mod_wsgi-3.4-2.ius.el6.x86_64
to
python33-mod_wsgi-4.1.3-1.ius.el6.x86_64

The error was:
mod_wsgi (pid=1427): Exception occurred processing WSGI script
 /home/deploy/WhiteBoot4/DevLevel.1/TMTManage/Web/Dashboard/User/index.wsgi'.
TypeError: sequence of byte string values expected, value of type str found

--
I investigated and found some 4-5 year old code that did this (preparing
for the wsgi response):

    self.Header['Content-Type'] = 'text/html'
    self.Status = 302
    self.Iterator = ("",)
    self.Length = 0

This was changed to:

    ...
    self.Iterator = (b'',)

Which of course fixed the problem.  In more recent application code, there
was no problem because all responses were in bytes regardless of the
response status.

--
I'm not sure why we were returning an empty string on a 302 redirect, but I
thought it might be worth mentioning that something recently changed in
mod_wsgi which will cause a failure on this non-standard behavior.

If this change was not intentional, I thought you might want to know Graham.

Thanks!
Jason Garber

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to