Bug 263701 - STDIN and STDOUT of Perl CGI scripts should be binary mode for Windows Perl
Summary: STDIN and STDOUT of Perl CGI scripts should be binary mode for Windows Perl
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks: 264237
  Show dependency treegraph
 
Reported: 2023-10-25 18:20 PDT by Fujii Hironori
Modified: 2023-11-05 22:42 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2023-10-25 18:20:07 PDT
The STDOUT has to be binary mode for Windows Perl not to convert '\n' to '\r\n'.
"use CGI" automatically does it.
Add "binmode STDOUT" for other Perl CGI scripts.
Comment 1 Fujii Hironori 2023-10-25 18:29:41 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19577
Comment 2 Fujii Hironori 2023-10-25 19:20:07 PDT
Do I need to binmode STDIN too? CGI.pm sets binmode to STDIN too. Should I "use CGI"?
https://github.com/leejo/CGI.pm/blob/46617ba3049b53a1ac0c15d6fc6c49b2ee26f33d/lib/CGI.pm#L214-L215
Comment 3 EWS 2023-10-26 22:30:56 PDT
Committed 269838@main (5a716d72adac): <https://commits.webkit.org/269838@main>

Reviewed commits have been landed. Closing PR #19577 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2023-10-26 22:31:15 PDT
<rdar://problem/117568744>