python - Different content-types in the same script -



python - Different content-types in the same script -

i need utilize different content-types in python script , know how 'reset' content-type after used 'text/html' example. here illustration not working expect

#!/usr/bin/env python print "content-type: text/html\n" print "hello! i'm going redirect" print "content-type: text/plain" print "refresh: 0; url=http://www.stackoverflow.com\n"

a cgi script run separately each request. figure out page beingness requested, , send right content type.

python

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -