| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 4 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 5 * Copyright (C) 2009 Google Inc. All rights reserved. | 5 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. | 6 * Copyright (C) 2011 Apple Inc. All Rights Reserved. |
| 7 * | 7 * |
| 8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 10 * are met: | 10 * are met: |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 reportURL = header.substring(startPos, pos - startPos); | 431 reportURL = header.substring(startPos, pos - startPos); |
| 432 failurePosition = startPos; // If later semantic check deems unaccep
table. | 432 failurePosition = startPos; // If later semantic check deems unaccep
table. |
| 433 } else { | 433 } else { |
| 434 failureReason = failureReasonInvalidDirective; | 434 failureReason = failureReasonInvalidDirective; |
| 435 failurePosition = pos; | 435 failurePosition = pos; |
| 436 return ContentSecurityPolicy::ReflectedXSSInvalid; | 436 return ContentSecurityPolicy::ReflectedXSSInvalid; |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 } | 439 } |
| 440 | 440 |
| 441 #if ENABLE(NOSNIFF) | |
| 442 ContentTypeOptionsDisposition parseContentTypeOptionsHeader(const String& header
) | 441 ContentTypeOptionsDisposition parseContentTypeOptionsHeader(const String& header
) |
| 443 { | 442 { |
| 444 if (header.stripWhiteSpace().lower() == "nosniff") | 443 if (header.stripWhiteSpace().lower() == "nosniff") |
| 445 return ContentTypeOptionsNosniff; | 444 return ContentTypeOptionsNosniff; |
| 446 return ContentTypeOptionsNone; | 445 return ContentTypeOptionsNone; |
| 447 } | 446 } |
| 448 #endif | |
| 449 | 447 |
| 450 String extractReasonPhraseFromHTTPStatusLine(const String& statusLine) | 448 String extractReasonPhraseFromHTTPStatusLine(const String& statusLine) |
| 451 { | 449 { |
| 452 size_t spacePos = statusLine.find(' '); | 450 size_t spacePos = statusLine.find(' '); |
| 453 // Remove status code from the status line. | 451 // Remove status code from the status line. |
| 454 spacePos = statusLine.find(' ', spacePos + 1); | 452 spacePos = statusLine.find(' ', spacePos + 1); |
| 455 return statusLine.substring(spacePos + 1); | 453 return statusLine.substring(spacePos + 1); |
| 456 } | 454 } |
| 457 | 455 |
| 458 XFrameOptionsDisposition parseXFrameOptionsHeader(const String& header) | 456 XFrameOptionsDisposition parseXFrameOptionsHeader(const String& header) |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 675 |
| 678 size_t parseHTTPRequestBody(const char* data, size_t length, Vector<unsigned cha
r>& body) | 676 size_t parseHTTPRequestBody(const char* data, size_t length, Vector<unsigned cha
r>& body) |
| 679 { | 677 { |
| 680 body.clear(); | 678 body.clear(); |
| 681 body.append(data, length); | 679 body.append(data, length); |
| 682 | 680 |
| 683 return length; | 681 return length; |
| 684 } | 682 } |
| 685 | 683 |
| 686 } | 684 } |
| OLD | NEW |