[GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Aug 2014 13:11:21 +0000 (13:11 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Aug 2014 13:11:21 +0000 (13:11 +0000)
commitaded4897777053ad25470941ac09e7315bbecd90
treed7e0efc582edd796ea53c784294f4115c09fb312
parent55a9f8575134e36498ce8286f125499e9a1911d6
[GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=136248

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Move the code to update the SoupMessageHeaders to a new public
method.

* platform/network/soup/ResourceResponse.h:
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::updateSoupMessageHeaders):
(WebCore::ResourceResponse::toSoupMessage):

Source/WebKit2:

Add webkit_uri_response_get_http_headers() that returns the HTTP
headers as a SoupMessageHeaders* like webkit_uri_request_get_http_headers().

* UIProcess/API/gtk/WebKitURIResponse.cpp:
(webkitURIResponseGetProperty): Add http-headers property getter.
(webkit_uri_response_class_init): Add http-headers property.
(webkit_uri_response_get_http_headers): Return the HTTP headers as
a SoupMessageHeaders* or NULL for non HTTP responses.
* UIProcess/API/gtk/WebKitURIResponse.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.

Tools:

Add new test case for webkit_uri_response_get_http_headers().

* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(testURIResponseHTTPHeaders):
(serverCallback):
(beforeAll):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/soup/ResourceResponse.h
Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.h
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp