From 4f73f38bae3892fa4f6b3980c5724af521a31fde Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 1 Nov 2016 16:03:50 -0400 Subject: [PATCH] LP#1612771: update protocol documentation Now that we have PARTIAL and NOCONTENT statuses, let's mention them in the documentation for the benefit of folks writing future clients. Signed-off-by: Galen Charlton --- doc/OpenSRF-Messaging-Protocol.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/OpenSRF-Messaging-Protocol.html b/doc/OpenSRF-Messaging-Protocol.html index 1eeff04c..590f1364 100644 --- a/doc/OpenSRF-Messaging-Protocol.html +++ b/doc/OpenSRF-Messaging-Protocol.html @@ -38,7 +38,9 @@
 		100	STATUS_CONTINUE
 		200	STATUS_OK	
+		204	STATUS_NOCONTENT
 		205	STATUS_COMPLETE
+		206	STATUS_PARTIAL
 		307	STATUS_REDIRECTED
 		400	STATUS_BADREQUEST
 		404	STATUS_NOTFOUND
@@ -137,7 +139,13 @@ while ( more requests ) {
 				the request is now complete, nothing more to be done with this request
 				break out of loop
 	
-		if ( response.typ == RESULT )
+		if ( response.type == RESULT )
+
+			if    ( response.statusCode == STATUS_PARTIAL )
+				add response chunk to buffer
+				continue receiving response chunks
+			elsif ( response.statusCode == STATUS_NOCONTENT )
+				have whole response, use buffer as result
 
 			pass result to the application layer for processing
 
-- 
2.43.2