From 4ef593a05fb0a813d1c1a507409af71b1734594b Mon Sep 17 00:00:00 2001 From: Tom Marks Date: Thu, 24 May 2018 17:35:29 -0400 Subject: [PATCH] Updates pack_uwsgi_vars Old packing of uwsgi vars seemed a little bit like magic and was hard to understand at least for mere mortals like myself. Created a pair of C Structures using definitions on uwsgi site and a helper function to convert to bytes. --- uwsgi_tools/uwsgi_structs.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/uwsgi_tools/uwsgi_structs.py b/uwsgi_tools/uwsgi_structs.py index 9b54375..b9adeaf 100644 --- a/uwsgi_tools/uwsgi_structs.py +++ b/uwsgi_tools/uwsgi_structs.py @@ -8,11 +8,19 @@ class UwsgiPacketHeader(ctypes.Structure): """ +<<<<<<< HEAD struct uwsgi_packet_header { uint8_t modifier1; uint16_t datasize; uint8_t modifier2; } +======= + struct uwsgi_packet_header { + uint8_t modifier1; + uint16_t datasize; + uint8_t modifier2; + }; +>>>>>>> Updates pack_uwsgi_vars """ _pack_ = 1 _fields_ = [