Bug 263701

Summary: STDIN and STDOUT of Perl CGI scripts should be binary mode for Windows Perl
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: Tools / TestsAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 264237    

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>