AM_CFLAGS = $(YAZINC)
libpazpar2_a_SOURCES = pazpar2_config.c pazpar2_config.h eventl.c eventl.h \
- http.c http_command.c http_command.h http.h \
+ http.c http_command.c http.h \
logic.c pazpar2.h \
record.h record.c reclists.c reclists.h \
relevance.c relevance.h termlists.c termlists.h \
#include "eventl.h"
#include "pazpar2.h"
#include "http.h"
-#include "http_command.h"
#define MAX_HTTP_HEADER 4096
r->headers = h;
}
-char *http_argbyname(struct http_request *r, char *name)
+const char *http_argbyname(struct http_request *r, const char *name)
{
struct http_argument *p;
if (!name)
return 0;
}
-char *http_headerbyname(struct http_header *h, char *name)
+const char *http_headerbyname(struct http_header *h, const char *name)
{
for (; h; h = h->next)
if (!strcmp(h->name, name))
struct http_header * hp,
const char *name,
const char *value);
-char *http_argbyname(struct http_request *r, char *name);
-char *http_headerbyname(struct http_header *r, char *name);
+const char *http_argbyname(struct http_request *r, const char *name);
+const char *http_headerbyname(struct http_header *r, const char *name);
struct http_response *http_create_response(struct http_channel *c);
void http_send_response(struct http_channel *c);
void urlencode(const char *i, char *o);
void http_remove_observer(http_channel_observer_t obs);
struct http_channel *http_channel_observer_chan(http_channel_observer_t obs);
+
+void http_command(struct http_channel *c);
+
#endif
/*
#include "eventl.h"
#include "pazpar2.h"
#include "http.h"
-#include "http_command.h"
#include "settings.h"
#include "client.h"
static struct http_session *locate_session(struct http_request *rq, struct http_response *rs)
{
struct http_session *p;
- char *session = http_argbyname(rq, "session");
+ const char *session = http_argbyname(rq, "session");
unsigned int id;
if (!session)
struct termlist_score **p;
int len;
int i;
- char *name = http_argbyname(rq, "name");
- char *nums = http_argbyname(rq, "num");
+ const char *name = http_argbyname(rq, "name");
+ const char *nums = http_argbyname(rq, "num");
int num = 15;
int status;
while (*name)
{
char tname[256];
- char *tp;
+ const char *tp;
if (!(tp = strchr(name, ',')))
tp = name + strlen(name);
struct http_session *s = locate_session(rq, rs);
struct record_cluster **rl;
struct reclist_sortparms *sp;
- char *start = http_argbyname(rq, "start");
- char *num = http_argbyname(rq, "num");
- char *sort = http_argbyname(rq, "sort");
+ const char *start = http_argbyname(rq, "start");
+ const char *num = http_argbyname(rq, "num");
+ const char *sort = http_argbyname(rq, "sort");
int startn = 0;
int numn = 20;
int total;
struct http_request *rq = c->request;
struct http_response *rs = c->response;
struct http_session *s = locate_session(rq, rs);
- char *block = http_argbyname(rq, "block");
+ const char *block = http_argbyname(rq, "block");
int status;
if (!s)
struct http_request *rq = c->request;
struct http_response *rs = c->response;
struct http_session *s = locate_session(rq, rs);
- char *query = http_argbyname(rq, "query");
- char *filter = http_argbyname(rq, "filter");
+ const char *query = http_argbyname(rq, "query");
+ const char *filter = http_argbyname(rq, "filter");
enum pazpar2_error_code code;
const char *addinfo = 0;
void http_command(struct http_channel *c)
{
- char *command = http_argbyname(c->request, "command");
+ const char *command = http_argbyname(c->request, "command");
struct http_response *rs = http_create_response(c);
int i;
+++ /dev/null
-/* This file is part of Pazpar2.
- Copyright (C) 2006-2009 Index Data
-
-Pazpar2 is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
-version.
-
-Pazpar2 is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-*/
-
-#ifndef HTTP_COMMAND_H
-#define HTTP_COMMAND
-
-#include "http.h"
-
-void http_command(struct http_channel *c);
-
-#endif
}
enum pazpar2_error_code search(struct session *se,
- char *query, char *filter,
+ const char *query, const char *filter,
const char **addinfo)
{
int live_channels = 0;
void session_init_databases(struct session *s);
int load_targets(struct session *s, const char *fn);
void statistics(struct session *s, struct statistics *stat);
-enum pazpar2_error_code search(struct session *s, char *query,
- char *filter, const char **addinfo);
+enum pazpar2_error_code search(struct session *s, const char *query,
+ const char *filter, const char **addinfo);
struct record_cluster **show(struct session *s, struct reclist_sortparms *sp, int start,
int *num, int *total, int *sumhits, NMEM nmem_show);
struct record_cluster *show_single(struct session *s, const char *id,