summaryrefslogtreecommitdiff
path: root/src/raptor_parse.c
diff options
context:
space:
mode:
authorNicholas J Humfrey <njh@aelius.com>2010-04-04 13:57:40 +0100
committerNicholas J Humfrey <njh@aelius.com>2010-04-04 13:57:40 +0100
commit7564384d81ba5fb2216f5206f90d94f206f22d60 (patch)
tree45d049bcb54d92a9f86944fcd4da10c6a4943e8d /src/raptor_parse.c
parenta4a439bdbbd3a2d119751665a778504b83098fc7 (diff)
downloadraptor-7564384d81ba5fb2216f5206f90d94f206f22d60.tar.gz
Removed whitespace from "*/*;q = 0.1" which isn't allowed by RFC2616 Section 14.1.
Diffstat (limited to 'src/raptor_parse.c')
-rw-r--r--src/raptor_parse.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/raptor_parse.c b/src/raptor_parse.c
index 84e498bc..19e0bf74 100644
--- a/src/raptor_parse.c
+++ b/src/raptor_parse.c
@@ -1585,7 +1585,7 @@ raptor_parser_get_accept_header(raptor_parser* rdf_parser)
i++) {
len += type_q->mime_type_len + 2; /* ", " */
if(type_q->q < 10)
- len += 6; /* ";q = X.Y" */
+ len += 6; /* ";q=X.Y" */
}
/* 9 = strlen("\*\/\*;q=0.1") */
@@ -1640,12 +1640,13 @@ raptor_parser_get_accept_header_all(raptor_world* world)
j++) {
len += type_q->mime_type_len + 2; /* ", " */
if(type_q->q < 10)
- len += 6; /* ";q = X.Y" */
+ len += 6; /* ";q=X.Y" */
}
}
- /* 11 = strlen("\*\/\*;q = 0.1") */
- accept_header = (char*)RAPTOR_MALLOC(cstring, len + 11 + 1);
+ /* 9 = strlen("\*\/\*;q=0.1") */
+#define ACCEPT_HEADER_LEN 9
+ accept_header = (char*)RAPTOR_MALLOC(cstring, len + ACCEPT_HEADER_LEN + 1);
if(!accept_header)
return NULL;
@@ -1676,7 +1677,7 @@ raptor_parser_get_accept_header_all(raptor_world* world)
}
- strncpy(p, "*/*;q = 0.1", 11 + 1);
+ strncpy(p, "*/*;q=0.1", ACCEPT_HEADER_LEN + 1);
return accept_header;
}