Index: include/libroar/vio_dstr.h
===================================================================
--- include/libroar/vio_dstr.h	(revision 5253)
+++ include/libroar/vio_dstr.h	(revision 5254)
@@ -181,6 +181,6 @@
 };
 
-int     roar_vio_dstr_get_type(char * str);
-char *  roar_vio_dstr_get_name(int type);
+int           roar_vio_dstr_get_type(const char * str);
+const char *  roar_vio_dstr_get_name(const int type);
 
 int     roar_vio_dstr_register_type(int   type,
Index: include/libroar/vio_proto.h
===================================================================
--- include/libroar/vio_proto.h	(revision 4843)
+++ include/libroar/vio_proto.h	(revision 5254)
@@ -63,5 +63,5 @@
 
 int roar_vio_open_proto      (struct roar_vio_calls * calls, struct roar_vio_calls * dst,
-                              char * dstr, int proto, struct roar_vio_defaults * odef);
+                              const char * dstr, int proto, struct roar_vio_defaults * odef);
 
 ssize_t roar_vio_proto_read    (struct roar_vio_calls * vio, void *buf, size_t count);
@@ -73,6 +73,6 @@
 int     roar_vio_proto_close   (struct roar_vio_calls * vio);
 
-int roar_vio_open_proto_http   (struct roar_vio_calls * calls, struct roar_vio_calls * dst, char * host, char * file, struct roar_userpass * up);
-int roar_vio_open_proto_gopher (struct roar_vio_calls * calls, struct roar_vio_calls * dst, char * host, char * file);
+int roar_vio_open_proto_http   (struct roar_vio_calls * calls, struct roar_vio_calls * dst, const char * host, const char * file, struct roar_userpass * up);
+int roar_vio_open_proto_gopher (struct roar_vio_calls * calls, struct roar_vio_calls * dst, const char * host, const char * file);
 #endif
 
Index: libroar/vio_dstr.c
===================================================================
--- libroar/vio_dstr.c	(revision 5253)
+++ libroar/vio_dstr.c	(revision 5254)
@@ -38,6 +38,6 @@
 #ifndef ROAR_WITHOUT_VIO_DSTR
 struct _roar_vio_dstr_type {
- int    id;
- char * name;
+ const int    id;
+ const char * name;
  int (* setdef) (struct roar_vio_dstr_chain * cur,   struct roar_vio_dstr_chain * next);
  int (* openvio)(struct roar_vio_calls      * calls, struct roar_vio_calls      * dst, struct roar_vio_dstr_chain * cur);
@@ -225,5 +225,5 @@
 };
 
-int     roar_vio_dstr_get_type(char * str) {
+int     roar_vio_dstr_get_type(const char * str) {
  int i;
 
@@ -247,5 +247,5 @@
 }
 
-char *  roar_vio_dstr_get_name(int type) {
+const char *  roar_vio_dstr_get_name(const int type) {
  struct _roar_vio_dstr_type * ret;
 
Index: libroar/vio_proto.c
===================================================================
--- libroar/vio_proto.c	(revision 5028)
+++ libroar/vio_proto.c	(revision 5254)
@@ -94,9 +94,9 @@
 
 int roar_vio_open_proto      (struct roar_vio_calls * calls, struct roar_vio_calls * dst,
-                              char * dstr, int proto, struct roar_vio_defaults * odef) {
+                              const char * dstr, int proto, struct roar_vio_defaults * odef) {
 #ifndef ROAR_WITHOUT_VIO_PROTO
  struct roar_userpass userpass = {.subtype = -1, .user = NULL, .pass = NULL};
  struct roar_vio_proto * self;
- char * host;
+ const char * host;
  char * tmp;
 
@@ -157,5 +157,5 @@
 
  if ( (tmp = strstr(host, "@")) != NULL ) {
-  userpass.user = host;
+  userpass.user = (char*)host;
   *tmp = 0;
   host = tmp + 1;
@@ -481,5 +481,5 @@
 }
 
-int roar_vio_open_proto_http   (struct roar_vio_calls * calls, struct roar_vio_calls * dst, char * host, char * file, struct roar_userpass * up) {
+int roar_vio_open_proto_http   (struct roar_vio_calls * calls, struct roar_vio_calls * dst, const char * host, const char * file, struct roar_userpass * up) {
  struct roar_keyval kv;
  struct roar_vio_proto * self;
@@ -607,6 +607,9 @@
 
  if ( bufbuf != NULL ) {
-  roar_buffer_set_offset(bufbuf, endofheader - buf + oeflen);
-  roar_buffer_set_len(bufbuf,    len - (endofheader - buf + oeflen) - 0 /* ??? */);
+  if ( roar_buffer_set_offset(bufbuf, endofheader - buf + oeflen) == -1 ||
+       roar_buffer_set_len(bufbuf,    len - (endofheader - buf + oeflen) - 0 /* ??? */) == -1 ) {
+   // TODO: FIXME: handle this in a better way.
+   ROAR_ERR("roar_vio_open_proto_http(*): Can not set data area of buffer %p, VERY BAD.", bufbuf);
+  }
  }
  self->reader.buffer = bufbuf;
@@ -625,5 +628,5 @@
 }
 
-int roar_vio_open_proto_gopher (struct roar_vio_calls * calls, struct roar_vio_calls * dst, char * host, char * file) {
+int roar_vio_open_proto_gopher (struct roar_vio_calls * calls, struct roar_vio_calls * dst, const char * host, const char * file) {
  struct roar_vio_proto * self;
  char type;
