Modify

Opened 4 years ago

Closed 8 months ago

#8305 closed defect (fixed)

[Patch] Unicode paste data length is incorrectly calculated

Reported by: piperad Owned by: otaku42
Priority: normal Component: TracPastePlugin
Severity: normal Keywords: unicode UTF-8 length
Cc: Trac Release: 0.11

Description

The length calculation occurs before utf-8 encoding, thus the value used in the Content-Length is lower than it ought to be when multibyte characters are present.

I'll (hopefully!) attach a patch for this after submission.

Attachments (1)

tracpaste_content_length.diff (1.1 KB) - added by piperad 4 years ago.
fixes Content-Length calculation and adds charset=UTF-8 to mimetype where applicable

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by piperad

fixes Content-Length calculation and adds charset=UTF-8 to mimetype where applicable

comment:1 Changed 4 years ago by piperad

The patch also adds "content=UTF-8" to the mimetype where applicable.

comment:2 Changed 4 years ago by rjollos

  • Summary changed from Unicode paste data length is incorrectly calculated to [Patch] Unicode paste data length is incorrectly calculated

comment:3 Changed 4 years ago by AdrianFritz

  • Keywords UTF-8 added; utf-8 removed

comment:4 Changed 8 months ago by ejucovy

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

In 13443:

Fix handling of non-ASCII paste data in "download" link. Thanks to piperad for the patch. Fixes #8305

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from otaku42. Next status will be '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.