Bug 136248

Summary: [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, bunhere, cdumez, commit-queue, danw, gustavo, gyuyoung.kim, mrobinson, pnormand, sergio, svillar
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Fix coding style issues gustavo: review+

Description Carlos Garcia Campos 2014-08-26 01:43:09 PDT
Similar to webkit_uri_request_get_http_headers
Comment 1 Carlos Garcia Campos 2014-08-26 01:48:00 PDT
Created attachment 237142 [details]
Patch
Comment 2 WebKit Commit Bot 2014-08-26 01:50:15 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 WebKit Commit Bot 2014-08-26 01:50:26 PDT
Attachment 237142 [details] did not pass style-queue:


WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.h"
ERROR: Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:172:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:173:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:174:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:175:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 4 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Carlos Garcia Campos 2014-08-26 01:53:05 PDT
Created attachment 237143 [details]
Fix coding style issues
Comment 5 Sergio Villar Senin 2014-08-27 02:56:08 PDT
Comment on attachment 237143 [details]
Fix coding style issues

View in context: https://bugs.webkit.org/attachment.cgi?id=237143&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:280
> +    if (!response->priv->resourceResponse.url().protocolIsInHTTPFamily())

Shouldn't this check be done before the previous one?
Comment 6 Carlos Garcia Campos 2014-08-27 02:59:21 PDT
Comment on attachment 237143 [details]
Fix coding style issues

View in context: https://bugs.webkit.org/attachment.cgi?id=237143&action=review

>> Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:280
>> +    if (!response->priv->resourceResponse.url().protocolIsInHTTPFamily())
> 
> Shouldn't this check be done before the previous one?

I don't think so, once we have a valid pointer we should return that one, no need to check again it's an HTTP response
Comment 7 Gustavo Noronha (kov) 2014-08-28 04:44:03 PDT
Comment on attachment 237143 [details]
Fix coding style issues

View in context: https://bugs.webkit.org/attachment.cgi?id=237143&action=review

LGTM

>>> Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp:280
>>> +    if (!response->priv->resourceResponse.url().protocolIsInHTTPFamily())
>> 
>> Shouldn't this check be done before the previous one?
> 
> I don't think so, once we have a valid pointer we should return that one, no need to check again it's an HTTP response

The detail Sergio may have missed is that httpHeaders is only there if the resposts was for a protocal in the HTTP family. This check protects against creating httpHeaders in the first place (below).
Comment 8 Carlos Garcia Campos 2014-08-28 06:11:45 PDT
Committed r173060: <http://trac.webkit.org/changeset/173060>