delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/30/15:52:10

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,SPF_NEUTRAL,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F760EC3.5020202@cornell.edu>
Date: Fri, 30 Mar 2012 15:51:31 -0400
From: Ken Brown <kbrown AT cornell DOT edu>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygstart doesn't handle question marks in mailto URLs
References: <4F75B4D7 DOT 8060407 AT cornell DOT edu> <4F75B89A DOT 8050301 AT cs DOT utoronto DOT ca> <20120330151432 DOT GR30721 AT calimero DOT vinschen DOT de> <4F75D990 DOT 9030706 AT cs DOT utoronto DOT ca> <4F75F2D7 DOT 8090705 AT cornell DOT edu>
In-Reply-To: <4F75F2D7.8090705@cornell.edu>
X-PMX-CORNELL-SPAM-CHECKED: Pawpaw
X-Original-Sender: kbrown AT cornell DOT edu - Fri Mar 30 15:51:47 2012
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 3/30/2012 1:52 PM, Ken Brown wrote:
> On 3/30/2012 12:04 PM, Ryan Johnson wrote:
>> On 30/03/2012 11:14 AM, Corinna Vinschen wrote:
>>> On Mar 30 09:43, Ryan Johnson wrote:
>>>> On 30/03/2012 9:27 AM, Ken Brown wrote:
>>>>> If I type `cygstart mailto:recipient?subject=subject' at a Cygwin
>>>>> bash prompt, I expect my default Windows mail program to start an
>>>>> outgoing message with `recipient' as recipient and `subject' as
>>>>> subject. (This is what happens if I type the same URL into a
>>>>> `Start Menu -> Run' box.) What happens instead is that
>>>>> `recipient?subject=subject' shows up as the recipient, with the
>>>>> question mark replaced by something unprintable, and the subject
>>>>> is blank.
>>>>>
>>>>> Is this a bug in cygstart, or am I misunderstanding something?
>>>> I suspect a bug in the way cygwin1.dll handles conversion from unix-
>>>> to windows-style paths.
>>> http://cygwin.com/acronyms/#IAFNAB
>>>
>>> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-specialchars
>>>
>>>
>> Makes sense... for files, but we're dealing with a URL here, so it *is*
>> a bug IMO (but you're right, not a bug in cygwin's handling of
>> windows-style paths).
>>
>> Cygstart knows it's dealing with a URL.
>
> Actually, it doesn't, and that's the problem. Here's the relevant code
> in cygstart.c:
>
> /* Start a program, or open a file or URL, using Cygwin POSIX paths */
> static int
> cygStart (const char *aPath, const wchar_t * action,
> const wchar_t * args, const char *workDir,
> int show, StartFlags startFlags)
> [...]
> /* Convert file path from POSIX to Windows, unless it looks like a URL */
> if (!strstr (aPath, "://"))
>
> Chuck, what would you think of changing this so that cygstart would
> recognize `mailto:' URLs? It would also be useful if cygstart could
> learn to handle `file://' URLs involving POSIX paths.

We can probably end this thread now.  Yaakov has already sent a patch to 
cygwin-apps that does both of these things:

   http://cygwin.com/ml/cygwin-apps/2012-03/msg00246.html

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019