Skip to content

Commit

Permalink
Updates pack_uwsgi_vars
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tomdottom committed May 30, 2018
1 parent f5faed6 commit 4ef593a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions uwsgi_tools/uwsgi_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_ = [
Expand Down

0 comments on commit 4ef593a

Please sign in to comment.