wait a second between stop and start in the restart command. This avoid
[pazpar2-moved-to-github.git] / src / http.c
index 9bee65d..62233b2 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Pazpar2.
-   Copyright (C) 2006-2008 Index Data
+   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
@@ -794,7 +794,8 @@ static int http_proxy(struct http_request *rq)
         hp = http_header_append(c, hp, 
                                 "X-Pazpar2-Server-Port", server_port);
         sprintf(server_via,  "1.1 %s:%s (%s/%s)",  
-                ser->host, server_port, PACKAGE_NAME, PACKAGE_VERSION);
+                ser->host ? ser->host : "@",
+                server_port, PACKAGE_NAME, PACKAGE_VERSION);
         hp = http_header_append(c, hp, "Via" , server_via);
         hp = http_header_append(c, hp, "X-Forwarded-For", c->addr);
     }
@@ -1294,7 +1295,9 @@ void http_observer_set_data2(http_channel_observer_t obs, void *data2)
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab
  */
+