projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
989855b
)
Rename a couple of variables in get_last_url()
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 30 Oct 2011 16:22:46 +0000
(16:22 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 30 Oct 2011 16:22:46 +0000
(16:22 +0000)
filters.c
patch
|
blob
|
history
diff --git
a/filters.c
b/filters.c
index
4de7c90
..
adcea9a
100644
(file)
--- a/
filters.c
+++ b/
filters.c
@@
-1,4
+1,4
@@
-const char filters_rcs[] = "$Id: filters.c,v 1.15
2 2011/10/30 16:18
:12 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.15
3 2011/10/30 16:20
:12 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
@@
-1135,15
+1135,15
@@
char *get_last_url(char *subject, const char *redirect_mode)
log_error(LOG_LEVEL_ERROR, "Unable to decode \"%s\".", token);
continue;
}
log_error(LOG_LEVEL_ERROR, "Unable to decode \"%s\".", token);
continue;
}
- char *h
1
= strstr(dtoken, "http://");
- char *h
2
= strstr(dtoken, "https://");
- char *
h = (h1 && h2
-
? (h1 < h2 ? h1 : h2
)
-
: (h1 ? h1 : h2
));
- if (
h
)
+ char *h
ttp_url
= strstr(dtoken, "http://");
+ char *h
ttps_url
= strstr(dtoken, "https://");
+ char *
last_url = (http_url && https_url
+
? (http_url < https_url ? http_url : https_url
)
+
: (http_url ? http_url : https_url
));
+ if (
last_url
)
{
freez(found);
{
freez(found);
- found = strdup(
h
);
+ found = strdup(
last_url
);
if (found == NULL)
{
log_error(LOG_LEVEL_ERROR,
if (found == NULL)
{
log_error(LOG_LEVEL_ERROR,