Lurker News

Comments (218) 56 threads

Earlier comments
sim7c003 replies#
really nicely written. inrespect this is maybe known / unneeded comment, but why bother with basic auth at all, especially when there is no TLS?

i understand other auth schemes are more complicated, and maybe theres no desire to pull in big libraries. just that if theres no TLS or proper auth, you can also just skip basic auth. its only use would be to trick someone who's not familiar (unlikely with such a repo but not impossible) into a false sense of security.
ofc, not really an issue with the code, and its an excellent base to look into how this stuff works and if you want since its pretty clean and easy to ready, expand upon it. well done! love ppl churning out good ol C projects. respect!

severino#
> why bother with basic auth at all, especially when there is no TLS?

Maybe to have some "basic" auth for an embedded device web interface or something like that? I suppose it's better than nothing. I've devices which prompt for username and password with no TLS either.

sweetjuly#
It's fairly common to use something like nginx as a forward proxy and do TLS there. IPv4 and NAT makes this essentially mandatory if you want to host multiple services due to eSNI. You wouldn't necessarily have protection inside the server network (which isn't great) but you at least get protection everywhere else.
kjs3#
Basic auth can keep the crawlers out, for one thing.
elevation1 reply#
Nice work! I like the little test framework you built. Have you considered making runTest a macro so that you can print the name of the test along with the test result?
ashtonjamesd1 reply#
That's a very good idea actually and I had wanted to do that but it didn't click that you could do that with a macro!

Thank you, I'll will implement that :)

elevation#
For the ultimate in readable test reports, you can prettify the test name by:

* dropping the prefix "test_" * substituting the "_" characters in the function for whitespace * uppercasing the first letter of each word.
So `test_tokenize_simple_model` becomes "Tokenize Simple Model".

jcmontx1 reply#
I often forget how similar to Golang C looks and feels
EasyMark#
Maybe more chronologically correct to say "how very similar to C that golang looks"
krowek#
Curious, why did you decide to go with your own test helpers rather than using something like check?

Load more comments