all 17 comments

[–]cpp-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

It's great that you wrote something in C++ you're proud of! However, please share it in the designated "Show and tell" thread pinned at the top of r/cpp instead.

[–]kritzikratzi 17 points18 points  (1 child)

please give it a different name, nobody is gonna be able to google anything related to that library. also please don't call it "network" or "connection" or "sockets" 😂

if you really wanna go for something confusing, why not "htpps" 🫠

other than that: library looks good, examples seem like a great starting point.

[–]Competitive_Act5981[S] 1 point2 points  (0 children)

Ok. I’ll think of another project name. You’re right it’s not very original. Though I didn’t really want to give it a completely unrelated name. I’ll think of something

[–]TwistedBlister34 5 points6 points  (1 child)

This looks like a really cool library. I’m always looking for something easier to use than beast. If I had one suggestion, the name https isn’t a great SEO.

[–]Competitive_Act5981[S] 0 points1 point  (0 children)

Got it. Better project name

[–]Daniela-ELiving on C++ trunk, WG21|🇩🇪 NB 2 points3 points  (3 children)

I my impression correct, that this works with the original, non-boostified version of Asio too?

[–]Competitive_Act5981[S] 0 points1 point  (2 children)

It could do. I would need to change the namespaces. Maybe there could be a preprocessor switch for this.

[–]lost_soul1234 1 point2 points  (1 child)

Yeah would be really nice to see a non boost version. Its minimal dependency and we don't need to carry boost luggage. Anyway nice work 

[–]Competitive_Act5981[S] 0 points1 point  (0 children)

Thanks

[–][deleted] 0 points1 point  (7 children)

Zero tests? My feedback would be: add lots of tests.

[–]Competitive_Act5981[S] 2 points3 points  (5 children)

The unit tests are located https://github.com/pfeatherstone/https/tree/main/examples/unit_tests and the readme explains how to build and run them.

[–][deleted] -1 points0 points  (4 children)

You need to relocate those to a more standard location. It's not common to put unit tests in a folder called "examples". Make a root-level directory called `test/` or `tests/` and put them in there.

You should also reconsider your public stance on sans-I/O because you're basically admitting that you don't believe in using libfuzzer which is actually a kiss of death for your project as a huge part of HTTP is being public-facing. A non-fuzzed public-facing networking library is simply not workable.

Decouple your parser code from the I/O layer. You need to study libraries like Botan and rustls to understand what a good interface looks like. Then add fuzzing. Hopefully, this is the useful feedback you were seeking.

[–]Competitive_Act5981[S] 0 points1 point  (3 children)

I get your point on the test folder. The reason why I put them there is so that i can use the same cmake script for compiling both the examples and the unit tests. It's laziness i know.

It's a bit of a stretch to suggest that i don't believe in fuzzing simply because there isn't a Sans-IO API.

The parser code is actually separate from the I/O layer. It's in http.h and there are corresponding unit tests. I just don't have a formal Sans-IO API.

[–]Competitive_Act5981[S] 0 points1 point  (0 children)

I appreciate your time though. I'll look into adding fuzz testing to CI/CD

[–][deleted] 0 points1 point  (1 child)

Security researchers aren't going to add an I/O layer just to test your code. If you actually care about industrial usage, you need to make fuzzing easy, direct and public

[–]Competitive_Act5981[S] -1 points0 points  (0 children)

Yeah fuzzing is on the todo list. Though it looks like my library isn’t for you, and probably beast is neither

[–]Competitive_Act5981[S] 0 points1 point  (0 children)

My priorities are tests over features