tinyproxy / tinyproxy

tinyproxy - a light-weight HTTP/HTTPS proxy daemon for POSIX operating systems
GNU General Public License v2.0
4.9k stars 668 forks source link

fixes tinyproxy/tinyproxy#235 Basic realm string editable in config file #547

Closed Gruummy closed 4 months ago

Gruummy commented 4 months ago

Please excuse potenial basic errors in this change. I tested it well.

... but it is my very first change on a "C" programm.

I implemented it exactly like described in your proposal with a new setting in the configfile

I also relocated the handler "HANDLE_FUNC (handle_basicauth)" ... the old position inside the file "conf.c" simply felt wrong ... for me.

For the same reason i relocated the line about "STDCONF (xtinyproxy, BOOL, handle_xtinyproxy)," to the "/ boolean arguments /" section. .. i thought .. when there is a headline section for it, then the BOOL should be defined in the section for BOOL's

It would be great if this could be merged ... i would want to do a few more small changes to make it good usable in our support organisation

This pull request ... is a first starter for me ... and get in touch with you

rofl0r commented 4 months ago

I also relocated the handler "HANDLE_FUNC (handle_basicauth)" ... the old position inside the file "conf.c" simply felt wrong ... for me.

one PR, one change. for longterm maintenance it's crucial to have high quality changesets - that means commits that only change the bare minimum, and with good descriptive commit messages. random code snippet reorderings and changes to gitignore may be accepted, but as separarate PRs with separate discussion and a reasoning for why the change is desired. "feels wrong" is typically not a good reasoning to get a change accepted, though. i will now proceed to make a few inline comments in the code.

Gruummy commented 4 months ago

Hi @rofl0r Now a second chance ... i cared about all you review comments, squashed all my commits ... and forced pushed again.

Many things should be much better now than the first push I presented to you.

Thank you for your helpful comments and patience.

Gruummy commented 4 months ago

@rofl0r

3rd attempt ?

I looked around in the code how the error handling was done in other sections of the code. and the following looked prettiest to me, so I have done it also this way

goto ERROR_EXIT;