projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5c357b
)
Fix Host header for SRU/SRW - bug #3069
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 19 Oct 2009 14:50:57 +0000
(16:50 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 19 Oct 2009 14:50:57 +0000
(16:50 +0200)
src/connection.c
patch
|
blob
|
history
diff --git
a/src/connection.c
b/src/connection.c
index
7b0a027
..
7496a1c
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-346,7
+346,6
@@
static int connection_connect(struct connection *con)
const char *auth;
const char *sru;
const char *sru_version = 0;
const char *auth;
const char *sru;
const char *sru_version = 0;
- char ipport[512] = "";
struct session_database *sdb = client_get_database(con->client);
const char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY);
struct session_database *sdb = client_get_database(con->client);
const char *zproxy = session_setting_oneval(sdb, PZ_ZPROXY);
@@
-382,10
+381,14
@@
static int connection_connect(struct connection *con)
}
if (sru && *sru)
}
if (sru && *sru)
- strcpy(ipport, "http://");
- strcat(ipport, host->ipport);
-
- ZOOM_connection_connect(link, ipport, 0);
+ {
+ char http_hostport[512];
+ strcpy(http_hostport, "http://");
+ strcat(http_hostport, host->hostport);
+ ZOOM_connection_connect(link, http_hostport, 0);
+ }
+ else
+ ZOOM_connection_connect(link, host->ipport, 0);
con->link = link;
con->iochan = iochan_create(0, connection_handler, 0);
con->link = link;
con->iochan = iochan_create(0, connection_handler, 0);