[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: bug in osOpenHttpUrl()
My
patch was for the <grammar> tag and not the <goto> tag.
Is there any reason to have an anchor '#' in a grammar tag?
As for
the goto, the following worked (the gotest.jsp had two forms, one named moose
and one named bad)
<goto next="gototest.jsp?dog=snoopy#moose/>
<- went to moose
and
<goto next="gototest.jsp#moose/> <- went to
moose
and
<goto next="gototest.jsp?dog=snoopy/> <- went
to bad (which was correct)
what
didn't work was
<goto
next="gototest.jsp?dog=snoopy&cat=kitty#moose/>
any
suggestions?
-----Original Message-----
From:
vxi-discuss@metronomicon.com [mailto:vxi-discuss@metronomicon.com]On Behalf
Of Jean-Michel Reghem
Sent: Friday, August 10, 2001 6:48
AM
To: vxi-discuss@metronomicon.com
Subject: RE: bug in
osOpenHttpUrl()
John Kerwin écrivait ( Wednesday 8/1/01 06:49 PM ) dans le
message ci-dessous:
---
Yes, it's true it don't
work for goto tag...
i try this
<goto
next="http://bubble/vxml/test16.vxml?lang=fr"/>
i get bad fetch
(it's normal) but in my appache access log, i get http://bubble/vxml/test16.vxml and not http://bubble/vxml/test16.vxml?lang=fr
i try
this:
<goto next="http://bubble/vxml/test16.vxml#lang"/>
idem
than http://bubble/vxml/test16.vxml?lang=fr
i try
this
<goto
next="http://bubble/vxml/test16.vxml?lang=fr&truc=machin"/>
i got an
error: VXI abort and return NULL
--> thus there is an error with
&
i try this
<goto expr="'http://bubble/vxml/test16.vxml' +
'?lang=fr' + '&truc=machin'"/>
and i got the same problem
;-))
Well it was a lot easier to fix then
I thought:
i'm going to try you patch ...
but (see further in the code...)
There are two parts to the
fix
Part I (one change). Concatenate the "extra information" to
the end of the
querystring
queryStringStr[0] = 0;
addQueryStringToUrl( queryStringStr, URL_EXTRA_LENGTH, queryObj );
printf("queryStringStr = %s\n",queryStringStr);
becomes
queryStringStr[0] = 0;
addQueryStringToUrl( queryStringStr,
URL_EXTRA_LENGTH, queryObj );
// change 1 or 1 - this might
not be totally correct. Does not work
// with anchors (i.e.
grammar.jsp#dog), but why would you have these?
because anchors are important in link and goto tag ...
in
voiceXML 1.0, you have to use anchors to go to a specified dialog in other
document (or in the same document...)
like this:
<goto
expr="(type==true) ? 'utilities.vxml#confirm' : 'utilities.vxml#bye'
/>
Is somebody has a solution to manage ? (and & ) and
also anchors # ???
thank you
if
(VXIstrlen(comp->lpszExtraInfo)>0 &&
comp->lpszExtraInfo[0]=='?')
{
if(VXIstrlen(queryStringStr)>0)
// if not first, put in
'&'
VXIstrcat(queryStringStr,"&");
VXIstrcat(queryStringStr,comp->lpszExtraInfo+1);
// skip the '?'
}
printf("queryStringStr =
%s\n",queryStringStr);
Part II (two changes). Use the
extra data (there might NOT be a queryObj
even though there is "extra
information")
if(fetchMethod &&
(VXIstrcmp(fetchMethod, URL_METHOD_POST) == 0)){
strcpy(path,comp->lpszUrlPath);
if(queryObj)
extra_data =
queryStringStr;
cacheFlag =
URL_DO_NOT_CACHE;
}
else{
if(cacheFlag == URL_DO_NOT_CACHE)
cacheFlag = URL_DO_NOT_CACHE;
strcpy(path,comp->lpszUrlPath);
if(queryObj
&& (VXIstrlen(queryStringStr) >
0)){
strcat(path,"?");
strcat(path,
queryStringStr);
}
}
becomes:
if(fetchMethod &&
(VXIstrcmp(fetchMethod, URL_METHOD_POST) == 0)){
strcpy(path,comp->lpszUrlPath);
// CHANGE 1 OF
2
//if(queryObj)
extra_data = queryStringStr;
cacheFlag =
URL_DO_NOT_CACHE;
}
else{
if(cacheFlag == URL_DO_NOT_CACHE)
cacheFlag = URL_DO_NOT_CACHE;
strcpy(path,comp->lpszUrlPath);
// CHANGE 2 OF
2
if(/*queryObj &&
*/(VXIstrlen(queryStringStr) > 0)){
strcat(path,"?");
strcat(path,
queryStringStr);
}
}
-----Original
Message-----
From: John Kerwin [mailto:johnkerwin2001@yahoo.com]
Sent: Wednesday,
August 01, 2001 6:15 PM
To: vxi-discuss@metronomicon.com
Subject: bug
in osOpenHttpUrl()
osOpenHttpUrl() ignores the "extra"
information that is in the url.
extra, as defined by microsoft's
InternetCrackURL is
"extra information (for example, ?something or
#something)"
so if I have a grammar
<grammar
src="http://yahoo.com?spanish=t"/> I only get
<grammar
src="http://yahoo.com"/>
Anyone have a fix for
this before I go and do it
myself?
_________________________________________________________
Do
You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---