summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2020-10-25 19:12:37 -0700
committerDave Beckett <dave@dajobe.org>2020-10-25 19:12:37 -0700
commit3df59dd9a8b3982d6c257266738b7fc3e0b311ea (patch)
tree90a7fdc17cccaf959df60916e62b93d85f6004c6
parentf736d23996c3f279c02448985039850e3342c710 (diff)
downloadraptor-3df59dd9a8b3982d6c257266738b7fc3e0b311ea.tar.gz
Remove callers of deprecated raptor_www setters
-rw-r--r--src/raptor_grddl.c10
-rw-r--r--src/raptor_parse.c10
-rw-r--r--src/raptor_www_test.c2
3 files changed, 15 insertions, 7 deletions
diff --git a/src/raptor_grddl.c b/src/raptor_grddl.c
index 01dfb78f..f419164b 100644
--- a/src/raptor_grddl.c
+++ b/src/raptor_grddl.c
@@ -926,15 +926,19 @@ raptor_grddl_fetch_uri(raptor_parser* rdf_parser,
if(!www)
return 1;
- raptor_www_set_user_agent(www, "grddl/0.1");
+ if(raptor_www_set_user_agent2(www, "grddl/0.1", 0))
+ return 1;
if(flags & FETCH_ACCEPT_XSLT) {
- raptor_www_set_http_accept(www, "application/xml");
+ if(raptor_www_set_http_accept2(www, "application/xml", 0))
+ return 1;
} else {
accept_h = raptor_parser_get_accept_header(rdf_parser);
if(accept_h) {
- raptor_www_set_http_accept(www, accept_h);
+ ret = raptor_www_set_http_accept2(www, accept_h, 0);
RAPTOR_FREE(char*, accept_h);
+ if(ret)
+ return 1;
}
}
if(rdf_parser->uri_filter)
diff --git a/src/raptor_parse.c b/src/raptor_parse.c
index 95ab2ac4..9bc0a39a 100644
--- a/src/raptor_parse.c
+++ b/src/raptor_parse.c
@@ -758,8 +758,10 @@ raptor_parser_parse_uri_with_connection(raptor_parser* rdf_parser,
accept_h = raptor_parser_get_accept_header(rdf_parser);
if(accept_h) {
- raptor_www_set_http_accept2(rdf_parser->www, accept_h, 0);
+ ret = raptor_www_set_http_accept2(rdf_parser->www, accept_h, 0);
RAPTOR_FREE(char*, accept_h);
+ if(ret)
+ return 1;
}
}
@@ -788,8 +790,10 @@ raptor_parser_parse_uri_with_connection(raptor_parser* rdf_parser,
RAPTOR_OPTION_WWW_HTTP_CACHE_CONTROL));
ua = RAPTOR_OPTIONS_GET_STRING(rdf_parser, RAPTOR_OPTION_WWW_HTTP_USER_AGENT);
- if(ua)
- raptor_www_set_user_agent2(rdf_parser->www, ua, 0);
+ if(ua) {
+ if(raptor_www_set_user_agent2(rdf_parser->www, ua, 0))
+ return 1;
+ }
cert_filename = RAPTOR_OPTIONS_GET_STRING(rdf_parser,
RAPTOR_OPTION_WWW_CERT_FILENAME);
diff --git a/src/raptor_www_test.c b/src/raptor_www_test.c
index 08833723..060626fe 100644
--- a/src/raptor_www_test.c
+++ b/src/raptor_www_test.c
@@ -76,7 +76,7 @@ int main (int argc, char *argv[])
www = raptor_new_www(world);
raptor_www_set_content_type_handler(www, write_content_type, (void*)stderr);
- raptor_www_set_user_agent(www, user_agent);
+ raptor_www_set_user_agent2(www, user_agent, 0);
/* start retrieval (always a GET) */