Closed Bug 48887 Opened 24 years ago Closed 24 years ago

OpenURL AppleEvent cuts off last character of URL

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

PowerPC
All
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: beard, Assigned: sfraser_bugs)

References

Details

(Whiteboard: [rtm++])

Consistently, using a build from 8/12/2000, sending a GetURL AppleEvent to the
browser cuts off the last character. Run this script:

tell application "NetscapeDebug"
	GetURL "http://www.mozilla.org"
end tell

And the browser will tell you it can't load "www.mozilla.or".
I have a fix
Status: NEW → ASSIGNED
Whiteboard: fix in hand
changing severity to major
Severity: normal → major
*** Bug 51373 has been marked as a duplicate of this bug. ***
*** Bug 51805 has been marked as a duplicate of this bug. ***
simon - go ahead and check this in
Keywords: correctness, nsbeta3
Priority: P3 → P2
Whiteboard: fix in hand → [nsbeta3+]fix in hand
Target Milestone: --- → M18
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updating QA Contact.
QA Contact: janc → lorca
verified 2000092711 OS9.
Status: RESOLVED → VERIFIED
Reopening for OpenURL, which suffers the same problem. Dammit.
Status: VERIFIED → REOPENED
OS: All
Resolution: FIXED → ---
Summary: GetURL AppleEvent cuts off last character of URL → OpenURL AppleEvent cuts off last character of URL
Status: REOPENED → ASSIGNED
Keywords: correctness, nsbeta3rtm
Whiteboard: [nsbeta3+]fix in hand
Patch:

Index: mozilla/xpfe/bootstrap/appleevents/nsAESpyglassSuiteHandler.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpfe/bootstrap/appleevents/
nsAESpyglassSuiteHandler.cpp,v
retrieving revision 1.4
diff -u -2 -r1.4 nsAESpyglassSuiteHandler.cpp
--- nsAESpyglassSuiteHandler.cpp	2000/06/20 23:06:01	1.4
+++ nsAESpyglassSuiteHandler.cpp	2000/10/31 19:44:24
@@ -148,5 +148,5 @@
 	ThrowIfNil(urlString);
 	
-	directParameter.GetCString(urlString, dataSize);
+	directParameter.GetCString(urlString, dataSize + 1);
 	
 	nsMacCommandLine&  cmdLine = nsMacCommandLine::GetMacCommandLine();

This is exactly the same patch that was applied for the GetURL fix.
r=beard
Who is the super reviewer?  Please get the super review, do the proper testing
and move to [rtm+] state ASAP.
Whiteboard: [rtm need info]
extraction didn't count the terminator before.  standard fix.  sr=scc
have r= and sr=, so back to rtm+
Whiteboard: [rtm need info] → [rtm+]
PDT marking [rtm++]. Please check in to the branch ASAP.
Whiteboard: [rtm+] → [rtm++]
Fix checked into the branch. Here's what was checked in:

Index: mozilla/xpfe/bootstrap/appleevents/nsAESpyglassSuiteHandler.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpfe/bootstrap/appleevents/
nsAESpyglassSuiteHandler.cpp,v
retrieving revision 1.4
retrieving revision 1.4.16.1
diff -r1.4 -r1.4.16.1
150c150
< 	directParameter.GetCString(urlString, dataSize);
---
> 	directParameter.GetCString(urlString, dataSize + 1);


To verify this bug, open the Script Editor application, and make a new script 
with the contents:

tell application "Netscape 6"
	OpenURL "www.mozilla.org"
end tell

and run it. Before the fix, you'd see an error dialog that "www.mozilla.or" could 
not be found. After the fix, this should load http://www.mozilla.org/ in a new 
window.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Also checked the fix into the trunk.
VERIFIED on Mac OS 9.0.4 11-07-17 branch bits.  Regressed to 11-05-08 branch bits 
on Mac also.
Keywords: vtrunk
Reassigning QA Contact for all open and unverified bugs previously under Lorca's
care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
QA contact updated
QA Contact: gerardok → madhur
verified on build 2001-07-17-07-trunk
Status: RESOLVED → VERIFIED
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.