quoted_printable_encode does not encode trailing space
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、PHPのソースツリーで quoted_printable_encode の実装と既存のテストを探します。issue には具体的なファイル名が示されていません。末尾に空白がある例を再現し、引用されている RFC 2045 の規則で要求されるとおり、エンコード結果が =20 で終わることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Description
The following code:
<?php
var_dump(quoted_printable_encode('hello '));
Resulted in this output:
string(6) "hello "
But I expected this output instead:
string(9) "hello=20"
RFC 2045 says:
(3) (White Space) Octets with values of 9 and 32 MAY be represented as US-ASCII TAB (HT) and SPACE characters, respectively, but MUST NOT be so represented at the end of an encoded line. Any TAB (HT) or SPACE characters on an encoded line MUST thus be followed on that line by a printable character. In particular, an "=" at the end of an encoded line, indicating a soft line break (see rule #5) may follow one or more TAB (HT) or SPACE characters. It follows that an octet with decimal value 9 or 32 appearing at the end of an encoded line must be represented according to Rule #1. This rule is necessary because some MTAs (Message Transport Agents, programs which transport messages from one user to another, or perform a portion of such transfers) are known to pad lines of text with SPACEs, and others are known to remove "white space" characters from the end of a line. Therefore, when decoding a Quoted-Printable body, any trailing white space on a line must be deleted, as it will necessarily have been added by intermediate transport agents.
PHP Version
PHP 8.7.0-dev (cli) (built: Oct 18 2026 16:29:33) (NTS DEBUG)
Copyright © The PHP Group and Contributors
Zend Engine v4.7.0-dev, Copyright © Zend by Perforce
with Zend OPcache v8.7.0-dev, Copyright ©, by Zend by Perforce
Operating System
No response
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 166
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php/php-src のほかの issue
-
quoted_printable_encode() produces lines longer than 76 characters for bytes 0xF5 to 0xFF対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
standard/syslog: the request shutdown hook calls closelog() even when the request never opened syslog対応中かも @lazerg が 7 日前に担当しました。 オープンBug Extension: standard Status: Verified
難易度 2/5 半日 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
php/php-src#24196 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Feature Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
php/php-src#24183 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Sockets from synchronous stream_socket_client() are left in non-blocking mode on Windows対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンBug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
v9.6.0: CMake incorrectly enforces presence of libevdev対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
IoTSDK
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Azure/azure-iot-sdk-c#2776 ·
メンテナーはふだん 2 日以内に返信
-
[Bug] Unhandled ValueError terminates watchdog thread when GISRC value contains multiple colonsオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug Component component: net
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
RT-Thread/rt-thread#11913 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
contiki-ng/contiki-ng#3289 ·
メンテナーはふだん 3 日以内に返信