X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=src%2Fhttp_command.c;h=edaad36715ba40b25cc538feabd50d28450c3c63;hb=5bbb418c0649c0cf2b289c0899581b42c5a4385d;hp=f736b38b6af8632b54ff80ef4fa531b2a0e9e8e9;hpb=ef0a61b93862f0bbb99b88f2d4460ad75509c814;p=pazpar2-moved-to-github.git diff --git a/src/http_command.c b/src/http_command.c index f736b38..edaad36 100644 --- a/src/http_command.c +++ b/src/http_command.c @@ -888,7 +888,8 @@ static void cmd_record(struct http_channel *c) int i; struct record*r = rec->records; int binary = 0; - + const char *nativesyntax = http_argbyname(rq, "nativesyntax"); + if (binarystr && *binarystr != '0') binary = 1; @@ -903,13 +904,14 @@ static void cmd_record(struct http_channel *c) http_channel_observer_t obs = http_add_observer(c, r->client, show_raw_reset); int ret = client_show_raw_begin(r->client, r->position, - syntax, esn, - obs /* data */, - show_raw_record_error, - (binary ? - show_raw_record_ok_binary : - show_raw_record_ok), - (binary ? 1 : 0)); + syntax, esn, + obs /* data */, + show_raw_record_error, + (binary ? + show_raw_record_ok_binary : + show_raw_record_ok), + (binary ? 1 : 0), + nativesyntax); if (ret == -1) { http_remove_observer(obs); @@ -1085,7 +1087,8 @@ static void cmd_show(struct http_channel *c) { // if there is already a watch/block. we do not block this one if (session_set_watch(s->psession, SESSION_WATCH_SHOW, - show_records_ready, c, c) != 0) + show_records_ready, c, c) != 0 + ) { yaz_log(YLOG_WARN, "Attempt to block multiple times on show block. Not supported!"); error(rs, PAZPAR2_ALREADY_BLOCKED, "show");