Re: [SQU] Squid and Exchange Outlook Web Access (FIX)

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 16 Dec 2000 09:16:59 +0100

Quick question: Why didn't you simply add the new methods to squid.conf?

See the extension_methods directive (Squid-2.4 thingy)

--
Henrik Nordstrom
Squid hacker
Timothy L. Minahan wrote:
> 
> Using squid-2.4-200011210000 under cygwin1.1.5 modified the http.c file,
> enums.h file and url.c files as below.
> Changes are marked with the comment /* Added this line to accomodate
> Microsoft Exchange 2000 Outlook Web Access*/
> 
> The solution was sourced partially from the archive but i couldn't
> understand all the references to RFC's (Sorry I don't understand much C)
> so found the similiar entries that were talked about eg METHOD_BMOVE and
> METHOD_BDELETE and it worked. so here is   8-)
> 
> Modified http.c
> httpMaybeRemovePublic(StoreEntry * e, http_status status)
> {
>     int remove = 0;
>     int forbidden = 0;
>     StoreEntry *pe;
>     if (!EBIT_TEST(e->flags, KEY_PRIVATE))
>         return;
>     switch (status) {
>     case HTTP_OK:
>     case HTTP_NON_AUTHORITATIVE_INFORMATION:
>     case HTTP_MULTIPLE_CHOICES:
>     case HTTP_MOVED_PERMANENTLY:
>     case HTTP_MOVED_TEMPORARILY:
>     case HTTP_GONE:
>     case HTTP_NOT_FOUND:
>         remove = 1;
>         break;
>     case HTTP_FORBIDDEN:
>     case HTTP_METHOD_NOT_ALLOWED:
>         forbidden = 1;
>         break;
> #if WORK_IN_PROGRESS
>     case HTTP_UNAUTHORIZED:
>         forbidden = 1;
>         break;
> #endif
>     default:
> #if QUESTIONABLE
>         /*
>          * Any 2xx response should eject previously cached entities...
>          */
>         if (status >= 200 && status < 300)
>             remove = 1;
> #endif
>         break;
>     }
>     if (!remove && !forbidden)
>         return;
>     assert(e->mem_obj);
>     if ((pe = storeGetPublic(e->mem_obj->url, e->mem_obj->method)) !=
> NULL) {
>         assert(e != pe);
>         storeRelease(pe);
>     }
>     /*
>      * Also remove any cached HEAD response in case the object has
>      * changed.
>      */
>     if ((pe = storeGetPublic(e->mem_obj->url, METHOD_HEAD)) != NULL) {
>         assert(e != pe);
>         storeRelease(pe);
>     }
>     if (forbidden)
>         return;
>     switch (e->mem_obj->method) {
>     case METHOD_PUT:
>     case METHOD_DELETE:
>     case METHOD_PROPPATCH:
>     case METHOD_MKCOL:
>     case METHOD_MOVE:
>     case METHOD_BMOVE:
>     case METHOD_BDELETE:
>     case METHOD_SEARCH: /* Added this line to accomodate Microsoft
> Exchange 2000 Outlook Web Access*/
>         /*
>          * Remove any cached GET object if it is beleived that the
>          * object may have changed as a result of other methods
>          */
>         if ((pe = storeGetPublic(e->mem_obj->url, METHOD_GET)) != NULL)
> {
>             assert(e != pe);
>             storeRelease(pe);
>         }
>         break;
>     }
> }
> 
> 
> modified the url.c file to look like this:
> 
> const char *RequestMethodStr[] =
> {
>     "NONE",
>     "GET",
>     "POST",
>     "PUT",
>     "HEAD",
>     "CONNECT",
>     "TRACE",
>     "PURGE",
>     "OPTIONS",
>     "DELETE",
>     "PROPFIND",
>     "PROPPATCH",
>     "MKCOL",
>     "COPY",
>     "MOVE",
>     "LOCK",
>     "UNLOCK",
>     "BMOVE",
>     "BDELETE",
>     "BPROPFIND",
>     "%EXT00",
>     "%EXT01",
>     "%EXT02",
>     "%EXT03",
>     "%EXT04",
>     "%EXT05",
>     "%EXT06",
>     "%EXT07",
>     "%EXT08",
>     "%EXT09",
>     "%EXT10",
>     "%EXT11",
>     "%EXT12",
>     "%EXT13",
>     "%EXT14",
>     "%EXT15",
>     "%EXT16",
>     "%EXT17",
>     "%EXT18",
>     "%EXT19",
>     "SEARCH", /* Added this line to accomodate Microsoft Exchange 2000
> Outlook Web Access*/
>     "ERROR"
> };
> 
> The "SEARCH" was the method added.
> 
> and then in enums.h changed
> enum {
>     METHOD_NONE,                /* 000 */
>     METHOD_GET,                 /* 001 */
>     METHOD_POST,                /* 010 */
>     METHOD_PUT,                 /* 011 */
>     METHOD_HEAD,                /* 100 */
>     METHOD_CONNECT,             /* 101 */
>     METHOD_TRACE,               /* 110 */
>     METHOD_PURGE,               /* 111 */
>     METHOD_OPTIONS,
>     METHOD_DELETE,              /* RFC2616 section 9.7 */
>     METHOD_PROPFIND,
>     METHOD_PROPPATCH,
>     METHOD_MKCOL,
>     METHOD_COPY,
>     METHOD_MOVE,
>     METHOD_LOCK,
>     METHOD_UNLOCK,
>     METHOD_BMOVE,
>     METHOD_BDELETE,
>     METHOD_BPROPFIND,
>     METHOD_EXT00,
>     METHOD_EXT01,
>     METHOD_EXT02,
>     METHOD_EXT03,
>     METHOD_EXT04,
>     METHOD_EXT05,
>     METHOD_EXT06,
>     METHOD_EXT07,
>     METHOD_EXT08,
>     METHOD_EXT09,
>     METHOD_EXT10,
>     METHOD_EXT11,
>     METHOD_EXT12,
>     METHOD_EXT13,
>     METHOD_EXT14,
>     METHOD_EXT15,
>     METHOD_EXT16,
>     METHOD_EXT17,
>     METHOD_EXT18,
>     METHOD_EXT19,
>     METHOD_SEARCH, /* Added this line to accomodate Microsoft Exchange
> 2000 Outlook Web Access*/
>     METHOD_ENUM_END
> };
> 
> -----Original Message-----
> From: Robert Collins [mailto:robert.collins@itdomain.com.au]
> Sent: Friday, 24 November 2000 12:43
> To: Timothy L. Minahan
> Subject: RE: [SQU] Squid and Exchange Outlook Web Access
> 
> You're not being a pain :]
> 
> How did you fix it?
> 
> Rob
> 
> > -----Original Message-----
> > From: Timothy L. Minahan [mailto:sysop@scc.edu.au]
> > Sent: Friday, 24 November 2000 12:30 PM
> > To: Robert Collins
> > Subject: RE: [SQU] Squid and Exchange Outlook Web Access
> >
> >
> > Thanks Robert,
> > Fixed sorry to be a pain
> > Timothy
> >
> > -----Original Message-----
> > From: Robert Collins [mailto:robert.collins@itdomain.com.au]
> > Sent: Friday, 24 November 2000 10:14
> > To: Timothy L. Minahan; Squid-Users@Ircache. Net (E-mail)
> > Subject: Re: [SQU] Squid and Exchange Outlook Web Access
> >
> >
> > Timothy, you are running into a MS
> > lets-use-this-before-industry-acceptance-occurs.
> >
> > SEARCH is one of the WEBDAV nethods, see the squid mailing
> > list archives
> > for
> > (at least one) previous threads on it.
> >
> > http://www.webdav.org/dasl/protocol/draft-dasl-protocol-00.html
> >
> > Rob
> >
> 
> --
> To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Sat Dec 16 2000 - 13:07:47 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:57:00 MST