Hello,

I am having the strangest problem with PSP.

I have a PSP page which says --

<%@ page imports = "base64:decodestring" %>
<%
fields = req.fields()
message_text = fields[ 'message_text' ]
print decodestring( message_text )
%>

-- and I feed it with a function that looks like --

def web_process( message_text ):
import urllib as u
import base64
URL = 'http://localhost/test.htm'
form_fields = dict()
message_text = base64.encodestring( message_text )
form_fields[ 'message_text' ] = message_text
params = u.urlencode( form_fields )
web_handle = u.urlopen( URL, params )
response = web_handle.read()
print response
web_handle.close()

-- the problem is, the decodestring() function does not do anything. It returns my string unchanged, not decoded. No exception is raised. If I call binascii.a2b_base64() directly, I have the same behavior.

If I take the same code out to the command line and run it, on the same box as the same user, decodestring() does the right thing. encodestring() also works fine. Only the decodestring() function seems affected, and only from within PSP.

Any ideas on where to start troubleshooting?

Thanks,
David.



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to