Re: processing of ICAP Transfer-Ignore options

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Sun, 15 Apr 2012 19:33:22 +0200

lör 2012-04-14 klockan 19:11 -0600 skrev Alex Rousskov:

> Sure, I am just trying to find a way to improve compatibility of ICAP
> agents, even though the ICAP protocol itself is using wrong concepts
> when defining what was meant as a pretty useful feature.

I'd propose the following algorithm:

1. Look up content-type in the mime table and deduce file extension from
there unless the content-type is application/octet-stream. Limited to
mime table expressions on the form \.ext$ where ext do not contain any
special regex patterns.

2. For application/octet-stream or when the file extension is otherwise
uncertain, identify the filename and derive file extension from there,
in priority order

 a) Content-Disposition filename parameter

 b) URL-path

 c) Last part of query parameters

With some handwaving and juggling to determine priority of b & c...

Regards
Henrik
Received on Sun Apr 15 2012 - 17:33:39 MDT

This archive was generated by hypermail 2.2.0 : Mon Apr 16 2012 - 12:00:09 MDT