| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 response->setHTTPStatusText(data->m_httpStatusText); | 48 response->setHTTPStatusText(data->m_httpStatusText); |
| 49 | 49 |
| 50 response->lazyInit(); | 50 response->lazyInit(); |
| 51 response->m_httpHeaderFields.adopt(std::auto_ptr<CrossThreadHTTPHeaderMapDat
a>(data->m_httpHeaders.release())); | 51 response->m_httpHeaderFields.adopt(std::auto_ptr<CrossThreadHTTPHeaderMapDat
a>(data->m_httpHeaders.release())); |
| 52 | 52 |
| 53 response->setExpirationDate(data->m_expirationDate); | 53 response->setExpirationDate(data->m_expirationDate); |
| 54 response->setLastModifiedDate(data->m_lastModifiedDate); | 54 response->setLastModifiedDate(data->m_lastModifiedDate); |
| 55 response->m_haveParsedCacheControl = data->m_haveParsedCacheControl; | 55 response->m_haveParsedCacheControl = data->m_haveParsedCacheControl; |
| 56 response->m_cacheControlContainsMustRevalidate = data->m_cacheControlContain
sMustRevalidate; | 56 response->m_cacheControlContainsMustRevalidate = data->m_cacheControlContain
sMustRevalidate; |
| 57 response->m_cacheControlContainsNoCache = data->m_cacheControlContainsNoCach
e; | 57 response->m_cacheControlContainsNoCache = data->m_cacheControlContainsNoCach
e; |
| 58 #if ENABLE(APPLICATION_CACHE) |
| 59 response->m_appcacheID = data->m_appcacheID; |
| 60 response->m_manifestURL = data->m_manifestURL; |
| 61 #endif |
| 58 return response; | 62 return response; |
| 59 } | 63 } |
| 60 | 64 |
| 61 auto_ptr<CrossThreadResourceResponseData> ResourceResponseBase::copyData() const | 65 auto_ptr<CrossThreadResourceResponseData> ResourceResponseBase::copyData() const |
| 62 { | 66 { |
| 63 auto_ptr<CrossThreadResourceResponseData> data(new CrossThreadResourceRespon
seData()); | 67 auto_ptr<CrossThreadResourceResponseData> data(new CrossThreadResourceRespon
seData()); |
| 64 data->m_url = url().copy(); | 68 data->m_url = url().copy(); |
| 65 data->m_mimeType = mimeType().copy(); | 69 data->m_mimeType = mimeType().copy(); |
| 66 data->m_expectedContentLength = expectedContentLength(); | 70 data->m_expectedContentLength = expectedContentLength(); |
| 67 data->m_textEncodingName = textEncodingName().copy(); | 71 data->m_textEncodingName = textEncodingName().copy(); |
| 68 data->m_suggestedFilename = suggestedFilename().copy(); | 72 data->m_suggestedFilename = suggestedFilename().copy(); |
| 69 data->m_httpStatusCode = httpStatusCode(); | 73 data->m_httpStatusCode = httpStatusCode(); |
| 70 data->m_httpStatusText = httpStatusText().copy(); | 74 data->m_httpStatusText = httpStatusText().copy(); |
| 71 data->m_httpHeaders.adopt(httpHeaderFields().copyData()); | 75 data->m_httpHeaders.adopt(httpHeaderFields().copyData()); |
| 72 data->m_expirationDate = expirationDate(); | 76 data->m_expirationDate = expirationDate(); |
| 73 data->m_lastModifiedDate = lastModifiedDate(); | 77 data->m_lastModifiedDate = lastModifiedDate(); |
| 74 data->m_haveParsedCacheControl = m_haveParsedCacheControl; | 78 data->m_haveParsedCacheControl = m_haveParsedCacheControl; |
| 75 data->m_cacheControlContainsMustRevalidate = m_cacheControlContainsMustReval
idate; | 79 data->m_cacheControlContainsMustRevalidate = m_cacheControlContainsMustReval
idate; |
| 76 data->m_cacheControlContainsNoCache = m_cacheControlContainsNoCache; | 80 data->m_cacheControlContainsNoCache = m_cacheControlContainsNoCache; |
| 81 #if ENABLE(APPLICATION_CACHE) |
| 82 data->m_appcacheID = m_appcacheID; |
| 83 data->m_manifestURL = m_manifestURL; |
| 84 #endif |
| 77 return data; | 85 return data; |
| 78 } | 86 } |
| 79 | 87 |
| 80 bool ResourceResponseBase::isHTTP() const | 88 bool ResourceResponseBase::isHTTP() const |
| 81 { | 89 { |
| 82 lazyInit(); | 90 lazyInit(); |
| 83 | 91 |
| 84 String protocol = m_url.protocol(); | 92 String protocol = m_url.protocol(); |
| 85 | 93 |
| 86 return equalIgnoringCase(protocol, "http") || equalIgnoringCase(protocol, "
https"); | 94 return equalIgnoringCase(protocol, "http") || equalIgnoringCase(protocol, "
https"); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 pos += nextCommaPosition - pos + 1; | 409 pos += nextCommaPosition - pos + 1; |
| 402 } else { | 410 } else { |
| 403 // Add last directive to map with empty string as value | 411 // Add last directive to map with empty string as value |
| 404 result.append(pair<String, String>(trimToNextSeparator(safeHeader.su
bstring(pos, max - pos).stripWhiteSpace()), "")); | 412 result.append(pair<String, String>(trimToNextSeparator(safeHeader.su
bstring(pos, max - pos).stripWhiteSpace()), "")); |
| 405 return; | 413 return; |
| 406 } | 414 } |
| 407 } | 415 } |
| 408 } | 416 } |
| 409 | 417 |
| 410 } | 418 } |
| OLD | NEW |