WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 112040
[SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup message
https://bugs.webkit.org/show_bug.cgi?id=112040
Summary
[SOUP] ResourceRequest::updateSoupMessage doesn't update the URI of the soup ...
Carlos Garcia Campos
Reported
2013-03-11 10:55:06 PDT
It should be updated too with the resource request URL.
Attachments
Patch
(1.43 KB, patch)
2013-03-11 10:57 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2013-03-11 10:57:17 PDT
Created
attachment 192508
[details]
Patch
Martin Robinson
Comment 2
2013-03-11 11:10:30 PDT
Does this break something or just for completeness? This code is really fragile, so I wouldn't change it without a new test passing.
Martin Robinson
Comment 3
2013-03-11 11:13:52 PDT
(In reply to
comment #2
)
> Does this break something or just for completeness? This code is really fragile, so I wouldn't change it without a new test passing.
And really what we should be doing here is switching to making the ResourceRequest "live" in the sense that the SoupMessage and SoupRequest are updated transparently, ala the other ResourceHandle implementations (see updatePlatformRequest and updateResourceRequest).
Carlos Garcia Campos
Comment 4
2013-03-11 11:16:50 PDT
(In reply to
comment #2
)
> Does this break something or just for completeness? This code is really fragile, so I wouldn't change it without a new test passing.
I think this hasn'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'm currently implementing SoupMessageHeaders *webkit_uri_request_get_http_header() in WebKit2, and I've switched the WebKitURIRequest to wrap a SoupMssage. When the WebKitURIRequest is created from a ResourceRequest the URI is not updated, and since it's a construct property, the default value remains (about:blank).
Carlos Garcia Campos
Comment 5
2013-03-11 11:17:36 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Does this break something or just for completeness? This code is really fragile, so I wouldn't change it without a new test passing. > > And really what we should be doing here is switching to making the ResourceRequest "live" in the sense that the SoupMessage and SoupRequest are updated transparently, ala the other ResourceHandle implementations (see updatePlatformRequest and updateResourceRequest).
That's for a different bug, I'd say.
Martin Robinson
Comment 6
2013-03-11 11:25:25 PDT
I'd rather this be part of the patch that requires it.
WebKit Review Bot
Comment 7
2013-03-11 11:26:32 PDT
Comment on
attachment 192508
[details]
Patch Clearing flags on attachment: 192508 Committed
r145376
: <
http://trac.webkit.org/changeset/145376
>
WebKit Review Bot
Comment 8
2013-03-11 11:26:36 PDT
All reviewed patches have been landed. Closing bug.
Martin Robinson
Comment 9
2013-03-11 11:36:13 PDT
(In reply to
comment #8
)
> All reviewed patches have been landed. Closing bug.
I'm a little unhappy that this landed without really finishing the discussion about it. :(
Martin Robinson
Comment 10
2013-03-11 11:36:34 PDT
(In reply to
comment #9
)
> (In reply to
comment #8
) > > All reviewed patches have been landed. Closing bug. > > I'm a little unhappy that this landed without really finishing the discussion about it. :(
Just unfortunate timing with the comments, I guess. Don't mean to blame anyone.
Martin Robinson
Comment 11
2013-03-11 11:40:24 PDT
(In reply to
comment #10
)
> Just unfortunate timing with the comments, I guess. Don'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'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'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't make sense except in tandem with the next piece.
Carlos Garcia Campos
Comment 12
2013-03-11 11:42:33 PDT
(In reply to
comment #10
)
> (In reply to
comment #9
) > > (In reply to
comment #8
) > > > All reviewed patches have been landed. Closing bug. > > > > I'm a little unhappy that this landed without really finishing the discussion about it. :( > > Just unfortunate timing with the comments, I guess. Don't mean to blame anyone.
We can just roll it out and continue discussing it.
Carlos Garcia Campos
Comment 13
2013-03-11 11:49:52 PDT
(In reply to
comment #11
)
> (In reply to
comment #10
) > > > Just unfortunate timing with the comments, I guess. Don'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'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'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'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.
Gustavo Noronha (kov)
Comment 14
2013-03-11 16:10:36 PDT
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't mind reverting and making it part of the other patch instead.
Martin Robinson
Comment 15
2013-03-11 16:17:14 PDT
(In reply to
comment #14
)
> 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'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'm going to spend some time trying to remove updateSoupMessage and updateFromSoupMessage entirely. We can try to remove the code then. I don't want to demand lots of code churn this close to the release. :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug