Changeset 69861 in webkit


Ignore:
Timestamp:
Oct 15, 2010 10:12:46 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-15 Sergio Villar Senin <svillar@igalia.com>

Reviewed by Gustavo Noronha Silva.

[Soup] Should not ignore body for redirection responses
https://bugs.webkit.org/show_bug.cgi?id=29299

Tests that 302 redirections without Location do not ignore the
body for redirection purpouses (the body could have a meta
http-equiv=refresh)

  • http/tests/navigation/redirect302-metaredirect-expected.txt: Added.
  • http/tests/navigation/redirect302-metaredirect.html: Added.
  • http/tests/navigation/resources/redirect302-metaredirect.html: Added.
  • http/tests/navigation/resources/redirect302-metaredirect.pl: Added.

2010-10-15 Sergio Villar Senin <svillar@igalia.com>

Reviewed by Gustavo Noronha Silva.

[Soup] Should not ignore body for redirection responses
https://bugs.webkit.org/show_bug.cgi?id=29299

Body is now provided to WebKitGtk+ in some redirections (like 302)
because it could be used by servers to perform clunky redirections
for example using http-equiv=REFRESH

Test: http/tests/navigation/redirect302-metaredirect.html

  • platform/network/soup/ResourceHandleSoup.cpp: (WebCore::gotHeadersCallback): (WebCore::finishedCallback):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69860 r69861  
     12010-10-15  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        Reviewed by Gustavo Noronha Silva.
     4
     5        [Soup] Should not ignore body for redirection responses
     6        https://bugs.webkit.org/show_bug.cgi?id=29299
     7
     8        Tests that 302 redirections without Location do not ignore the
     9        body for redirection purpouses (the body could have a meta
     10        http-equiv=refresh)
     11
     12        * http/tests/navigation/redirect302-metaredirect-expected.txt: Added.
     13        * http/tests/navigation/redirect302-metaredirect.html: Added.
     14        * http/tests/navigation/resources/redirect302-metaredirect.html: Added.
     15        * http/tests/navigation/resources/redirect302-metaredirect.pl: Added.
     16
    1172010-10-15  Nate Chapin  <japhet@chromium.org>
    218
  • trunk/WebCore/ChangeLog

    r69858 r69861  
     12010-10-15  Sergio Villar Senin  <svillar@igalia.com>
     2
     3        Reviewed by Gustavo Noronha Silva.
     4
     5        [Soup] Should not ignore body for redirection responses
     6        https://bugs.webkit.org/show_bug.cgi?id=29299
     7
     8        Body is now provided to WebKitGtk+ in some redirections (like 302)
     9        because it could be used by servers to perform clunky redirections
     10        for example using http-equiv=REFRESH
     11
     12        Test: http/tests/navigation/redirect302-metaredirect.html
     13
     14        * platform/network/soup/ResourceHandleSoup.cpp:
     15        (WebCore::gotHeadersCallback):
     16        (WebCore::finishedCallback):
     17
    1182010-10-15  Sergio Villar Senin  <svillar@igalia.com>
    219
  • trunk/WebCore/platform/network/soup/ResourceHandleSoup.cpp

    r69848 r69861  
    219219{
    220220    // For 401, we will accumulate the resource body, and only use it
    221     // in case authentication with the soup feature doesn't happen
    222     if (msg->status_code == SOUP_STATUS_UNAUTHORIZED) {
     221    // in case authentication with the soup feature doesn't happen.
     222    // For 302 we accumulate the body too because it could be used by
     223    // some servers to redirect with a clunky http-equiv=REFRESH
     224    if (statusWillBeHandledBySoup(msg->status_code)) {
    223225        soup_message_body_set_accumulate(msg->response_body, TRUE);
    224226        return;
     
    291293
    292294    client->didReceiveData(handle.get(), chunk->data, chunk->length, false);
    293 
    294295}
    295296
     
    495496        }
    496497
    497         if (d->m_soupMessage && d->m_soupMessage->status_code == SOUP_STATUS_UNAUTHORIZED) {
     498        if (d->m_soupMessage && statusWillBeHandledBySoup(d->m_soupMessage->status_code)) {
    498499            fillResponseFromMessage(soupMsg, &d->m_response);
    499500            client->didReceiveResponse(handle.get(), d->m_response);
Note: See TracChangeset for help on using the changeset viewer.