Article delegate-en/2648 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A2638@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: OWA not working via IE
12 Jun 2004 06:19:37 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


On 06/11/04(07:53) you feedback@delegate.. (Yutaka Sato) wrote
in <_A2638@delegate-en.ML_>
 |The "SEARCH" method takes XML data as message body in both request and
 |response messages, and XML data may contains URL.
 |<URL:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_webdav_search.asp>

Although I know little about SEARCH and XML, it seems that at least
the label <a:href> indicates URL to be rewritten for MOUNT.
So I made a patch like enclosed.   The patched version is at
"ftp://ftp.delegate.org/pub/DeleGate/delegate8.9.6-pre2.tar.gz"
This patch might work if we are lucky.

 |Such URLs in XML must be rewritten like URLs in HTML, when it is MOUNTed
 |by DeleGate, but not implemented yet.
 |<URL:http://www.delegate.org/mail-lists/delegate/12178>
 |
 |Since I rarely use M$ products including Outlook and IIS, I don't know
 |how to test it.  If you could send a example of request and response
 |message of SEARCH to me, I will see it to judge if it is easy to make
 |MOUNT for XML.  It will be recorded in logfile with "FCL=-tee-n" option.

Real example of SEARCH XMLs got with FCL=-tee-n is appreciated yet.

Cheers,
Yutaka
--
  D G   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( - )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


diff -cr ../delegate8.9.5/src/http.c ./src/http.c
*** ../delegate8.9.5/src/http.c	Wed May 19 21:30:07 2004
--- ./src/http.c	Sat Jun 12 13:41:06 2004
***************
*** 882,887 ****
--- 882,888 ----
  	    if( RX_inHeader
  	     || RX_isText == TX_HTML
  	     || RX_isText == TX_CSS
+ 	     || RX_isText == TX_XML
  	     || RX_isText == TX_JAVASCRIPT
  	    ){
  		if( anchor_rem[0] ){
***************
*** 1301,1306 ****
--- 1302,1310 ----
  			if( strcaseeq(RX_ctype,"text/css") )
  				RX_isText = TX_CSS;
  			else
+ 			if( strcaseeq(RX_ctype,"text/xml") )
+ 				RX_isText = TX_XML;
+ 			else
  			if( strcaseeq(RX_ctype,"text/x-component")
  			 || strcaseeq(RX_ctype,"text/javascript") )
  				RX_isText = TX_JAVASCRIPT;
***************
*** 3443,3448 ****
--- 3447,3455 ----
  				switch( RX_isText ){
  				   case TX_CSS:
  					refererb.r_ctype = "text/css";
+ 					break;
+ 				   case TX_XML:
+ 					refererb.r_ctype = "text/xml";
  					break;
  				   case TX_JAVASCRIPT:
  					refererb.r_ctype = "text/javascript";
diff -cr ../delegate8.9.5/src/url.c ./src/url.c
*** ../delegate8.9.5/src/url.c	Thu Feb 26 17:23:39 2004
--- ./src/url.c	Sat Jun 12 15:03:02 2004
***************
*** 457,462 ****
--- 457,508 ----
  		}
  		return 0;
  	}
+ 	if( strcaseeq(ctype,"text/xml") ){
+ 		char *sp,dom[32],name[32],*np,*nx;
+ 		for( sp = str; ch = *sp; sp++ ){
+ 			if( ch == '<' ){
+ 				if( sp[1] == '/' ){
+ 					isendtag = 1;
+ 					sp++;
+ 				}else	isendtag = 0;
+ 				++sp;
+ 				tag = attr = sp;
+ 
+ 				np = name;
+ 				nx = name + (sizeof(name)-1);
+ 				for(; *sp && (ch = *sp) != '>'; sp++ ){
+ 					if( nx <= np )
+ 						break;
+ 					if( *sp == ':' ){
+ 						*np = 0;
+ 						strcpy(dom,name);
+ 						np = name;
+ 						attr = sp+1;
+ 					}else{
+ 						*np++ = ch;
+ 					}
+ 				}
+ 				*np = 0;
+ 				if( *sp != '>' )
+ 					return 0;
+ 				sp++;
+ 
+ 				if( isendtag )
+ 					continue;
+ 
+ 				if( strcaseeq(name,"href")
+ 				 || strcaseeq(name,"src")
+ 				 || strcaseeq(name,"dst")
+ 				){
+ 					while( isspace(*sp) )
+ 						sp++;
+ 					top = sp;
+ 					goto exit;
+ 				}
+ 			}
+ 		}
+ 		return 0;
+ 	}
  
  	/*
  	 * The following code seems to make redundant search for attribute
diff -cr ../delegate8.9.5/src/url.h ./src/url.h
*** ../delegate8.9.5/src/url.h	Thu Feb 26 20:20:25 2004
--- ./src/url.h	Sat Jun 12 13:39:54 2004
***************
*** 54,59 ****
--- 54,60 ----
  #define TX_MISC		3
  #define TX_CSS		4
  #define TX_JAVASCRIPT	5
+ #define TX_XML		6
  
  #define URL_IN_HEAD		0x0001 /* in HTTP header like Location: ... */
  #define URL_IN_HTML_TAG		0x0010 /* in HTML tag like <A HREF=...> */

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V