X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fhttp_command.c;h=edaad36715ba40b25cc538feabd50d28450c3c63;hb=d537f965b52fc9f6b914117e8ad67635ac36fc4c;hp=28099899f5c47141539ec84cc3edfb13c6663c3d;hpb=bdc596b751ee8f5fba1668afffb98af36e0ea0e7;p=pazpar2-moved-to-github.git diff --git a/src/http_command.c b/src/http_command.c index 2809989..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); @@ -1035,8 +1037,6 @@ static void show_records_ready(void *data) show_records(c, -1); } -int show_count = 0; - static void cmd_show(struct http_channel *c) { struct http_request *rq = c->request; @@ -1088,7 +1088,6 @@ 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_count % 6 == 0) ) { yaz_log(YLOG_WARN, "Attempt to block multiple times on show block. Not supported!");