<?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>112040</bug_id>
          
          <creation_ts>2013-03-11 10:55:06 -0700</creation_ts>
          <short_desc>[SOUP] ResourceRequest::updateSoupMessage doesn&apos;t update the URI of the soup message</short_desc>
          <delta_ts>2013-03-11 16:17:14 -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>WebKitGTK</component>
          <version>528+ (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>Gtk, Soup</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>danw</cc>
    
    <cc>gustavo</cc>
    
    <cc>mrobinson</cc>
    
    <cc>rakuco</cc>
    
    <cc>svillar</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>852467</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-03-11 10:55:06 -0700</bug_when>
    <thetext>It should be updated too with the resource request URL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852469</commentid>
    <comment_count>1</comment_count>
      <attachid>192508</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-03-11 10:57:17 -0700</bug_when>
    <thetext>Created attachment 192508
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852482</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-03-11 11:10:30 -0700</bug_when>
    <thetext>Does this break something or just for completeness? This code is really fragile, so I wouldn&apos;t change it without a new test passing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852486</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-03-11 11:13:52 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Does this break something or just for completeness? This code is really fragile, so I wouldn&apos;t change it without a new test passing.

And really what we should be doing here is switching to making the ResourceRequest &quot;live&quot; in the sense that the SoupMessage and SoupRequest are updated transparently, ala the other ResourceHandle implementations (see updatePlatformRequest and updateResourceRequest).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852491</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-03-11 11:16:50 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Does this break something or just for completeness? This code is really fragile, so I wouldn&apos;t change it without a new test passing.

I think this hasn&apos;t been noticed before because in most of the cases the soup message has been created with a URI that is still valid after calling updateSoupMessage. I&apos;m currently implementing SoupMessageHeaders *webkit_uri_request_get_http_header() in WebKit2, and I&apos;ve switched the WebKitURIRequest to wrap a SoupMssage. When the WebKitURIRequest is created from a ResourceRequest the URI is not updated, and since it&apos;s a construct property, the default value remains (about:blank).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852492</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-03-11 11:17:36 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; Does this break something or just for completeness? This code is really fragile, so I wouldn&apos;t change it without a new test passing.
&gt; 
&gt; And really what we should be doing here is switching to making the ResourceRequest &quot;live&quot; in the sense that the SoupMessage and SoupRequest are updated transparently, ala the other ResourceHandle implementations (see updatePlatformRequest and updateResourceRequest).

That&apos;s for a different bug, I&apos;d say.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852501</commentid>
    <comment_count>6</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-03-11 11:25:25 -0700</bug_when>
    <thetext>I&apos;d rather this be part of the patch that requires it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852502</commentid>
    <comment_count>7</comment_count>
      <attachid>192508</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-03-11 11:26:32 -0700</bug_when>
    <thetext>Comment on attachment 192508
Patch

Clearing flags on attachment: 192508

Committed r145376: &lt;http://trac.webkit.org/changeset/145376&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852503</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-03-11 11:26:36 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852515</commentid>
    <comment_count>9</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-03-11 11:36:13 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; All reviewed patches have been landed.  Closing bug.

I&apos;m a little unhappy that this landed without really finishing the discussion about it. :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852516</commentid>
    <comment_count>10</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-03-11 11:36:34 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; (In reply to comment #8)
&gt; &gt; All reviewed patches have been landed.  Closing bug.
&gt; 
&gt; I&apos;m a little unhappy that this landed without really finishing the discussion about it. :(

Just unfortunate timing with the comments, I guess. Don&apos;t mean to blame anyone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852518</commentid>
    <comment_count>11</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-03-11 11:40:24 -0700</bug_when>
    <thetext>(In reply to comment #10)

&gt; Just unfortunate timing with the comments, I guess. Don&apos;t mean to blame anyone.

So my objection to this is follows:

Right now it seems that updateSoupMessage is only called in one place and that&apos;s directly after creating the SoupMessage. In this case the SoupMessage will have the URL that it was created with. updateSoupMessage is not meant to be called currently at any other moment. Thus, there&apos;s no bug without the other piece of this patch which calls it at a different moment. Thus, this patch just added effectively redundant code that doesn&apos;t make sense except in tandem with the next piece.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852522</commentid>
    <comment_count>12</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-03-11 11:42:33 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; (In reply to comment #8)
&gt; &gt; &gt; All reviewed patches have been landed.  Closing bug.
&gt; &gt; 
&gt; &gt; I&apos;m a little unhappy that this landed without really finishing the discussion about it. :(
&gt; 
&gt; Just unfortunate timing with the comments, I guess. Don&apos;t mean to blame anyone.

We can just roll it out and continue discussing it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852532</commentid>
    <comment_count>13</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2013-03-11 11:49:52 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; 
&gt; &gt; Just unfortunate timing with the comments, I guess. Don&apos;t mean to blame anyone.
&gt; 
&gt; So my objection to this is follows:
&gt; 
&gt; Right now it seems that updateSoupMessage is only called in one place and that&apos;s directly after creating the SoupMessage. In this case the SoupMessage will have the URL that it was created with. updateSoupMessage is not meant to be called currently at any other moment. Thus, there&apos;s no bug without the other piece of this patch which calls it at a different moment. Thus, this patch just added effectively redundant code that doesn&apos;t make sense except in tandem with the next piece.

The HTTP method is also set already in the message and updated in updateSoupMessage, maybe I understood wrong the name of the method, I though it was to update the soupMessage with the resource request info, not only with part of them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852828</commentid>
    <comment_count>14</comment_count>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2013-03-11 16:10:36 -0700</bug_when>
    <thetext>Sorry, I had not seen your comments Martin, I had the patch review window open for a little while and it seemed pretty straight-forward - I thought indeed it was something to be used in another patch, but I see your point, I wouldn&apos;t mind reverting and making it part of the other patch instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>852839</commentid>
    <comment_count>15</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2013-03-11 16:17:14 -0700</bug_when>
    <thetext>(In reply to comment #14)
&gt; Sorry, I had not seen your comments Martin, I had the patch review window open for a little while and it seemed pretty straight-forward - I thought indeed it was something to be used in another patch, but I see your point, I wouldn&apos;t mind reverting and making it part of the other patch instead.

In the end this will either be useful in the future or harmless. I&apos;m going to spend some time trying to remove updateSoupMessage and updateFromSoupMessage entirely. We can try to remove the code then. I don&apos;t want to demand lots of code churn this close to the release. :)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>192508</attachid>
            <date>2013-03-11 10:57:17 -0700</date>
            <delta_ts>2013-03-11 11:26:32 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>soup-message-uri.diff</filename>
            <type>text/plain</type>
            <size>1464</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCA0NGExYjhjLi5hZTI0YmRjIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTQg
QEAKKzIwMTMtMDMtMTEgI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