summaryrefslogtreecommitdiffstats
path: root/src/restRequest.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/restRequest.py')
-rw-r--r--src/restRequest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/restRequest.py b/src/restRequest.py
index 61d64c6..b14ad20 100644
--- a/src/restRequest.py
+++ b/src/restRequest.py
@@ -35,6 +35,7 @@ class restRequest:
self.id = None
self.echo = None
self.code = None
+ self.seq = None
def parser(self,data):
self.request_line, self.headers_alone = data.split('\n', 1)
@@ -49,6 +50,10 @@ class restRequest:
if 'Content-Length' in self.headers.keys():
self.content_len = int(self.headers['Content-Length'])
+ if 'X-Sequence' in self.headers.keys():
+ self.seq = int(self.headers['X-Sequence'])
+ logging.debug(f'Request with sequence number {self.seq}')
+
if (not self.request_line == None or not self.request_line == ''):
self.method = self.request_line.split('/', 1)[0]
self.URI = self.request_line.split('/', 1)[1]