current acconfig.h, 1.47, 1.48 cgisimple.c, 1.147, 1.148 configure.in, 1.207, 1.208 filters.c, 1.203, 1.204
Fabian Keil <[email protected]> Wed, 08 Mar 2017 13:13:20 +0000
| Newsgroups | gmane.comp.web.privoxy.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ijbswa/current
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12273
Modified Files:
acconfig.h cgisimple.c configure.in filters.c
Log Message:
Ditch FEATURE_IMAGE_DETECT_MSIE
It's an obsolete workaround we inherited from Junkbuster
and was already disabled by default.
Users that feel the urge to work around issues with
image requests coming from an Internet Explorer version
from more than 15 years ago can still do this using tags.
Index: acconfig.h
===================================================================
RCS file: /cvsroot/ijbswa/current/acconfig.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** acconfig.h 2 Jun 2014 06:22:20 -0000 1.47
--- acconfig.h 8 Mar 2017 13:13:18 -0000 1.48
***************
*** 110,151 ****
* Allow blocking using images as well as HTML.
* If you do not define this then everything is blocked as HTML.
- *
- * Note that this is required if you want to use FEATURE_IMAGE_DETECT_MSIE.
*/
#undef FEATURE_IMAGE_BLOCKING
/*
- * Detect image requests automatically for MSIE. Will fall back to
- * other image-detection methods (i.e. "+image" permission) for other
- * browsers.
- *
- * You must also define FEATURE_IMAGE_BLOCKING to use this feature.
- *
- * It detects the following header pair as an image request:
- *
- * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
- * Accept: * / *
- *
- * And the following as a HTML request:
- *
- * User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
- * Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, * / *
- *
- * And no, I haven't got that backwards - IE is being weird.
- *
- * Known limitations:
- * 1) If you press shift-reload on a blocked HTML page, you get
- * the image "blocked" page, not the HTML "blocked" page.
- * 2) Once an image "blocked" page has been sent, viewing it
- * in it's own browser window *should* bring up the HTML
- * "blocked" page, but it doesn't. You need to clear the
- * browser cache to get the HTML version again.
- *
- * These limitations are due to IE making inconsistent choices
- * about which "Accept:" header to send.
- */
- #undef FEATURE_IMAGE_DETECT_MSIE
-
- /*
* Use PNG instead of GIF for built-in images
*/
--- 110,117 ----
Index: cgisimple.c
===================================================================
RCS file: /cvsroot/ijbswa/current/cgisimple.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -C2 -d -r1.147 -r1.148
*** cgisimple.c 20 Feb 2017 13:47:04 -0000 1.147
--- cgisimple.c 8 Mar 2017 13:13:18 -0000 1.148
***************
*** 1875,1886 ****
},
{
- "FEATURE_IMAGE_DETECT_MSIE",
- #ifdef FEATURE_IMAGE_DETECT_MSIE
- 1,
- #else
- 0,
- #endif
- },
- {
"FEATURE_IPV6_SUPPORT",
#ifdef HAVE_RFC2553
--- 1875,1878 ----
Index: filters.c
===================================================================
RCS file: /cvsroot/ijbswa/current/filters.c,v
retrieving revision 1.203
retrieving revision 1.204
diff -C2 -d -r1.203 -r1.204
*** filters.c 24 Dec 2016 16:00:49 -0000 1.203
--- filters.c 8 Mar 2017 13:13:18 -0000 1.204
***************
*** 1328,1341 ****
* Function : is_imageurl
*
! * Description : Given a URL, decide whether it is an image or not,
! * using either the info from a previous +image action
! * or, #ifdef FEATURE_IMAGE_DETECT_MSIE, and the browser
! * is MSIE and not on a Mac, tell from the browser's accept
! * header.
*
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
*
! * Returns : True (nonzero) if URL is an image, false (0)
* otherwise
*
--- 1328,1338 ----
* Function : is_imageurl
*
! * Description : Given a URL, decide whether it should be treated
! * as image URL or not.
*
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
*
! * Returns : True (nonzero) if URL is an image URL, false (0)
* otherwise
*
***************
*** 1343,1367 ****
int is_imageurl(const struct client_state *csp)
{
- #ifdef FEATURE_IMAGE_DETECT_MSIE
- char *tmp;
-
- tmp = get_header_value(csp->headers, "User-Agent:");
- if (tmp && strstr(tmp, "MSIE") && !strstr(tmp, "Mac_"))
- {
- tmp = get_header_value(csp->headers, "Accept:");
- if (tmp && strstr(tmp, "image/gif"))
- {
- /* Client will accept HTML. If this seems counterintuitive,
- * blame Microsoft.
- */
- return(0);
- }
- else
- {
- return(1);
- }
- }
- #endif /* def FEATURE_IMAGE_DETECT_MSIE */
-
return ((csp->action->flags & ACTION_IMAGE) != 0);
--- 1340,1343 ----
Index: configure.in
===================================================================
RCS file: /cvsroot/ijbswa/current/configure.in,v
retrieving revision 1.207
retrieving revision 1.208
diff -C2 -d -r1.207 -r1.208
*** configure.in 24 Dec 2016 16:00:49 -0000 1.207
--- configure.in 8 Mar 2017 13:13:18 -0000 1.208
***************
*** 932,942 ****
fi],AC_DEFINE(FEATURE_STATISTICS))
- AC_ARG_ENABLE(ie-images,
- [ --enable-ie-images Enable a quick but not always reliable auto-detect whether requests from
- MS Internet Explorer are for an image or not.],
- [if test $enableval = yes; then
- AC_DEFINE(FEATURE_IMAGE_DETECT_MSIE)
- fi],)
-
AC_ARG_ENABLE(image-blocking,
[ --disable-image-blocking Don't try to figure out whether a request is
--- 932,935 ----
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford