Bug 213690 - REGRESSION (r262776): Leak of NSMutableURLRequest in -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]
Summary: REGRESSION (r262776): Leak of NSMutableURLRequest in -[WebCoreResourceHandleA...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Keywords: InRadar
Depends on: 211999 213059
  Show dependency treegraph
Reported: 2020-06-27 20:40 PDT by David Kilzer (:ddkilzer)
Modified: 2020-06-29 03:54 PDT (History)
4 users (show)

See Also:

Patch v1 (2.35 KB, patch)
2020-06-27 20:43 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2020-06-27 20:40:11 PDT
Leak of NSMutableURLRequest in -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]:

+        if (equalLettersIgnoringASCIICase(m_handle->firstRequest().httpMethod(), "post") && !m_handle->firstRequest().hasHTTPHeaderField(HTTPHeaderName::ContentType)) {
+            NSMutableURLRequest *modifiedRequest = [newRequest mutableCopy];
+            [modifiedRequest setValue:nil forHTTPHeaderField:@"Content-Type"];
+            return modifiedRequest; // LEAK: This variable needs to be autoreleased.
+        }

Regressed with:

    Bug 211999: XMLHTTPRequest.send should not send Content-Type headers when Blob has no type
Comment 1 Radar WebKit Bug Importer 2020-06-27 20:40:37 PDT
Comment 2 David Kilzer (:ddkilzer) 2020-06-27 20:43:36 PDT
Created attachment 402980 [details]
Patch v1
Comment 3 EWS 2020-06-29 03:54:39 PDT
Committed r263653: <https://trac.webkit.org/changeset/263653>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402980 [details].