<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>258389</bug_id>
          
          <creation_ts>2023-06-21 22:27:47 -0700</creation_ts>
          <short_desc>[Curl] Replace handling of reason-phrase in ResourceResponseCurl</short_desc>
          <delta_ts>2023-06-23 01:28:37 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kenji Shukuwa">kenji.shukuwa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fujii</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1962978</commentid>
    <comment_count>0</comment_count>
    <who name="Kenji Shukuwa">kenji.shukuwa</who>
    <bug_when>2023-06-21 22:27:47 -0700</bug_when>
    <thetext>In ResourceResponseCurl, the reason-phrase of the HTTP status line is obtained
in the ResourceResponse::setStatusLine function, but in order to reduce the code
to be maintained, replace it with extractReasonPhraseFromHTTPStatusLine of HTTPParsers.

Additionally, the reason-phrase can contain &quot;:&quot;. Therefore, there is a possibility
that the reason-phrase cannot be obtained with the current processing.
(for example: HTTP/1.1 999 ABC:DEF)

https://github.com/WebKit/WebKit/blob/e45a46fae1a59709b4d5dd5c043352129364d150/Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp#L117-L129
---
    auto splitPosition = header.find(&apos;:&apos;);
    if (splitPosition != notFound) {
        ...
    } else if (startsWithLettersIgnoringASCIICase(header, &quot;http&quot;_s)) {
        // This is the first line of the response.
        setStatusLine(header);
    }
---</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1962980</commentid>
    <comment_count>1</comment_count>
    <who name="Kenji Shukuwa">kenji.shukuwa</who>
    <bug_when>2023-06-21 22:34:53 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/15180</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1962981</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-06-21 22:51:02 -0700</bug_when>
    <thetext>Committed 265395@main (007a3ea80d5c): &lt;https://commits.webkit.org/265395@main&gt;

Reviewed commits have been landed. Closing PR #15180 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1962982</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-06-21 22:52:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/111142631&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963121</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-06-22 13:04:56 -0700</bug_when>
    <thetext>Some tests regresses. Could you take a look?

Buildbot: builder WinCairo-64-bit-Release-Tests build 1327 (265396@main)
https://build.webkit.org/#/builders/728/builds/1327

Regressions: Unexpected text-only failures (9)
  http/tests/inspector/network/resource-redirect-request-headers.html [ Failure ]
  http/tests/xmlhttprequest/extra-parameters.html [ Failure ]
  http/tests/xmlhttprequest/response-special-characters.html [ Failure ]
  http/tests/xmlhttprequest/status-after-abort.html [ Failure ]
  http/tests/xmlhttprequest/web-apps/012.html [ Failure ]
  http/tests/xmlhttprequest/web-apps/013.html [ Failure ]
  http/tests/xmlhttprequest/xmlhttprequest-missing-file-exception.html [ Failure ]
  http/tests/xmlhttprequest/zero-length-response-sync.html [ Failure ]
  http/tests/xmlhttprequest/zero-length-response.html [ Failure ]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963191</commentid>
    <comment_count>5</comment_count>
    <who name="Kenji Shukuwa">kenji.shukuwa</who>
    <bug_when>2023-06-22 18:58:39 -0700</bug_when>
    <thetext>(In reply to Fujii Hironori from comment #4)
&gt; Some tests regresses. Could you take a look?
&gt; 

Sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963249</commentid>
    <comment_count>6</comment_count>
    <who name="Kenji Shukuwa">kenji.shukuwa</who>
    <bug_when>2023-06-23 01:28:37 -0700</bug_when>
    <thetext>https://bugs.webkit.org/show_bug.cgi?id=258442</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>