Thursday, 2024-12-12

amorinfrickler I did try to run tox with the env just like you pasted yes13:11
amorinas itamarst said, I dont believe it's what I need anyway.13:12
ralonsohhi folks, I'm trying to decode a request from a socket (I'm in the middle of the migration of the metadata proxy)14:56
ralonsohso the point is that I receive something so "beautiful" like this14:57
ralonsohhttps://paste.opendev.org/show/bltHaZrv97ZBOTJuttUF/14:57
ralonsohwhat library can I use to decode this in an easy way?14:57
ralonsohhberaud[m], ^15:26
fricklerralonsoh: that looks like a plain str to me, not sure what you want to decode there? expand the newlines? then just use print()?15:40
ralonsohyeah, well, this is what I received in the socket file15:40
ralonsohwhat I need is something to parse this15:40
ralonsohbetter than doing this manually15:40
fricklerah, so convert to a dict or similar?15:41
ralonsohwell, more than this15:42
ralonsohsomething that takes this text and returns a request object15:42
ralonsohwith the headers and all this stuff15:42
ralonsohdata = self.request.recv(1024)15:49
ralonsoh            f = io.BytesIO(data)15:49
ralonsoh            f.readline()  # read the request line15:49
ralonsoh            message = client.parse_headers(f)15:49
ralonsohdone!15:49
ralonsohmuch much better than parsing (for sure in a horrible way) the message from the socket15:49
itamarstok made some progress I think17:02
itamarsthberaud[m]: ready for review if you're working tomorrow19:14
hberaud[m]itamarst: ack, thanks, I'll take a look tomorrow19:20

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!