diff options
author | Nikita Nemkin | 2020-04-28 08:07:11 +0000 |
---|---|---|
committer | Nikita Nemkin | 2020-04-28 08:07:11 +0000 |
commit | 21f1c6bc98f4b10f68f858d716417f2cc074f108 (patch) | |
tree | 8a2ed45934f05e99abe7fffdaf22be4a30327a68 | |
parent | eda3e29e205e66c26917ef418656a0044d67965e (diff) | |
download | eclipse.platform.swt-21f1c6bc98f4b10f68f858d716417f2cc074f108.tar.gz eclipse.platform.swt-21f1c6bc98f4b10f68f858d716417f2cc074f108.tar.xz eclipse.platform.swt-21f1c6bc98f4b10f68f858d716417f2cc074f108.zip |
Bug 562354 - Browser#setUrl not honoring custom headers on Mac OS
NSMutableURLRequest.setValue (actually setValue:forHTTPHeaderField:)
selector was confused with NSObject.setValue because MacGenerator
shortens selectors with unique prefixes.
Regression introduced in Bug 547194 (50e3251a674a).
Change-Id: I6cd3dbae58716e9e3dee1b2e317cad8da6c35d9b
Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
4 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras index 50606c178d..3f0f40bb04 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras @@ -511,6 +511,11 @@ <arg swt_gen="true"></arg> <retval swt_gen="true"></retval> </method> + <method selector="setValue:forHTTPHeaderField:" swt_gen="true"> + <arg swt_gen="true"></arg> + <arg swt_gen="true"></arg> + <retval swt_gen="true"></retval> + </method> </class> <class name="NSNotification" swt_gen="mixed"> <method selector="object" swt_gen="true"> diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java index 942b0e65eb..81af307866 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableURLRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2019 IBM Corporation and others. + * Copyright (c) 2000, 2020 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -43,6 +43,10 @@ public void setURL(NSURL URL) { OS.objc_msgSend(this.id, OS.sel_setURL_, URL != null ? URL.id : 0); } +public void setValue(NSString value, NSString field) { + OS.objc_msgSend(this.id, OS.sel_setValue_forHTTPHeaderField_, value != null ? value.id : 0, field != null ? field.id : 0); +} + public static NSMutableURLRequest requestWithURL(NSURL URL) { long result = OS.objc_msgSend(OS.class_NSMutableURLRequest, OS.sel_requestWithURL_, URL != null ? URL.id : 0); return result != 0 ? new NSMutableURLRequest(result) : null; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java index 87c1be164f..2b48e32ed5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java @@ -1874,6 +1874,7 @@ public static final long sel_setUsesFontPanel_ = Selector.sel_setUsesFontPanel_. public static final long sel_setUsesScreenFonts_ = Selector.sel_setUsesScreenFonts_.value; public static final long sel_setUsesSingleLineMode_ = Selector.sel_setUsesSingleLineMode_.value; public static final long sel_setUsesThreadedAnimation_ = Selector.sel_setUsesThreadedAnimation_.value; +public static final long sel_setValue_forHTTPHeaderField_ = Selector.sel_setValue_forHTTPHeaderField_.value; public static final long sel_setValue_forKey_ = Selector.sel_setValue_forKey_.value; public static final long sel_setValueWraps_ = Selector.sel_setValueWraps_.value; public static final long sel_setValues_forParameter_ = Selector.sel_setValues_forParameter_.value; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java index e40b81ca97..f0b28d72d9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/Selector.java @@ -1157,6 +1157,7 @@ public enum Selector { , sel_setUsesScreenFonts_("setUsesScreenFonts:") , sel_setUsesSingleLineMode_("setUsesSingleLineMode:") , sel_setUsesThreadedAnimation_("setUsesThreadedAnimation:") + , sel_setValue_forHTTPHeaderField_("setValue:forHTTPHeaderField:") , sel_setValue_forKey_("setValue:forKey:") , sel_setValueWraps_("setValueWraps:") , sel_setValues_forParameter_("setValues:forParameter:") |