Skip to content

fix(gui): Resenderでリクエストを全選択コピーして貼り直すと改行が変わる不具合を直す - #252

Merged
funa-tk merged 1 commit into
DeNA:masterfrom
toku-sa-n:fix/resender-raw-copy-paste
Nov 24, 2026
Merged

funa-tk merged 1 commit into
DeNA:masterfrom
toku-sa-n:fix/resender-raw-copy-paste

Conversation

@toku-sa-n

@toku-sa-n toku-sa-n commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Resenderでリクエストを全選択してコピーし、削除してから貼り付け直して送ると、元とは異なる正しくないリクエストが送信される不具合を修正します。

原因は2つありました。

  • 全選択してコピーしたときも末尾の改行を除いていたため、ヘッダーの終わりを示す空行が消えていました(fix(gui): strip trailing CRLF on copy from RawTextPane #217)。文書全体を選択したときは改行を残し、一部を選択したときだけ除くようにしました。

  • RSyntaxTextAreaの既定の貼り付け処理が、CRLFとCRをLFに変換していました。改行を変えずに挿入するTransferHandlerをRawTextPaneに設定しました。

  • By placing an "x" in the box, I hereby understand, accept and agree to be bound by the terms and conditions of the Contribution License Agreement.

@toku-sa-n
toku-sa-n force-pushed the fix/resender-raw-copy-paste branch 4 times, most recently from 0875007 to fbf4b39 Compare July 7, 2026 05:50
@toku-sa-n
toku-sa-n force-pushed the fix/resender-raw-copy-paste branch from fbf4b39 to cb709ca Compare July 10, 2026 11:36
@toku-sa-n
toku-sa-n force-pushed the fix/resender-raw-copy-paste branch from cb709ca to 26a7722 Compare November 19, 2026 05:33
…quest

Copying a whole request in Resender, deleting it and pasting it back
sent a different request. Two steps changed the bytes: copy() always
stripped trailing newlines, which drops the blank line that ends the
headers, and RSyntaxTextArea's RTATextTransferHandler turns every CRLF
and CR into LF on paste, which suits text files but not raw packets.

Keep trailing newlines when the whole document is selected, and strip
them only for a partial selection, which is the case DeNA#217 was about
(pasting a line into another proxy tool). Install a transfer handler
that inserts the pasted text as is, keeping one atomic undo edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@toku-sa-n
toku-sa-n force-pushed the fix/resender-raw-copy-paste branch from 26a7722 to c5f17e5 Compare November 20, 2026 02:11
@toku-sa-n toku-sa-n changed the title fix(gui): preserve Raw tab bytes after full copy-paste in Resender fix(gui): Resenderでリクエストを全選択コピーして貼り直すと改行が変わる不具合を直す Nov 20, 2026
@toku-sa-n
toku-sa-n marked this pull request as ready for review November 20, 2026 05:08
@funa-tk

funa-tk commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

ありがとうございます!
マージします。

@funa-tk
funa-tk merged commit 8982c1f into DeNA:master Nov 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants