News for hackers. Stuff that matters.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by cle-b on Wednesday September 25, 2024 @04:50PM (#41651733)
Unlike other tools such as proxies that allow you to trace HTTP requests, httpdbg makes it possible to link the HTTP request to the Python code that initiated it. This is why it is specific to Python and does not work with other languages.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by ricardo81 on Wednesday September 25, 2024 @04:54PM (#41651768)
I'm still not understanding.

If you're coding something up, why wouldn't you know that piece of code does a HTTP/s request? Based on what you said, it sounds like a scenario where a programmer doesn't know how a request was made. Are there examples of scenarios where that's the case?

Sounds like a bit of a security nightmare where there's code doing arbitrary requests.

Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by bityard on Wednesday September 25, 2024 @05:06PM (#41651879)
Maybe you are working with an application or library that you didn't write, and want to see the raw requests and responses it generates without reading the entirety of the source code.

Maybe you are generating HTTP requests through an API and need to see which headers it sets by default, or which headers are or are not getting set due to a misconfiguration or bug.

There are probably loads more use cases, and if I actually did programming for a living, I could probably list a lot more.

Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by ricardo81 on Wednesday September 25, 2024 @05:11PM (#41651915)
The 3rd party library stuff makes sense, to an extent. But then you're debugging a 3rd party library.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by diegoallen on Wednesday September 25, 2024 @05:18PM (#41651986)
If a 3rd party library you depend on has bugs, you have bugs. And you need to either submit a patch to the library or find a workaround.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by ricardo81 on Wednesday September 25, 2024 @05:24PM (#41652042)
Or just not use arbitrary 3rd party stuff hoping it works :)

libcurl is used on billions of devices across the world and has plenty of debugging capabilities.

MITM proxy works across all languages.

Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by fragmede on Wednesday September 25, 2024 @05:37PM (#41652138)
The NIH is strong in this once.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by whirlwin on Wednesday September 25, 2024 @05:17PM (#41651976)
Here's a concrete scenario for you: Say you are in a team of 10 developers with a huge codebase that has accumulated over 5+ years. If you're new in the team, and you need to understand when a specific HTTP header is sent, or just snoop the value in the payload you otherwise wouldn't be able to see.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by ricardo81 on Wednesday September 25, 2024 @05:21PM (#41652016)
Snooping traffic isn't new though, so what's specific about this tool and Python.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by whirlwin on Thursday September 26, 2024 @01:07AM (#41654701)
How would you snoop outgoing HTTPS traffic otherwise easily anyway? mitmproxy requires some work to set up
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by golergka on Wednesday September 25, 2024 @05:15PM (#41651962)
> If you're coding something up, why wouldn't you know that piece of code does a HTTP/s request?

Because tracing all side-effects in a huge codebase with a lot of libraries and layers can be a daunting task.

Update: if you haven't worked with 20 year old >1m LOC codebase which went through many different teams and doesn't have any documentation whatsoever, you may lack necessary perspective to see value tools like this.

Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by ricardo81 on Wednesday September 25, 2024 @05:19PM (#41652000)
Sounds like people dealing with code they have no idea what it does. No amount of tools are going to help with that.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by actionfromafar on Wednesday September 25, 2024 @05:47PM (#41652206)
I think you attract downvotes because tools are helpful. If you have a huge unknown codebase, it can be nice to attack it from different angles. Reading code is useful, but observing what it does in runtime can be useful, too. Also, with hairier code, it can be more useful to first observe and prod it like a black box.
Re:Show HN: Httpdbg – A tool to trace the HTTP requests sent... by ricardo81 on Wednesday September 25, 2024 @05:54PM (#41652273)
Just the 1 downvote.

Yes, "tools are helpful", but whether there's a python/http specific tool that doesn't do what more generic tools do remains to be seen.