Modify

Opened 13 years ago

Closed 10 years ago

#8305 closed defect (fixed)

[Patch] Unicode paste data length is incorrectly calculated

Reported by: Adam Piper Owned by: Michael Renzmann
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 Adam Piper 13 years ago.
fixes Content-Length calculation and adds charset=UTF-8 to mimetype where applicable

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by Adam Piper

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

comment:1 Changed 13 years ago by Adam Piper

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

comment:2 Changed 13 years ago by Ryan J Ollos

Summary: Unicode paste data length is incorrectly calculated[Patch] Unicode paste data length is incorrectly calculated

comment:3 Changed 13 years ago by Adrian Fritz

Keywords: UTF-8 added; utf-8 removed

comment:4 Changed 10 years ago by ejucovy

Resolution: fixed
Status: newclosed

In 13443:

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Michael Renzmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.