Modify

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#11635 closed defect (fixed)

Extra character at end of line

Reported by: palmerb@… Owned by: osimons
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords:
Cc: olemis Trac Release: 1.0

Description

An extra character is added after the cr/lf of text. This causes problems when pulling the wiki pages as well in viewing and editing tickets in Mylyn. My ssystem

System Information

PackageVersion
Trac1.0
Genshi0.6 (without speedups)
GIT1.7.9
pysqlite2.6.0
Python2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
RPC1.1.2
setuptools0.6c11
SQLite3.6.21
jQuery1.7.2

Installed Plugins

NameVersionLocation
BackLinksN/Ae:\obss\plugins\BackLinks.py
tracaccountmanager0.2.1devc:\python27\lib\site-packages\tracaccountmanager-0.2.1dev-py2.7.egg
tracgit0.12.0.2devc:\python27\lib\site-packages\tracgit-0.12.0.2dev-py2.7.egg
trachttpauth1.1c:\python27\lib\site-packages\trachttpauth-1.1-py2.7.egg
tracxmlrpc1.1.2c:\python27\lib\site-packages\tracxmlrpc-1.1.2-py2.7.egg

Attachments (0)

Change History (9)

comment:1 Changed 7 months ago by osimons

It causes "problems"? Care to explain the issue in more detail?

Following [6053] all line endings for strings from RPC should be \r\n, and it is not clear to me either what the extra character is or how it appears.

Have you tried to use something like curl to make a request and compare the content you receive (see the API docs for examples)? Does it happen for both JSON and XML? Could it be an issue with your client interface and not the server?

comment:2 Changed 7 months ago by osimons

Ah, [6053] fixed input of strings only.

Perhaps you better review #2482, and then follow the actual string output to see where it changes to something unexpected - using raw requests and alternative clients if possible.

comment:3 Changed 7 months ago by palmerb@…

At first I thought it was just my code. I updated Trac and then XMLRPCplugin to make it work with Mylyn in Eclipse. Then I updated my documentation which uses Java to get the wiki pages and create a set of HTML pages in documentation. When I ran it there appeared these strange characters that I finally was able to replace using the following code:

char c[] = new char[1];
c[0]='\ufffd';
pageHtml = pageHtml.replaceAll(new String(c), "");

It also appears in Mylyn when viewing any text field with cr/lf.

I agree that this is weird but I am using the org.lustin.trac library and Mylyn is using something else for getting the data. This leads back to the plugin.

comment:4 Changed 7 months ago by osimons

Oh, perhaps a regression from [13728:13729]? What if you revert RPC to revisions preceeding these changes?

comment:5 Changed 7 months ago by palmerb@…

I traced this through the request and looked at the raw data being returned. For whatever reason the \r is coming back as \ufffd rather than as \u000d.

Doesn't trigger any thoughts at this time. I fixed it for my documentation using the code above but can't do anything about Mylyn. It is not the end of the world as it goes back into the database correctly without any problems.

comment:6 Changed 7 months ago by osimons

I've reopened #11050. We'll get this fixed.

comment:7 Changed 7 months ago by osimons

  • Resolution set to fixed
  • Status changed from new to closed

In 13776:

XmlRpcPlugin: Tweak [13728] fix again to let carriage return pass through. Closes #11050 again. Also closes #11635.

comment:8 Changed 7 months ago by osimons

Please update to latest trunk from repository. The issue should be fixed now. Reopen ticket if not.

comment:9 Changed 7 months ago by anonymous

It works. Thanks for making this all work together and for making something that really helps my work. Also the speed with which this was fixed was impressive.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.