Skip to content

Commit 66decad

Browse files
namedgraphclaude
andcommitted
Fix gzip RDF/XML test: create item and append data instead of testing root container
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1da256c commit 66decad

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

http-tests/misc/gzip-rdfxml.sh

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,39 @@ purge_cache "$END_USER_VARNISH_SERVICE"
77
purge_cache "$ADMIN_VARNISH_SERVICE"
88
purge_cache "$FRONTEND_VARNISH_SERVICE"
99

10-
# Test that nginx gzip compression is active for RDF/XML dynamic content
10+
# Test that nginx gzip compression is active for RDF/XML dynamic content.
11+
# Create an item, append enough data to exceed gzip_min_length, then retrieve it as RDF/XML.
12+
13+
add-agent-to-group.sh \
14+
-f "$OWNER_CERT_FILE" \
15+
-p "$OWNER_CERT_PWD" \
16+
--agent "$AGENT_URI" \
17+
"${ADMIN_BASE_URL}acl/groups/writers/"
18+
19+
item=$(create-item.sh \
20+
-f "$AGENT_CERT_FILE" \
21+
-p "$AGENT_CERT_PWD" \
22+
-b "$END_USER_BASE_URL" \
23+
--title "Gzip test item" \
24+
--slug "gzip-test" \
25+
--container "$END_USER_BASE_URL")
26+
27+
printf '@prefix ex: <http://example.org/> .\n
28+
<> ex:prop1 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore." ;\n
29+
ex:prop2 "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo." ;\n
30+
ex:prop3 "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." ;\n
31+
ex:prop4 "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est." .\n' \
32+
| post.sh \
33+
-f "$AGENT_CERT_FILE" \
34+
-p "$AGENT_CERT_PWD" \
35+
-t "text/turtle" \
36+
"$item"
1137

1238
response=$(curl -k -s -D - -o /dev/null \
1339
-H "Accept-Encoding: gzip" \
1440
-H "Accept: application/rdf+xml" \
15-
--cert "$OWNER_CERT_FILE:$OWNER_CERT_PWD" \
16-
"$END_USER_BASE_URL")
41+
-E "$AGENT_CERT_FILE":"$AGENT_CERT_PWD" \
42+
"$item")
1743

1844
if ! echo "$response" | grep -qi "Content-Encoding: gzip"; then
1945
echo "Content-Encoding: gzip not found on RDF/XML response"

0 commit comments

Comments
 (0)