Matteo Luppi

Results 36 comments of Matteo Luppi

apparently it's broken again 😑

web tests fail here, but locally not. Do you have any idea why this happens?

Hard to say what the issue is, we need more details :)

Hi, unfortunately I couldn’t reproduce the issue (MacOS). If the problem still persists, could you please share a short recording? Thank you! 🙂

> It causes confusion and it's not reflecting the true state of the request being sent. Hi, could you elaborate more on this with more details? thanks! At first glance,...

Sorry, but I still don't get where the problem is. Could you write down the exact steps to reproduce the issue? Thanks :)

Ah, I see now. Yes, there is some confusion when we export the raw content. Maybe we should just stick with the uppercase version there as well. As far as...

> Let the user decide the letter case :) Okay I am fine with that! Then you should just fix the tests :) let's see if also @mhils and @Prinzhorn...

I could potentially relax the regex [here](https://github.com/mitmproxy/mitmproxy/blob/72940c3eaf9ed328cdd485b770fdfe9f95a095c4/mitmproxy/net/http/validate.py#L15), but I’m not sure if this might introduce other issues. @mhils, what do you think?

what about something like this? ``` _valid_content_length_strict = re.compile(r"^(?:0|[1-9][0-9]*)$") _valid_content_length_lax = re.compile(r"^\d+$") ``` ``` def parse_content_length(value: str | bytes) -> int: """ Parse a Content-Length header value and return it...