Bugs item #1444286, was opened at 2006-03-06 09:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=462816&aid=1444286&group_id=51305
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: any
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxHTTPEngine Bug - URLEncode newlines
Initial Comment:
I noticed that when sending strings to a webserver with
either POST or GET after using
wxHTTPBuilder::URLEncode, I ended up with twice as many
newlines as I should have had. After a little poking
around in your httpbuilder.cpp, I noticed this at line 558:
switch( cChar )
{
case wxT(' '): szToReturn.Append(wxT('+')); break;
case wxT('\n'):
szToReturn.Append(wxT("%0D%0A")); break;
default:
{
szToReturn.Append(wxT("%"));
szToReturn += HexFromInt( cChar );
}
}
I was ending up with %0D%0D%0A for every newline (in
windows), instead of %0D%0A, as it should have been.
Removing this line...
case wxT('\n'):
szToReturn.Append(wxT("%0D%0A")); break;
...did the trick just fine, as the default action
handled the %0D%0A. I am aware, however, that this
might screw up OSX and Linux, where both %0D and %0A
aren't set for newlines. I haven't tested it yet on
either platform. Works fine in Windows, though.
Tom
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=462816&aid=1444286&group_id=51305
|