<?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>24349</bug_id>
          
          <creation_ts>2009-03-04 06:11:44 -0800</creation_ts>
          <short_desc>[Qt] HTTP status text is never set</short_desc>
          <delta_ts>2009-03-13 03:06:26 -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>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Bergkvist">adam.bergkvist</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>zecke</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>112186</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2009-03-04 06:11:44 -0800</bug_when>
    <thetext>See related bug: https://bugs.webkit.org/show_bug.cgi?id=3547</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112189</commentid>
    <comment_count>1</comment_count>
      <attachid>28263</attachid>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2009-03-04 06:24:17 -0800</bug_when>
    <thetext>Created attachment 28263
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112359</commentid>
    <comment_count>2</comment_count>
      <attachid>28263</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-03-05 04:54:15 -0800</bug_when>
    <thetext>Comment on attachment 28263
patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112716</commentid>
    <comment_count>3</comment_count>
      <attachid>28263</attachid>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-03-07 05:08:50 -0800</bug_when>
    <thetext>Comment on attachment 28263
patch


&gt; +        response.setHTTPStatusText(m_reply-&gt;attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray().constData());

this is weird...
QString -&gt; QByteArray -&gt; constData -&gt; String when we have a QString -&gt; String already...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112801</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-03-09 01:16:12 -0700</bug_when>
    <thetext>I&apos;m reluctant to make any changes, as I don&apos;t have a Qt build, but please feel free to tweak and land.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112809</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2009-03-09 02:31:05 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 28263 [review])
&gt; 
&gt; &gt; +        response.setHTTPStatusText(m_reply-&gt;attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray().constData());
&gt; 
&gt; this is weird...
&gt; QString -&gt; QByteArray -&gt; constData -&gt; String when we have a QString -&gt; String
&gt; already...
&gt; 

m_reply-&gt;attribute(QNetworkRequest::HttpReasonPhraseAttribute) is a QVariant::ByteArray. We could do a toString() to construct a QString, but that would cause an extra copy of the character data.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112815</commentid>
    <comment_count>6</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-03-09 02:41:07 -0700</bug_when>
    <thetext>I only looked at the Qt site of things and:

grep -rn HttpReasonPhraseAttribute *

qnetworkaccesscachebackend.cpp:81:    setAttribute(QNetworkRequest::HttpReasonPhraseAttribute, attributes.value(QNetworkRequest::HttpReasonPhraseAttribute));
qnetworkaccesshttpbackend.cpp:772:    setAttribute(QNetworkRequest::HttpReasonPhraseAttribute, httpReply-&gt;reasonPhrase());
qnetworkaccesshttpbackend.cpp:890:    setAttribute(QNetworkRequest::HttpReasonPhraseAttribute, attributes.value(QNetworkRequest::HttpReasonPhraseAttribute));
qnetworkaccesshttpbackend.cpp:1039:        attributes.insert(QNetworkRequest::HttpReasonPhraseAttribute, httpReply-&gt;reasonPhrase());
qnetworkrequest.cpp:116:    \value HttpReasonPhraseAttribute
qnetworkrequest.h:67:        HttpReasonPhraseAttribute,


and reasonPhrase() is a QString coming from:

qhttp.h:    QString reasonPhrase() const;
qhttpnetworkconnection_p.h:    QString reasonPhrase() const;


so what am I missing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112817</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2009-03-09 03:24:30 -0700</bug_when>
    <thetext>Strange... considering that the documentation states that it is a ByteArray. A ByteArray would make sense since the reason phrase can only contain ascii characters.

http://doc.trolltech.com/main-snapshot/qnetworkrequest.html#Attribute-enum</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113568</commentid>
    <comment_count>8</comment_count>
    <who name="Holger Freyther">zecke</who>
    <bug_when>2009-03-13 03:04:50 -0700</bug_when>
    <thetext>(In reply to comment #7)

&gt; http://doc.trolltech.com/main-snapshot/qnetworkrequest.html#Attribute-enum

Okay, we should stick with the documentation here.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113569</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-03-13 03:06:26 -0700</bug_when>
    <thetext>Committed revision 41664.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>28263</attachid>
            <date>2009-03-04 06:24:17 -0800</date>
            <delta_ts>2009-03-05 04:54:15 -0800</delta_ts>
            <desc>patch</desc>
            <filename>patch_24349</filename>
            <type>text/plain</type>
            <size>1551</size>
            <attacher name="Adam Bergkvist">adam.bergkvist</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA0MTQxOCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTUgQEAKKzIwMDktMDMtMDQgIEFkYW0gQmVyZ2t2aXN0IDxhZGFtLmJlcmdrdmlz
dEBlcmljc3Nvbi5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisK
KyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTI0MzQ5Cisg
ICAgICAgIFtRVF0gSFRUUCBzdGF0dXMgdGV4dCBpcyBuZXZlciBzZXQKKworICAgICAgICBTZXQg
SFRUUCBzdGF0dXMgdGV4dCB0byB0aGUgcmVhc29uIHBocmFzZSBhdHRyaWJ1dGUgb2YgUU5ldHdv
cmtSZXBseS4KKworICAgICAgICAqIHBsYXRmb3JtL25ldHdvcmsvcXQvUU5ldHdvcmtSZXBseUhh
bmRsZXIuY3BwOgorICAgICAgICAoV2ViQ29yZTo6UU5ldHdvcmtSZXBseUhhbmRsZXI6OnNlbmRS
ZXNwb25zZUlmTmVlZGVkKToKKwogMjAwOS0wMy0wMyAgTWlrZSBCZWxzaGUgIDxtaWtlQGJlbHNo
ZS5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgQWxleGV5IFByb3NrdXJ5YWtvdi4KSW5kZXg6
IFdlYkNvcmUvcGxhd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AgIHJlc3BvbnNlLnNldEhUVFBTdGF0dXND
b2RlKDQwNCk7CiAK
</data>
<flag name="review"
          id="13821"
          type_id="1"
          status="+"
          setter="ap"
    />
          </attachment>
      

    </bug>

</bugzilla>